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

          Jerome Ruzol created issue -
          Ken Fyten made changes -
          Field Original Value New Value
          Salesforce Case []
          Fix Version/s 3.1.0.RC1 [ 10337 ]
          Fix Version/s 3.1 [ 10312 ]
          Assignee Priority P1
          Assignee Mircea Toma [ mircea.toma ]
          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.
          Mircea Toma made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Jerome Ruzol made changes -
          Attachment fajax.war [ 14569 ]
          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.
          Jerome Ruzol made changes -
          Resolution Fixed [ 1 ]
          Status Resolved [ 5 ] Reopened [ 4 ]
          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.
          Mircea Toma made changes -
          Attachment ICE-8229.patch [ 14621 ]
          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 .
          Mircea Toma made changes -
          Assignee Mircea Toma [ mircea.toma ] Deryk Sinotte [ deryk.sinotte ]
          Deryk Sinotte made changes -
          Link This issue blocks ICE-8290 [ ICE-8290 ]
          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.
          Deryk Sinotte made changes -
          Status Reopened [ 4 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #29685 Tue Jun 26 11:31:48 MDT 2012 deryk.sinotte ICE-8018: updated to MyFaces 2.1.8 release with patch for ICE-8229 applied
          Files Changed
          Commit graph ADD /icefaces3/trunk/icefaces/lib/myfaces/myfaces-impl-2.1.8-ice-8229.jar
          Commit graph ADD /icefaces3/trunk/icefaces/lib/myfaces/myfaces-api-2.1.8-ice-8229.jar
          Commit graph DEL /icefaces3/trunk/icefaces/lib/myfaces/myfaces-api-2.1.7-ice-8290.jar
          Commit graph DEL /icefaces3/trunk/icefaces/lib/myfaces/myfaces-impl-2.1.7-ice-8290.jar
          Ken Fyten made changes -
          Salesforce Case []
          Affects [Compatibility/Configuration]
          Security Private [ 10001 ]
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #30936 Wed Sep 19 15:33:08 MDT 2012 ken.fyten Publishing MyFaces 2.1.8-ice-8229 library to maven snapshots repo (patched MyFaces 2.1.8).
          Files Changed
          Commit graph ADD /maven2/snapshots/org/apache/myfaces/core/myfaces-api/2.1.8-ice-8229/myfaces-api-2.1.8-ice-8229.jar
          Commit graph ADD /maven2/snapshots/org/apache/myfaces/core/myfaces-impl/2.1.8-ice-8229
          Commit graph ADD /maven2/snapshots/org/apache/myfaces/core/myfaces-api/2.1.8-ice-8229/myfaces-api-2.1.8-ice-8229.pom
          Commit graph ADD /maven2/snapshots/org/apache/myfaces/core/myfaces-impl/2.1.8-ice-8229/myfaces-impl-2.1.8-ice-8229.pom
          Commit graph ADD /maven2/snapshots/org/apache/myfaces/core/myfaces-impl/2.1.8-ice-8229/myfaces-impl-2.1.8-ice-8229.jar
          Commit graph ADD /maven2/snapshots/org/apache/myfaces/core/myfaces-api/2.1.8-ice-8229
          Ken Fyten made changes -
          Status Resolved [ 5 ] Closed [ 6 ]

            People

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

              Dates

              • Created:
                Updated:
                Resolved: