[jboss-user] [JBoss Portal] - Exception sending context initialized event to listener inst

sumeet.singh do-not-reply at jboss.com
Fri Jul 11 08:41:55 EDT 2008


hi,
the following error has occured when i deploy JSF application  with Portlet Bridge jars:

Exception sending context initialized event to listener instance of class org.jboss.web.jsf.integration.config.JBossJSFConfigureListener

My web.xml file is as follows:
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
    
        <filter-name>ResponseHeaders</filter-name>
        <filter-class>org.rancore.rsp.util.ResponseHeadersFilter</filter-class>

        <init-param>
            <param-name>my-param</param-name>
            <param-value>Hello, World</param-value>
        </init-param>
    
    
        Require that the user log in before accessing any page
        other than the entry pages 
        <filter-name>ForcedLoginFilter</filter-name>
        <filter-class>org.rancore.rsp.util.ForcedLoginFilter</filter-class>
        <init-param>
            <param-name>LoginURI</param-name>
            <param-value>/jsp/login.jsp</param-value>
        </init-param>
        <init-param>
            ViewIDs for which this filter must not
            forward back to the login page.
            <param-name>NoForwardViewIds</param-name>
            <param-value>login.jsp</param-value>
        </init-param>
    
    
    <filter-mapping>
        <filter-name>ResponseHeaders</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>ForcedLoginFilter</filter-name>
        <url-pattern>/*</url-pattern>
        
        REQUEST
        FORWARD
    </filter-mapping>
    
   

   

   
    <context-param>
        <param-name>javax.portlet.faces.BridgeImplClass</param-name>
        <param-value>org.apache.myfaces.portlet.faces.bridge.BridgeImpl</param-value>
    </context-param>
    
    
    
    <context-param>
        <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
        <param-value>client</param-value>
    </context-param>
    <context-param>
        <param-name>javax.faces.application.CONFIG_FILES</param-name>
        <param-value>/WEB-INF/faces-config.xml</param-value>
    </context-param>
    <context-param>
        <param-name>com.sun.faces.validateXml</param-name>
        <param-value>true</param-value>
    </context-param>
    <context-param>
        <param-name>javax.portlet.faces.renderPolicy</param-name>
        <param-value>ALWAYS_DELEGATE</param-value>
    </context-param>
    <context-param>
        <param-name>com.sun.faces.verifyObjects</param-name>
        <param-value>false</param-value>
    </context-param>
    
    
   
    
        <servlet-name>Faces Servlet</servlet-name>
        <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
        <init-param>
            <param-name>javax.faces.LIFECYCLE_ID</param-name>
            <param-value>com.sun.faces.lifecycle.PARTIAL</param-value>
        </init-param>
        <load-on-startup>1</load-on-startup>
    
     <security-constraint>
        <web-resource-collection>
            <web-resource-name>action</web-resource-name>
            Declarative Security Tests
            <url-pattern>*.jsp</url-pattern>
            <http-method>HEAD</http-method>
            <http-method>GET</http-method>
            <http-method>POST</http-method>
            <http-method>PUT</http-method>
            <http-method>DELETE</http-method>
        </web-resource-collection>
        <!--The ROle which can access these resources-->
        <auth-constraint>
            <role-name>Echo</role-name>
        </auth-constraint>
        <user-data-constraint>
            no description
            <transport-guarantee>NONE</transport-guarantee>
        </user-data-constraint>
    </security-constraint>
    <login-config>
        <auth-method>FORM</auth-method>
        <form-login-config>
            <form-login-page>/jsp/login.jsp</form-login-page>
            <form-error-page>/jsp/logoff.jsp</form-error-page>
        </form-login-config>
    </login-config>
    
    <security-role>
        A user allowed to invoke echo methods
        <role-name>Echo</role-name>
    </security-role>
   
    <servlet-mapping>
        <servlet-name>Faces Servlet</servlet-name>
        <url-pattern>*.jsf</url-pattern>
    </servlet-mapping>
    <session-config>
        <session-timeout>
            30
        </session-timeout>
    </session-config>
    
    
        <listener-class>com.sun.faces.config.ConfigureListener</listener-class>
     
    
    </web-app>


My faces-config file is as follows:
<?xml version='1.0' encoding='UTF-8'?>


<faces-config version="1.2" 
    xmlns="http://java.sun.com/xml/ns/javaee" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd">
        
    
        <view-handler>org.jboss.portletbridge.application.PortletViewHandler</view-handler>
        <state-manager>org.jboss.portletbridge.application.PortletStateManager</state-manager>
        
        <locale-config>
            <default-locale>en</default-locale>
            <supported-locale>en</supported-locale>
            <supported-locale>es</supported-locale>
            <supported-locale>hi-IN</supported-locale>
        </locale-config>
        <message-bundle>JSFPortalBridgeExample.Bundle</message-bundle>
    
    
    <managed-bean>
        Basic Login Bean
        <managed-bean-name>Login1</managed-bean-name>
        <managed-bean-class>org.rancore.rsp.bean.Login</managed-bean-class>
        <managed-bean-scope>session</managed-bean-scope>
    </managed-bean>
  
    <navigation-rule>
        <from-view-id>/jsp/login.jsp</from-view-id>
        <navigation-case>
            <from-outcome>success</from-outcome>
            <to-view-id>/jsp/result.jsp</to-view-id>
        </navigation-case>
        <navigation-case>
            <from-outcome>failure</from-outcome>
            <to-view-id>/jsp/login.jsp</to-view-id>
        </navigation-case>
    </navigation-rule>
</faces-config>


My jboss-web.xml file:
<?xml version="1.0" encoding="UTF-8"?>
<jboss-web>
    <class-loading java2ClassLoadingCompliance="false">
        <loader-repository>
            log4j.test:loader=JSFPortletBridge.war
            <loader-repository-config>java2ParentDelegation=false</loader-repository-config>
        </loader-repository>
    </class-loading>
    
  <security-domain flushOnSessionInvalidation="false"/>
  <context-root>/JSFPortalBridgeExample</context-root>
</jboss-web>

My WEN-INF\lib include following jars:
jsf-portlet.jar
log4j.jar
portletbridge-api-1.0.0.B3.jar
portletbridge-impl-1.0.0.B3.jar

kindly help soon


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4163848#4163848

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4163848



More information about the jboss-user mailing list