Application Server 7
  1. Application Server 7
  2. AS7-2534

JSF "View could not be restored" if cookies disabled in browser

    Details

    • Type: Bug Bug
    • Status: Resolved Resolved (View Workflow)
    • Priority: Major Major
    • Resolution: Done
    • Affects Version/s: 7.0.2.Final, 7.1.0.Alpha1, 7.1.0.CR1b
    • Component/s: JSF
    • Labels:
      None
    • Environment:
      JBossAS 7.1.0.Alpha2-SNAPSHOT from 2011-11-07, firefox 3.6.23, Google Chrome 15.0.874.106
    • Steps to Reproduce:
      Hide

      1. deploy the jboss-as-numberguess-nocdi.war
      2. disable cookies in the browser
      3. go to http://localhost:8080/jboss-as-numberguess-nocdi
      4. click on any button
      5. notice the error

      Show
      1. deploy the jboss-as-numberguess-nocdi.war 2. disable cookies in the browser 3. go to http://localhost:8080/jboss-as-numberguess-nocdi 4. click on any button 5. notice the error
    • Similar Issues:
      Show 10 results 

      Description

      A JSF application doesn't work if cookies are disabled in browser on AS7.0.2.Final and latest 7.1.0.Final snapshot. The same WAR works on AS6 and on AS7.0.1.Final.

      The generated front page of the app contains `action="/jboss-as-numberguess-nocdi/home.jsf"' attribute in the form element on AS7.0.2, while it does contain `/jboss-as-numberguess-nocdi/home.jsf;jsessionid=835F17A..."' on AS 6.1.0.

      Submitting a form in the app returns HTTP 500 and logs the following exception:

      15:14:54,932 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/jboss-as-numberguess-nocdi].[Faces Servlet]] (http-localhost.localdomain-127.0.0.1-8080-2) Servlet.service() for servlet Faces Servlet threw exception: javax.faces.application.ViewExpiredException: viewId:/home.jsf - View /home.jsf could not be restored.
      at com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:205) [jsf-impl-2.1.3-b02-jbossorg-2.jar:2.1.3-SNAPSHOT]
      at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101) [jsf-impl-2.1.3-b02-jbossorg-2.jar:2.1.3-SNAPSHOT]
      at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:116) [jsf-impl-2.1.3-b02-jbossorg-2.jar:2.1.3-SNAPSHOT]
      at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118) [jsf-impl-2.1.3-b02-jbossorg-2.jar:2.1.3-SNAPSHOT]
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:593) [jboss-jsf-api_2.1_spec-2.0.0.Beta1.jar:2.0.0.Beta1]
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329) [jbossweb-7.0.3.Final.jar:7.1.0.Alpha2-SNAPSHOT]
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.3.Final.jar:7.1.0.Alpha2-SNAPSHOT]
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [jbossweb-7.0.3.Final.jar:7.1.0.Alpha2-SNAPSHOT]
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.3.Final.jar:7.1.0.Alpha2-SNAPSHOT]
      at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:155) [jboss-as-web-7.1.0.Alpha2-SNAPSHOT.jar:7.1.0.Alpha2-SNAPSHOT]
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) [jbossweb-7.0.3.Final.jar:7.1.0.Alpha2-SNAPSHOT]
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.3.Final.jar:7.1.0.Alpha2-SNAPSHOT]
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.3.Final.jar:7.1.0.Alpha2-SNAPSHOT]
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362) [jbossweb-7.0.3.Final.jar:7.1.0.Alpha2-SNAPSHOT]
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.3.Final.jar:7.1.0.Alpha2-SNAPSHOT]
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671) [jbossweb-7.0.3.Final.jar:7.1.0.Alpha2-SNAPSHOT]
      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930) [jbossweb-7.0.3.Final.jar:7.1.0.Alpha2-SNAPSHOT]
      at java.lang.Thread.run(Thread.java:636) [:1.6.0_20]

        Activity

        Hide
        Stan Silvert
        added a comment -

        It looks like you have run into this Mojarra bug:
        http://java.net/jira/browse/JAVASERVERFACES-2143

        Perhaps if you will add your sample app to that jira then Roger will take a look.

        Using client side state saving is one possible workaround.

        If this is critical and you can't get a response then please let me know.

        Show
        Stan Silvert
        added a comment - It looks like you have run into this Mojarra bug: http://java.net/jira/browse/JAVASERVERFACES-2143 Perhaps if you will add your sample app to that jira then Roger will take a look. Using client side state saving is one possible workaround. If this is critical and you can't get a response then please let me know.
        Hide
        Marek Schmidt
        added a comment -

        If this is critical and you can't get a response then please let me know.

        Not sure if it's critical, but there has been no apparent activity at the upstream issue.

        Show
        Marek Schmidt
        added a comment - If this is critical and you can't get a response then please let me know. Not sure if it's critical, but there has been no apparent activity at the upstream issue.
        Hide
        Stan Silvert
        added a comment -

        The upstream issue is now marked as resolved. It's very likely that we'll upgrade JSF in AS7.2.

        Show
        Stan Silvert
        added a comment - The upstream issue is now marked as resolved. It's very likely that we'll upgrade JSF in AS7.2.
        Hide
        Stan Silvert
        added a comment -

        This should be fixed now. Upgraded JSF based on Mojarra 2.1.11

        Show
        Stan Silvert
        added a comment - This should be fixed now. Upgraded JSF based on Mojarra 2.1.11

          People

          • Assignee:
            Stan Silvert
            Reporter:
            Marek Schmidt
          • Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: