RichFaces
  1. RichFaces
  2. RF-1271

javax.servlet.ServletException: Prefix for attributes in portlet session scope not found when runnning portajAjaxSample on https

    Details

    • Type: Bug Bug
    • Status: Closed Closed (View Workflow)
    • Priority: Major Major
    • Resolution: Done
    • Affects Version/s: 3.2.0
    • Fix Version/s: 3.2.0, 3.2.1
    • Component/s: None
    • Security Level: Public (Everyone can see)
    • Labels:
      None
    • Environment:
      jboss portal 2.6.2 bundled with jboss 4.2
      Jdk 1.6.0_03
    • Similar Issues:
      Show 10 results 

      Description

      I tried deploying portalajaxsample from
      http://snapshots.jboss.org/maven2/org/richfaces/samples/portalAjaxSample/3.2.0-SNAPSHOT/portalAjaxSample-3.2.0-20071030.110357-4.war .

      downloaded new jboss portal 2.6.2 bundled with jboss 4.2AS.

      configured SSL based on the jboss wiki for 4.2.

      Started the server and i tried running the ajaxsample on https, it shows up with the form objects, but when you click "ajax switch to repeater page" we get this error

      "javax.servlet.ServletException: Prefix for attributes in portlet session scope not found when runnning portajAjaxSample on https"..

      It was first happening in my application, i thought it was something wrong in mmy source, but tried sample and it did the same thing.

        Activity

        Hide
        Bharat Kandanoor
        added a comment -

        Hi Alexander Smirnov

        Do you have any updates on this issue? Do you need any other information to describe more on this issue?

        thanks,
        Bharat

        Show
        Bharat Kandanoor
        added a comment - Hi Alexander Smirnov Do you have any updates on this issue? Do you need any other information to describe more on this issue? thanks, Bharat
        Hide
        Alexander Smirnov
        added a comment -

        Portlet bridge has been refactored to a JSR-301 compatible implementation. This is deployed with Richfaces 3.1.3.CR2

        Show
        Alexander Smirnov
        added a comment - Portlet bridge has been refactored to a JSR-301 compatible implementation. This is deployed with Richfaces 3.1.3.CR2
        Hide
        Alexander Smirnov
        added a comment -

        This is configuration issue for a Tomcat connector. Without emptySessionPath="true" , portlet and servlet from a same web application have a different session objects.

        Show
        Alexander Smirnov
        added a comment - This is configuration issue for a Tomcat connector. Without emptySessionPath="true" , portlet and servlet from a same web application have a different session objects.
        Hide
        Viggo Navarsete
        added a comment -

        I'm also getting such an exception when trying the RichFaces JSF portlet found here: http://anonsvn.jboss.org/repos/portletswap/portlets/src/framework/RichFacesPortlet
        I have tried with these dependencies in my pom.xml (tried with the newest Richfaces libraries available):
        <dependencies>

        <dependency>
        <groupId>javax.faces</groupId>
        <artifactId>jsf-api</artifactId>
        <version>1.2_04-p02</version>
        <scope>provided</scope>
        </dependency>

        <dependency>
        <groupId>javax.faces</groupId>
        <artifactId>jsf-impl</artifactId>
        <version>1.2_04-p02</version>
        <scope>provided</scope>
        <exclusions>
        <exclusion>
        <groupId>commons-collections</groupId>
        <artifactId>commons-collections</artifactId>
        </exclusion>
        <exclusion>
        <groupId>commons-logging</groupId>
        <artifactId>commons-logging</artifactId>
        </exclusion>
        </exclusions>
        </dependency>

        <dependency>
        <groupId>com.sun.facelets</groupId>
        <artifactId>jsf-facelets</artifactId>
        <version>1.1.14</version>
        </dependency>

        <dependency>
        <groupId>javax.portlet</groupId>
        <artifactId>portlet-api</artifactId>
        <version>1.0</version>
        <scope>provided</scope>
        </dependency>

        <dependency>
        <groupId>commons-lang</groupId>
        <artifactId>commons-lang</artifactId>
        <version>2.1</version>
        </dependency>

        <dependency>
        <groupId>javax.servlet</groupId>
        <artifactId>servlet-api</artifactId>
        <version>2.5</version>
        <scope>provided</scope>
        </dependency>

        <dependency>
        <groupId>javax.servlet.jsp</groupId>
        <artifactId>jsp-api</artifactId>
        <version>2.1</version>
        <scope>provided</scope>
        </dependency>

        <dependency>
        <groupId>log4j</groupId>
        <artifactId>log4j</artifactId>
        <version>1.2.14</version>
        <scope>provided</scope>
        </dependency>

        <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>3.8.1</version>
        <scope>test</scope>
        </dependency>

        <dependency>
        <groupId>org.richfaces.extensions</groupId>
        <artifactId>portlet</artifactId>
        <version>3.2.0-SNAPSHOT</version>
        <!-version>3.1.3.CR1</version->
        <exclusions>
        <exclusion>
        <groupId>javax.faces</groupId>
        <artifactId>jsf-api</artifactId>
        </exclusion>
        <exclusion>
        <groupId>javax.faces</groupId>
        <artifactId>jsf-impl</artifactId>
        </exclusion>
        </exclusions>
        </dependency>

        <dependency>
        <groupId>org.richfaces.framework</groupId>
        <artifactId>richfaces-api</artifactId>
        <!-version>3.2.0-SNAPSHOT</version->
        <version>3.1.3.GA</version>
        <exclusions>
        <exclusion>
        <groupId>commons-logging</groupId>
        <artifactId>commons-logging</artifactId>
        </exclusion>
        <exclusion>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        </exclusion>
        <exclusion>
        <groupId>javax.faces</groupId>
        <artifactId>jsf-api</artifactId>
        </exclusion>

        <exclusion>
        <groupId>javax.faces</groupId>
        <artifactId>servlet-api</artifactId>
        </exclusion>
        <exclusion>
        <groupId>javax.faces</groupId>
        <artifactId>jsf-impl</artifactId>
        </exclusion>
        </exclusions>
        </dependency>

        <dependency>
        <groupId>org.richfaces.framework</groupId>
        <artifactId>richfaces-impl</artifactId>
        <!-version>3.2.0-SNAPSHOT</version->
        <version>3.1.3.GA</version>
        <exclusions>
        <exclusion>
        <groupId>commons-logging</groupId>
        <artifactId>commons-logging</artifactId>
        </exclusion>
        <exclusion>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        </exclusion>
        <exclusion>
        <groupId>javax.faces</groupId>
        <artifactId>jsf-api</artifactId>
        </exclusion>

        <exclusion>
        <groupId>javax.servlet</groupId>
        <artifactId>servlet-api</artifactId>
        </exclusion>
        <exclusion>
        <groupId>javax.faces</groupId>
        <artifactId>jsf-impl</artifactId>
        </exclusion>
        </exclusions>
        </dependency>

        <dependency>
        <groupId>org.richfaces.ui</groupId>
        <artifactId>richfaces-ui</artifactId>
        <!-version>3.2.0-SNAPSHOT</version->
        <version>3.1.3.GA</version>
        <exclusions>
        <exclusion>
        <groupId>commons-logging</groupId>
        <artifactId>commons-logging</artifactId>
        </exclusion>
        <exclusion>
        <groupId>javax.faces</groupId>
        <artifactId>jsf-api</artifactId>
        </exclusion>

        <exclusion>
        <groupId>javax.faces</groupId>
        <artifactId>servlet-api</artifactId>
        </exclusion>
        <exclusion>
        <groupId>javax.faces</groupId>
        <artifactId>jsf-impl</artifactId>
        </exclusion>
        </exclusions>
        </dependency>

        </dependencies>

        My environment:
        JBoss AS 4.2.2.GA
        JBoss Portal 2.6.3

        Exception:
        09:41:08,868 WARN [lifecycle] [] [] executePhase(RESTORE_VIEW 1,org.ajax4jsf.portlet.context.FacesContextImpl@19c1aa8) threw exception
        javax.faces.FacesException: Prefix for attributes in portlet session scope not found
        at org.ajax4jsf.portlet.context.ServletContextImpl.getSessionPrefix(ServletContextImpl.java:255)
        at org.ajax4jsf.portlet.context.ServletContextImpl.getSession(ServletContextImpl.java:352)
        at org.ajax4jsf.application.AjaxStateManager.restoreStateFromSession(AjaxStateManager.java:261)
        at org.ajax4jsf.application.AjaxStateManager.restoreView(AjaxStateManager.java:236)
        at com.sun.faces.application.ViewHandlerImpl.restoreView(ViewHandlerImpl.java:290)
        at com.sun.facelets.FaceletViewHandler.restoreView(FaceletViewHandler.java:316)
        at org.ajax4jsf.application.ViewHandlerWrapper.restoreView(ViewHandlerWrapper.java:116)
        at org.ajax4jsf.application.AjaxViewHandler.restoreView(AjaxViewHandler.java:159)
        at com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:141)
        at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
        at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
        at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
        at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
        at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
        at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:562)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
        at java.lang.Thread.run(Thread.java:595)
        09:41:08,870 ERROR [[FacesServlet]] [] [] Servlet.service() for servlet FacesServlet threw exception
        javax.faces.FacesException: Prefix for attributes in portlet session scope not found
        at org.ajax4jsf.portlet.context.ServletContextImpl.getSessionPrefix(ServletContextImpl.java:255)
        at org.ajax4jsf.portlet.context.ServletContextImpl.getSession(ServletContextImpl.java:352)
        at org.ajax4jsf.application.AjaxStateManager.restoreStateFromSession(AjaxStateManager.java:261)
        at org.ajax4jsf.application.AjaxStateManager.restoreView(AjaxStateManager.java:236)
        at com.sun.faces.application.ViewHandlerImpl.restoreView(ViewHandlerImpl.java:290)
        at com.sun.facelets.FaceletViewHandler.restoreView(FaceletViewHandler.java:316)
        at org.ajax4jsf.application.ViewHandlerWrapper.restoreView(ViewHandlerWrapper.java:116)
        at org.ajax4jsf.application.AjaxViewHandler.restoreView(AjaxViewHandler.java:159)
        at com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:141)
        at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
        at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
        at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
        at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
        at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
        at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:562)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
        at java.lang.Thread.run(Thread.java:595)

        Show
        Viggo Navarsete
        added a comment - I'm also getting such an exception when trying the RichFaces JSF portlet found here: http://anonsvn.jboss.org/repos/portletswap/portlets/src/framework/RichFacesPortlet I have tried with these dependencies in my pom.xml (tried with the newest Richfaces libraries available): <dependencies> <dependency> <groupId>javax.faces</groupId> <artifactId>jsf-api</artifactId> <version>1.2_04-p02</version> <scope>provided</scope> </dependency> <dependency> <groupId>javax.faces</groupId> <artifactId>jsf-impl</artifactId> <version>1.2_04-p02</version> <scope>provided</scope> <exclusions> <exclusion> <groupId>commons-collections</groupId> <artifactId>commons-collections</artifactId> </exclusion> <exclusion> <groupId>commons-logging</groupId> <artifactId>commons-logging</artifactId> </exclusion> </exclusions> </dependency> <dependency> <groupId>com.sun.facelets</groupId> <artifactId>jsf-facelets</artifactId> <version>1.1.14</version> </dependency> <dependency> <groupId>javax.portlet</groupId> <artifactId>portlet-api</artifactId> <version>1.0</version> <scope>provided</scope> </dependency> <dependency> <groupId>commons-lang</groupId> <artifactId>commons-lang</artifactId> <version>2.1</version> </dependency> <dependency> <groupId>javax.servlet</groupId> <artifactId>servlet-api</artifactId> <version>2.5</version> <scope>provided</scope> </dependency> <dependency> <groupId>javax.servlet.jsp</groupId> <artifactId>jsp-api</artifactId> <version>2.1</version> <scope>provided</scope> </dependency> <dependency> <groupId>log4j</groupId> <artifactId>log4j</artifactId> <version>1.2.14</version> <scope>provided</scope> </dependency> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>3.8.1</version> <scope>test</scope> </dependency> <dependency> <groupId>org.richfaces.extensions</groupId> <artifactId>portlet</artifactId> <version>3.2.0-SNAPSHOT</version> <!- version>3.1.3.CR1</version -> <exclusions> <exclusion> <groupId>javax.faces</groupId> <artifactId>jsf-api</artifactId> </exclusion> <exclusion> <groupId>javax.faces</groupId> <artifactId>jsf-impl</artifactId> </exclusion> </exclusions> </dependency> <dependency> <groupId>org.richfaces.framework</groupId> <artifactId>richfaces-api</artifactId> <!- version>3.2.0-SNAPSHOT</version -> <version>3.1.3.GA</version> <exclusions> <exclusion> <groupId>commons-logging</groupId> <artifactId>commons-logging</artifactId> </exclusion> <exclusion> <groupId>junit</groupId> <artifactId>junit</artifactId> </exclusion> <exclusion> <groupId>javax.faces</groupId> <artifactId>jsf-api</artifactId> </exclusion> <exclusion> <groupId>javax.faces</groupId> <artifactId>servlet-api</artifactId> </exclusion> <exclusion> <groupId>javax.faces</groupId> <artifactId>jsf-impl</artifactId> </exclusion> </exclusions> </dependency> <dependency> <groupId>org.richfaces.framework</groupId> <artifactId>richfaces-impl</artifactId> <!- version>3.2.0-SNAPSHOT</version -> <version>3.1.3.GA</version> <exclusions> <exclusion> <groupId>commons-logging</groupId> <artifactId>commons-logging</artifactId> </exclusion> <exclusion> <groupId>junit</groupId> <artifactId>junit</artifactId> </exclusion> <exclusion> <groupId>javax.faces</groupId> <artifactId>jsf-api</artifactId> </exclusion> <exclusion> <groupId>javax.servlet</groupId> <artifactId>servlet-api</artifactId> </exclusion> <exclusion> <groupId>javax.faces</groupId> <artifactId>jsf-impl</artifactId> </exclusion> </exclusions> </dependency> <dependency> <groupId>org.richfaces.ui</groupId> <artifactId>richfaces-ui</artifactId> <!- version>3.2.0-SNAPSHOT</version -> <version>3.1.3.GA</version> <exclusions> <exclusion> <groupId>commons-logging</groupId> <artifactId>commons-logging</artifactId> </exclusion> <exclusion> <groupId>javax.faces</groupId> <artifactId>jsf-api</artifactId> </exclusion> <exclusion> <groupId>javax.faces</groupId> <artifactId>servlet-api</artifactId> </exclusion> <exclusion> <groupId>javax.faces</groupId> <artifactId>jsf-impl</artifactId> </exclusion> </exclusions> </dependency> </dependencies> My environment: JBoss AS 4.2.2.GA JBoss Portal 2.6.3 Exception: 09:41:08,868 WARN [lifecycle] [] [] executePhase(RESTORE_VIEW 1,org.ajax4jsf.portlet.context.FacesContextImpl@19c1aa8) threw exception javax.faces.FacesException: Prefix for attributes in portlet session scope not found at org.ajax4jsf.portlet.context.ServletContextImpl.getSessionPrefix(ServletContextImpl.java:255) at org.ajax4jsf.portlet.context.ServletContextImpl.getSession(ServletContextImpl.java:352) at org.ajax4jsf.application.AjaxStateManager.restoreStateFromSession(AjaxStateManager.java:261) at org.ajax4jsf.application.AjaxStateManager.restoreView(AjaxStateManager.java:236) at com.sun.faces.application.ViewHandlerImpl.restoreView(ViewHandlerImpl.java:290) at com.sun.facelets.FaceletViewHandler.restoreView(FaceletViewHandler.java:316) at org.ajax4jsf.application.ViewHandlerWrapper.restoreView(ViewHandlerWrapper.java:116) at org.ajax4jsf.application.AjaxViewHandler.restoreView(AjaxViewHandler.java:159) at com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:141) at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251) at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141) at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179) at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:562) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446) at java.lang.Thread.run(Thread.java:595) 09:41:08,870 ERROR [ [FacesServlet] ] [] [] Servlet.service() for servlet FacesServlet threw exception javax.faces.FacesException: Prefix for attributes in portlet session scope not found at org.ajax4jsf.portlet.context.ServletContextImpl.getSessionPrefix(ServletContextImpl.java:255) at org.ajax4jsf.portlet.context.ServletContextImpl.getSession(ServletContextImpl.java:352) at org.ajax4jsf.application.AjaxStateManager.restoreStateFromSession(AjaxStateManager.java:261) at org.ajax4jsf.application.AjaxStateManager.restoreView(AjaxStateManager.java:236) at com.sun.faces.application.ViewHandlerImpl.restoreView(ViewHandlerImpl.java:290) at com.sun.facelets.FaceletViewHandler.restoreView(FaceletViewHandler.java:316) at org.ajax4jsf.application.ViewHandlerWrapper.restoreView(ViewHandlerWrapper.java:116) at org.ajax4jsf.application.AjaxViewHandler.restoreView(AjaxViewHandler.java:159) at com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:141) at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251) at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141) at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179) at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:562) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446) at java.lang.Thread.run(Thread.java:595)
        Hide
        Viggo Navarsete
        added a comment -

        Now I'm running JBoss AS 4.2.2.GA and JBoss Portal 2.6.3 with Richface 3.1.3.GA and I have a simple JSF Richfaces portlet deployed. I'm able to run it fine for some time, but eventually the same exception appers:
        13:42:03,540 WARN [lifecycle] executePhase(RESTORE_VIEW 1,org.ajax4jsf.portlet.context.FacesContextImpl@16aeae0) threw exception
        javax.faces.FacesException: Prefix for attributes in portlet session scope not found
        at org.ajax4jsf.portlet.context.ServletContextImpl.getSessionPrefix(ServletContextImpl.java:255)
        at org.ajax4jsf.portlet.context.ServletContextImpl.getSession(ServletContextImpl.java:352)
        at org.ajax4jsf.portlet.application.PortletStateHolder.getInstance(PortletStateHolder.java:62)
        at org.ajax4jsf.portlet.application.PortalStateManager.restoreStateFromSession(PortalStateManager.java:39)
        at org.ajax4jsf.application.AjaxStateManager.restoreView(AjaxStateManager.java:236)
        at com.sun.faces.application.ViewHandlerImpl.restoreView(ViewHandlerImpl.java:290)

        I see that this issue is resolved, is this fix backported to the 3.1.3.GA versions of the richfaces API's?

        Show
        Viggo Navarsete
        added a comment - Now I'm running JBoss AS 4.2.2.GA and JBoss Portal 2.6.3 with Richface 3.1.3.GA and I have a simple JSF Richfaces portlet deployed. I'm able to run it fine for some time, but eventually the same exception appers: 13:42:03,540 WARN [lifecycle] executePhase(RESTORE_VIEW 1,org.ajax4jsf.portlet.context.FacesContextImpl@16aeae0) threw exception javax.faces.FacesException: Prefix for attributes in portlet session scope not found at org.ajax4jsf.portlet.context.ServletContextImpl.getSessionPrefix(ServletContextImpl.java:255) at org.ajax4jsf.portlet.context.ServletContextImpl.getSession(ServletContextImpl.java:352) at org.ajax4jsf.portlet.application.PortletStateHolder.getInstance(PortletStateHolder.java:62) at org.ajax4jsf.portlet.application.PortalStateManager.restoreStateFromSession(PortalStateManager.java:39) at org.ajax4jsf.application.AjaxStateManager.restoreView(AjaxStateManager.java:236) at com.sun.faces.application.ViewHandlerImpl.restoreView(ViewHandlerImpl.java:290) I see that this issue is resolved, is this fix backported to the 3.1.3.GA versions of the richfaces API's?
        Hide
        Alexander Smirnov
        added a comment -

        Most recent version of the portltt bridge included into RichFaces 3.1.4.GA. It's deployed into Jboss Maven repository at http://repository.jboss.org/maven2/org/richfaces/extensions/portletbridge/ .
        There is two projects, portletbridge-api ( JSR-301 classes and interfaces ), and portletbridge-impl , implementation classes.
        Short description writed by Wesley Hales:
        The JSR-301 compliant RichFaces portlet bridge brings the entire RichFaces library to your JBoss Portal environment. Not only does the bridge give you access to all the RichFaces components, it also provides you powerful AJAX processing capabilities. There are only minimal changes that must be made to an existing JSR-301 portlet, or you can download the demo project to use as a template for setting up a new JSF+RichFaces portlet.

        View demo at http://livedemo.exadel.com/portal.

        1. Define portlet.xml settings. These are the exact same setting for any JSR-301 portlet.

        <portlet>
        <portlet-name>ajaxPortlet</portlet-name>
        <portlet-class>
        javax.portlet.faces.GenericFacesPortlet
        </portlet-class>

        <init-param>
        <name>javax.portlet.faces.defaultViewId.view</name>
        <value>/welcome.xhtml</value>
        </init-param>
        <!-- optional definition for a portlet Edit mode -->
        <init-param>
        <name>javax.portlet.faces.defaultViewId.edit</name>
        <value>/jsf/edit.xhtml</value>
        </init-param>
        <!-- optional definition for a portlet Help mode -->
        <init-param>
        <name>javax.portlet.faces.defaultViewId.help</name>
        <value>/jsf/help.xhtml</value>
        </init-param>

        <expiration-cache>-0</expiration-cache>
        <portlet-info>
        <title>Ajax Portlet</title>
        </portlet-info>
        <supports>
        <mime-type>text/html</mime-type>
        <portlet-mode>VIEW</portlet-mode>
        <portlet-mode>EDIT</portlet-mode>
        <portlet-mode>HELP</portlet-mode>
        </supports>
        </portlet>
        </portlet-app>

        2. Define faces-config.xml settings:

        <faces-config>
        <application>
        <view-handler>
        org.ajax4jsf.portlet.application.PortletViewHandler
        </view-handler>
        <state-manager>
        org.ajax4jsf.portlet.application.PortalStateManager
        </state-manager>
        </application>
        <factory>
        <faces-context-factory>
        org.ajax4jsf.portlet.context.FacesContextFactoryImpl
        </faces-context-factory>
        </factory>
        ...
        </faces-config>

        3.Define web.xml settings:

        <web-app xmlns="http://java.sun.com/xml/ns/j2ee"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
        version="2.4">
        ...
        <!-- This is optional parameters for a facelets based application -->
        <context-param>
        <param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>
        <param-value>org.ajax4jsf.portlet.application.FaceletPortletViewHandler</param-value>
        </context-param>
        <context-param>
        <param-name>javax.portlet.faces.renderPolicy</param-name>
        <param-value>
        ALWAYS_DELEGATE
        </param-value>
        </context-param>
        <!-- These parameters prevent loading separate style/javascript for each Richfaces components
        It must be used together with a portal-wide configuration, see below -->
        <context-param>
        <param-name>org.richfaces.LoadStyleStrategy</param-name>
        <param-value>NONE</param-value>
        </context-param>
        <context-param>
        <param-name>org.richfaces.LoadScriptStrategy</param-name>
        <param-value>NONE</param-value>
        </context-param>
        <context-param>
        <param-name>org.ajax4jsf.RESOURCE_URI_PREFIX</param-name>
        <param-value>rfRes</param-value>
        </context-param>

        <filter>
        <display-name>Ajax4jsf Filter</display-name>
        <filter-name>ajax4jsf</filter-name>
        <filter-class>org.ajax4jsf.Filter</filter-class>
        </filter>

        <filter-mapping>
        <filter-name>ajax4jsf</filter-name>
        <servlet-name>FacesServlet</servlet-name>
        <dispatcher>FORWARD</dispatcher>
        <dispatcher>REQUEST</dispatcher>
        <dispatcher>INCLUDE</dispatcher>
        </filter-mapping>
        ...
        <servlet-mapping>
        <servlet-name>FacesServlet</servlet-name>
        <url-pattern>/faces/*</url-pattern>
        </servlet-mapping>
        ...
        </web-app>

        4. To avoid scripts loading more than once from different portlet windows you can define additional scripts in jboss-portlet.xml. *Note the "rfRes" URI prefix that is mapped in the web.xml. For more information on RichFaces web.xml parameters see the documentation.

        <portlet>
        <portlet-name>ajaxPortlet</portlet-name>
        <header-content>
        <script src="/faces/rfRes/org/ajax4jsf/framework.pack.js" type="text/javascript" ></script>
        <script src="/faces/rfRes/org/richfaces/ui.pack.js" type="text/javascript" ></script>
        <link rel="stylesheet" type="text/css" href="/faces/rfRes/org/richfaces/skin.xcss" />
        </header-content>
        </portlet>
        5. Richfaces JSR-301 bridge can be used with a any compatible implementation ( for example, MyFaces implementation ). Simple put optional parameter into web.xml :
        ...........
        <context-param>
        <param-name>javax.portlet.faces.BridgeImplClass</param-name>
        <param-value>org.ajax4jsf.portlet.AjaxPortletBridge</param-value>
        </context-param>
        ..............
        To download the demo source, use subversion to checkout:
        http://anonsvn.jboss.org/repos/portletswap/portlets/src/framework/RichFacesPortlet/

        Show
        Alexander Smirnov
        added a comment - Most recent version of the portltt bridge included into RichFaces 3.1.4.GA. It's deployed into Jboss Maven repository at http://repository.jboss.org/maven2/org/richfaces/extensions/portletbridge/ . There is two projects, portletbridge-api ( JSR-301 classes and interfaces ), and portletbridge-impl , implementation classes. Short description writed by Wesley Hales: The JSR-301 compliant RichFaces portlet bridge brings the entire RichFaces library to your JBoss Portal environment. Not only does the bridge give you access to all the RichFaces components, it also provides you powerful AJAX processing capabilities. There are only minimal changes that must be made to an existing JSR-301 portlet, or you can download the demo project to use as a template for setting up a new JSF+RichFaces portlet. View demo at http://livedemo.exadel.com/portal . 1. Define portlet.xml settings. These are the exact same setting for any JSR-301 portlet. <portlet> <portlet-name>ajaxPortlet</portlet-name> <portlet-class> javax.portlet.faces.GenericFacesPortlet </portlet-class> <init-param> <name>javax.portlet.faces.defaultViewId.view</name> <value>/welcome.xhtml</value> </init-param> <!-- optional definition for a portlet Edit mode --> <init-param> <name>javax.portlet.faces.defaultViewId.edit</name> <value>/jsf/edit.xhtml</value> </init-param> <!-- optional definition for a portlet Help mode --> <init-param> <name>javax.portlet.faces.defaultViewId.help</name> <value>/jsf/help.xhtml</value> </init-param> <expiration-cache>-0</expiration-cache> <portlet-info> <title>Ajax Portlet</title> </portlet-info> <supports> <mime-type>text/html</mime-type> <portlet-mode>VIEW</portlet-mode> <portlet-mode>EDIT</portlet-mode> <portlet-mode>HELP</portlet-mode> </supports> </portlet> </portlet-app> 2. Define faces-config.xml settings: <faces-config> <application> <view-handler> org.ajax4jsf.portlet.application.PortletViewHandler </view-handler> <state-manager> org.ajax4jsf.portlet.application.PortalStateManager </state-manager> </application> <factory> <faces-context-factory> org.ajax4jsf.portlet.context.FacesContextFactoryImpl </faces-context-factory> </factory> ... </faces-config> 3.Define web.xml settings: <web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd " version="2.4"> ... <!-- This is optional parameters for a facelets based application --> <context-param> <param-name>org.ajax4jsf.VIEW_HANDLERS</param-name> <param-value>org.ajax4jsf.portlet.application.FaceletPortletViewHandler</param-value> </context-param> <context-param> <param-name>javax.portlet.faces.renderPolicy</param-name> <param-value> ALWAYS_DELEGATE </param-value> </context-param> <!-- These parameters prevent loading separate style/javascript for each Richfaces components It must be used together with a portal-wide configuration, see below --> <context-param> <param-name>org.richfaces.LoadStyleStrategy</param-name> <param-value>NONE</param-value> </context-param> <context-param> <param-name>org.richfaces.LoadScriptStrategy</param-name> <param-value>NONE</param-value> </context-param> <context-param> <param-name>org.ajax4jsf.RESOURCE_URI_PREFIX</param-name> <param-value>rfRes</param-value> </context-param> <filter> <display-name>Ajax4jsf Filter</display-name> <filter-name>ajax4jsf</filter-name> <filter-class>org.ajax4jsf.Filter</filter-class> </filter> <filter-mapping> <filter-name>ajax4jsf</filter-name> <servlet-name>FacesServlet</servlet-name> <dispatcher>FORWARD</dispatcher> <dispatcher>REQUEST</dispatcher> <dispatcher>INCLUDE</dispatcher> </filter-mapping> ... <servlet-mapping> <servlet-name>FacesServlet</servlet-name> <url-pattern>/faces/*</url-pattern> </servlet-mapping> ... </web-app> 4. To avoid scripts loading more than once from different portlet windows you can define additional scripts in jboss-portlet.xml. *Note the "rfRes" URI prefix that is mapped in the web.xml. For more information on RichFaces web.xml parameters see the documentation. <portlet> <portlet-name>ajaxPortlet</portlet-name> <header-content> <script src="/faces/rfRes/org/ajax4jsf/framework.pack.js" type="text/javascript" ></script> <script src="/faces/rfRes/org/richfaces/ui.pack.js" type="text/javascript" ></script> <link rel="stylesheet" type="text/css" href="/faces/rfRes/org/richfaces/skin.xcss" /> </header-content> </portlet> 5. Richfaces JSR-301 bridge can be used with a any compatible implementation ( for example, MyFaces implementation ). Simple put optional parameter into web.xml : ........... <context-param> <param-name>javax.portlet.faces.BridgeImplClass</param-name> <param-value>org.ajax4jsf.portlet.AjaxPortletBridge</param-value> </context-param> .............. To download the demo source, use subversion to checkout: http://anonsvn.jboss.org/repos/portletswap/portlets/src/framework/RichFacesPortlet/
        Hide
        Viggo Navarsete
        added a comment -

        See this issue why I can't jump to a newer version of the Richfaces API's than 3.1.3.GA:http://jira.jboss.com/jira/browse/RF-2135

        Show
        Viggo Navarsete
        added a comment - See this issue why I can't jump to a newer version of the Richfaces API's than 3.1.3.GA: http://jira.jboss.com/jira/browse/RF-2135
        Hide
        Mehmet Salgar
        added a comment -

        Hallo,

        I had converted my demo application for richfaces and porlet running for JBoss Portal 2.6.3 with RichFaces 3.1.3.GA according these intructions and directly hit some problems that I consider as bugs.

        First my application that is running with 3.1.3.GA using h:form and h:commandButton (in the forms that I don't need Ajax functionality) without problem, after the conversion to 3.1.4.GA with above configuration it stoped working.

        First problem, if I don't convert h:commanButton to a a4j:commandButton I am getting view expired exception all the time form JSF lifecycle.

        After this conversion, view expired exception dissappears but new javascript exception appears, complaining A4J object can't be found in Internet Explorer, including a4j:form solve this problem also.

        So at this point the question that I will ask, to use the Porlet and RichFaces, we have to stick to the a4j:form and a4j:commandButton, which I found weird because my previous version of application run perfectly with tags h:form and h:commandButton and actually I like to have the option to stick with standars JSF lifecycle when I don't need Ajax functionality....

        One other small problem, this snippet that instructs us

        <portlet>
        <portlet-name>ajaxPortlet</portlet-name>
        <header-content>
        <script src="/faces/rfRes/org/ajax4jsf/framework.pack.js" type="text/javascript" ></script>
        <script src="/faces/rfRes/org/richfaces/ui.pack.js" type="text/javascript" ></script>
        <link rel="stylesheet" type="text/css" href="/faces/rfRes/org/richfaces/skin.xcss" />
        </header-content>

        is not working because 3.1.4.GA create the resource on this uri /tvpp_demo_wl-1.0/faces/rfResorg/ajax4jsf/javascript/scripts/form.js as you may see there is no '/' between rfRes and org. I guess intended form is the one at the snippet but 3.1.4.GA creates this wrong....

        Show
        Mehmet Salgar
        added a comment - Hallo, I had converted my demo application for richfaces and porlet running for JBoss Portal 2.6.3 with RichFaces 3.1.3.GA according these intructions and directly hit some problems that I consider as bugs. First my application that is running with 3.1.3.GA using h:form and h:commandButton (in the forms that I don't need Ajax functionality) without problem, after the conversion to 3.1.4.GA with above configuration it stoped working. First problem, if I don't convert h:commanButton to a a4j:commandButton I am getting view expired exception all the time form JSF lifecycle. After this conversion, view expired exception dissappears but new javascript exception appears, complaining A4J object can't be found in Internet Explorer, including a4j:form solve this problem also. So at this point the question that I will ask, to use the Porlet and RichFaces, we have to stick to the a4j:form and a4j:commandButton, which I found weird because my previous version of application run perfectly with tags h:form and h:commandButton and actually I like to have the option to stick with standars JSF lifecycle when I don't need Ajax functionality.... One other small problem, this snippet that instructs us <portlet> <portlet-name>ajaxPortlet</portlet-name> <header-content> <script src="/faces/rfRes/org/ajax4jsf/framework.pack.js" type="text/javascript" ></script> <script src="/faces/rfRes/org/richfaces/ui.pack.js" type="text/javascript" ></script> <link rel="stylesheet" type="text/css" href="/faces/rfRes/org/richfaces/skin.xcss" /> </header-content> is not working because 3.1.4.GA create the resource on this uri /tvpp_demo_wl-1.0/faces/rfResorg/ajax4jsf/javascript/scripts/form.js as you may see there is no '/' between rfRes and org. I guess intended form is the one at the snippet but 3.1.4.GA creates this wrong....

          People

          • Assignee:
            Aleksej Yanul
            Reporter:
            Bharat Kandanoor
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: