ICEfaces
  1. ICEfaces
  2. ICE-8229

ICEfaces3 MyFaces Regression - sample - fajax toggle count

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.1.0.BETA2
    • Fix Version/s: 3.1.0.RC1, 3.1
    • Component/s: QA, Sample Apps
    • Labels:
      None
    • Environment:
      Icefaces3.0 trunk revision# 29330
      Server: tomcat6
      Browser: IE7
      Last Known Working Revision#:29228
    • Assignee Priority:
      P1
    • Affects:
      Compatibility/Configuration

      Description

      fajax:
      Fails manually in IE - toggle counts stops after 2 toggle counts, exception below causes User Session Expired error (see attached image)
      WARNING: queued exception
      javax.faces.application.ViewExpiredException: /index.xhtmlNo saved view state could be found for the view identifier: /index.xhtml
          at org.apache.myfaces.lifecycle.RestoreViewExecutor.execute(RestoreViewExecutor.java:132)
          at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:170)
          at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
          at javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
          at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
          at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
          at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
          at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
          at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
          at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
          at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:859)
          at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:579)
          at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1555)
          at java.lang.Thread.run(Thread.java:619)

      To reproduce:
      click on any of the toggle buttons more that two times. Toggle count gets stuck at 2.

        Issue Links

          Activity

          Hide
          Mircea Toma added a comment -

          I cannot reproduce the issue when using the trunk code.

          Show
          Mircea Toma added a comment - I cannot reproduce the issue when using the trunk code.
          Hide
          Jerome Ruzol added a comment -

          The same error still exist; in addition, a random failure in which the increment pass over 2, but stops after some random number. I have attached the fajax war file that has the error. Please deploy app on tomcat6 and run in IE7.

          Show
          Jerome Ruzol added a comment - The same error still exist; in addition, a random failure in which the increment pass over 2, but stops after some random number. I have attached the fajax war file that has the error. Please deploy app on tomcat6 and run in IE7.
          Hide
          Mircea Toma added a comment -

          I retested using the attached war. I still cannot reproduce the issue. Maybe you can use another machine for testing, just to make sure that it is not something else in your environment causing the problem to occur.

          Show
          Mircea Toma added a comment - I retested using the attached war. I still cannot reproduce the issue. Maybe you can use another machine for testing, just to make sure that it is not something else in your environment causing the problem to occur.
          Hide
          Jerome Ruzol added a comment -

          Tested on another machine with Internet Explorer ver 7 with application deployed to tomcat v6.26, able to reproduce error. Confirmed that the issue does not exist on IE8 or IE9.

          Show
          Jerome Ruzol added a comment - Tested on another machine with Internet Explorer ver 7 with application deployed to tomcat v6.26, able to reproduce error. Confirmed that the issue does not exist on IE8 or IE9.
          Hide
          Mircea Toma added a comment -

          The regression can be reproduce only with a freshly opened IE7 instance. Once the page is reloaded the problem is gone.

          The issue resides in the Myfaces code that updates the javax.faces.ViewState key in the hidden input elements found in the page. During the second update the lookup for the 'javax.faces.ViewState' named input element fails. The element[name] syntax is used for the lookup which is known to fail for elements with complex names (such as 'javax.faces.ViewState').
          When the lookup fails Myfaces will create a second input element which will contain the new javax.faces.ViewState value. The next submit will send two 'javax.faces.ViewState' parameters but only the first one (the oldest) is read by the server state manager . This old key is not known to the server anymore, hence the ViewExpired exception.

          Show
          Mircea Toma added a comment - The regression can be reproduce only with a freshly opened IE7 instance. Once the page is reloaded the problem is gone. The issue resides in the Myfaces code that updates the javax.faces.ViewState key in the hidden input elements found in the page. During the second update the lookup for the 'javax.faces.ViewState' named input element fails. The element [name] syntax is used for the lookup which is known to fail for elements with complex names (such as 'javax.faces.ViewState'). When the lookup fails Myfaces will create a second input element which will contain the new javax.faces.ViewState value. The next submit will send two 'javax.faces.ViewState' parameters but only the first one (the oldest) is read by the server state manager . This old key is not known to the server anymore, hence the ViewExpired exception.
          Hide
          Mircea Toma added a comment -

          The attached patch replaces the element[name] lookup with a loop that iterates over the form elements to find the input element that needs to have its value updated.

          Show
          Mircea Toma added a comment - The attached patch replaces the element [name] lookup with a loop that iterates over the form elements to find the input element that needs to have its value updated.
          Hide
          Mircea Toma added a comment -

          Created issue in Myfaces' JIRA system: https://issues.apache.org/jira/browse/MYFACES-3574 .

          Show
          Mircea Toma added a comment - Created issue in Myfaces' JIRA system: https://issues.apache.org/jira/browse/MYFACES-3574 .
          Hide
          Deryk Sinotte added a comment -

          I have patched MyFaces and committed the new libs to the trunk of the repository. Resolving as fixed.

          Show
          Deryk Sinotte added a comment - I have patched MyFaces and committed the new libs to the trunk of the repository. Resolving as fixed.

            People

            • Assignee:
              Deryk Sinotte
              Reporter:
              Jerome Ruzol
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: