ICEfaces
  1. ICEfaces
  2. ICE-7768

Verify compatibility with JSF 2.2

    Details

    • Type: Task Task
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.0, 3.0.1, EE-3.0.0.GA
    • Fix Version/s: 4.0.BETA, 4.0
    • Component/s: Framework
    • Labels:
      None
    • Environment:
      ICEfaces, Mojarra 2.2.x
    • Affects:
      Compatibility/Configuration

      Description


      ICEfaces must be compatible with JSF 2.2.

        Issue Links

          Activity

          Ted Goddard created issue -
          Hide
          Ted Goddard added a comment -

          Sample response using Mojarra 2.1.6

          <?xml version='1.0' encoding='UTF-8'?>
          <partial-response><changes><update id="form:valueDescription"><Unable to render embedded object: File (valueDescription" style="font-weight: bold;">unselected</span>]]></update><update id="javax.faces.ViewState"><) not found.[CDATA[2937085888543728922:-8789158179856658572]]></update><extension aceCallbackParam="validationFailed">

          {"validationFailed":false}

          </extension></changes></partial-response>

          Sample response using Mojarra 2.2.0 (SNAPSHOT 20120215)

          <?xml version='1.0' encoding='UTF-8'?>
          <partial-response id="j_id1"><changes><update id="form:valueDescription"><Unable to render embedded object: File (valueDescription" style="font-weight: bold;">unselected</span>]]></update><update id="javax.faces.ViewState"><) not found.[CDATA[7207117905624929807:-8945325661020011338]]></update><extension aceCallbackParam="validationFailed">

          {"validationFailed":false}

          </extension></changes></partial-response>

          Show
          Ted Goddard added a comment - Sample response using Mojarra 2.1.6 <?xml version='1.0' encoding='UTF-8'?> <partial-response><changes><update id="form:valueDescription">< Unable to render embedded object: File (valueDescription" style="font-weight: bold;">unselected</span>]]></update><update id="javax.faces.ViewState"><) not found. [CDATA [2937085888543728922:-8789158179856658572] ]></update><extension aceCallbackParam="validationFailed"> {"validationFailed":false} </extension></changes></partial-response> Sample response using Mojarra 2.2.0 (SNAPSHOT 20120215) <?xml version='1.0' encoding='UTF-8'?> <partial-response id="j_id1"><changes><update id="form:valueDescription">< Unable to render embedded object: File (valueDescription" style="font-weight: bold;">unselected</span>]]></update><update id="javax.faces.ViewState"><) not found. [CDATA [7207117905624929807:-8945325661020011338] ]></update><extension aceCallbackParam="validationFailed"> {"validationFailed":false} </extension></changes></partial-response>
          Hide
          Ted Goddard added a comment -

          Using basic.war with Mojarra 2.2.0 (SNAPSHOT 20120215)

          The non-ICEfaces page update:

          <?xml version='1.0' encoding='UTF-8'?>
          <partial-response id="j_id1"><changes><update id="pg1"><Unable to render embedded object: File ([CDATA[<span id="pg1"><span id="out1">Show</span></span>]]></update><update id="pg2"><) not found.[CDATA[<span id="pg2"></span>]]></update><update id="j_id1:javax.faces.ViewState:0"><![CDATA[-2326805724723792318:-4660846604958319870]]></update></changes></partial-response>

          The ICEfaces page update:

          <?xml version='1.0' encoding='UTF-8'?>
          <partial-response id="j_id1"><changes><update id="pg1"><Unable to render embedded object: File ([CDATA[<span id="pg1"><span id="out1">Show</span></span>]]></update><update id="pg2"><) not found.[CDATA[<span id="pg2"></span>]]></update><update id="time"><Unable to render embedded object: File ([CDATA[<span id="time">1329342305884</span>]]></update><update id="vmiegvxe_icefaces_config"><) not found.[CDATA[<span id="vmiegvxe_icefaces_config"><script>ice.setupBridge('vmiegvxe_icefaces_config', 'vmiegvxe', 'fkgyovz02f',

          {deltaSubmit: false,disableDefaultErrorPopups: false,standardFormSerialization: false,sendDisposeWindow: true,blockUIOnSubmit: false}

          );</script></span>]]></update><update id="javax.faces.ViewState"><![CDATA[-8424576785144756149:-2402759869823110869]]></update></changes></partial-response>

          this difference is due to DOMPartialViewContext.java:

          private void renderState() throws IOException

          { // Get the view state and write it to the response.. PartialResponseWriter writer = getPartialResponseWriter(); writer.startUpdate(PartialResponseWriter.VIEW_STATE_MARKER); String state = facesContext.getApplication().getStateManager().getViewState(facesContext); writer.write(state); writer.endUpdate(); }
          Show
          Ted Goddard added a comment - Using basic.war with Mojarra 2.2.0 (SNAPSHOT 20120215) The non-ICEfaces page update: <?xml version='1.0' encoding='UTF-8'?> <partial-response id="j_id1"><changes><update id="pg1">< Unable to render embedded object: File ([CDATA[<span id="pg1"><span id="out1">Show</span></span>]]></update><update id="pg2"><) not found. [CDATA [<span id="pg2"></span>] ]></update><update id="j_id1:javax.faces.ViewState:0"><![CDATA [-2326805724723792318:-4660846604958319870] ]></update></changes></partial-response> The ICEfaces page update: <?xml version='1.0' encoding='UTF-8'?> <partial-response id="j_id1"><changes><update id="pg1">< Unable to render embedded object: File ([CDATA[<span id="pg1"><span id="out1">Show</span></span>]]></update><update id="pg2"><) not found. [CDATA [<span id="pg2"></span>] ]></update><update id="time">< Unable to render embedded object: File ([CDATA[<span id="time">1329342305884</span>]]></update><update id="vmiegvxe_icefaces_config"><) not found. [CDATA[<span id="vmiegvxe_icefaces_config"><script>ice.setupBridge('vmiegvxe_icefaces_config', 'vmiegvxe', 'fkgyovz02f', {deltaSubmit: false,disableDefaultErrorPopups: false,standardFormSerialization: false,sendDisposeWindow: true,blockUIOnSubmit: false} );</script></span>]]></update><update id="javax.faces.ViewState"><![CDATA [-8424576785144756149:-2402759869823110869] ]></update></changes></partial-response> this difference is due to DOMPartialViewContext.java: private void renderState() throws IOException { // Get the view state and write it to the response.. PartialResponseWriter writer = getPartialResponseWriter(); writer.startUpdate(PartialResponseWriter.VIEW_STATE_MARKER); String state = facesContext.getApplication().getStateManager().getViewState(facesContext); writer.write(state); writer.endUpdate(); }
          Hide
          Ted Goddard added a comment -

          Currently we write out

          <update id="javax.faces.ViewState"><![CDATA[-8424576785144756149:-2402759869823110869]]></update>

          But jsf.js is expecting:

          <update id="j_id1:javax.faces.ViewState:0"><![CDATA[-2326805724723792318:-4660846604958319870]]></update>

          Show
          Ted Goddard added a comment - Currently we write out <update id="javax.faces.ViewState"><![CDATA [-8424576785144756149:-2402759869823110869] ]></update> But jsf.js is expecting: <update id="j_id1:javax.faces.ViewState:0"><![CDATA [-2326805724723792318:-4660846604958319870] ]></update>
          Ted Goddard made changes -
          Field Original Value New Value
          Assignee Ted Goddard [ ted.goddard ]
          Ted Goddard made changes -
          Salesforce Case []
          Fix Version/s 3.0.1 [ 10282 ]
          Ken Fyten made changes -
          Salesforce Case []
          Fix Version/s 3.1 [ 10312 ]
          Fix Version/s 3.0.1 [ 10282 ]
          Deryk Sinotte made changes -
          Salesforce Case []
          Assignee Priority P1
          Affects Version/s EE-3.0.0.GA [ 10262 ]
          Affects Version/s 3.0.1 [ 10282 ]
          Assignee Ted Goddard [ ted.goddard ] Deryk Sinotte [ deryk.sinotte ]
          Deryk Sinotte made changes -
          Link This issue depends on ICE-8035 [ ICE-8035 ]
          Hide
          Deryk Sinotte added a comment -

          The original work to change the ViewState so that ids are unique across the page (which needs to work for portlets as well) was done in this JIRA which has been marked as resolved:

          http://java.net/jira/browse/JAVASERVERFACES_SPEC_PUBLIC-220

          In running the latest Mojarra snapshot against our code, it appears it's not quite working as advertised. I opened a new JIRA and a simple test case showing that multiple forms are not getting unique ids - or even correct if the naming container form id should be included.

          http://java.net/jira/browse/JAVASERVERFACES_SPEC_PUBLIC-1093

          Show
          Deryk Sinotte added a comment - The original work to change the ViewState so that ids are unique across the page (which needs to work for portlets as well) was done in this JIRA which has been marked as resolved: http://java.net/jira/browse/JAVASERVERFACES_SPEC_PUBLIC-220 In running the latest Mojarra snapshot against our code, it appears it's not quite working as advertised. I opened a new JIRA and a simple test case showing that multiple forms are not getting unique ids - or even correct if the naming container form id should be included. http://java.net/jira/browse/JAVASERVERFACES_SPEC_PUBLIC-1093
          Hide
          Deryk Sinotte added a comment -

          Looks like the discussion (or at least some part of the discussion) has migrated to http://java.net/jira/browse/JAVASERVERFACES_SPEC_PUBLIC-790.

          Show
          Deryk Sinotte added a comment - Looks like the discussion (or at least some part of the discussion) has migrated to http://java.net/jira/browse/JAVASERVERFACES_SPEC_PUBLIC-790 .
          Ken Fyten made changes -
          Fix Version/s 3.2 [ 10338 ]
          Fix Version/s 3.1 [ 10312 ]
          Migration made changes -
          Fix Version/s 3.3 [ 10370 ]
          Fix Version/s 3.2 [ 10338 ]
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #33474 Fri Feb 15 15:07:15 MST 2013 deryk.sinotte ICE-7768: add extra ResponseWriter methods to help with running on Mojarra 2.2
          Files Changed
          Commit graph MODIFY /icefaces3/trunk/icefaces/core/src/main/java/org/icefaces/impl/context/DOMResponseWriter.java
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #33477 Fri Feb 15 16:25:16 MST 2013 deryk.sinotte ICE-7768: add capability to detect JSF 2.2 environment
          Files Changed
          Commit graph MODIFY /icefaces3/trunk/icefaces/core/src/main/java/org/icefaces/util/EnvUtils.java
          Hide
          Deryk Sinotte added a comment -

          I downloaded and ran the showcase with the latest Mojarra 2.2. snapshot (Feb 14) from https://maven.java.net/content/repositories/snapshots/org/glassfish/javax.faces/2.2.0-SNAPSHOT/.

          There was a problem with DOMResponseWriter in that there are a couple of new methods on the ResponseWriter API for writing out the XML and DOCTYPE preample of a document. We already have code for dealing with that so I added the two new methods and just called through to our existing code. This allows the showcase to at least get started and running somewhat.

          I verified that the problem of the ViewState ids is still there as described above and in http://java.net/jira/browse/JAVASERVERFACES_SPEC_PUBLIC-1093. One symptom of the problem shows up in the client as each Ajax response leads to the logging of an error due to a mismatch between the ViewState id on the page and the ViewState id that is sent back in the response.

          Show
          Deryk Sinotte added a comment - I downloaded and ran the showcase with the latest Mojarra 2.2. snapshot (Feb 14) from https://maven.java.net/content/repositories/snapshots/org/glassfish/javax.faces/2.2.0-SNAPSHOT/ . There was a problem with DOMResponseWriter in that there are a couple of new methods on the ResponseWriter API for writing out the XML and DOCTYPE preample of a document. We already have code for dealing with that so I added the two new methods and just called through to our existing code. This allows the showcase to at least get started and running somewhat. I verified that the problem of the ViewState ids is still there as described above and in http://java.net/jira/browse/JAVASERVERFACES_SPEC_PUBLIC-1093 . One symptom of the problem shows up in the client as each Ajax response leads to the logging of an error due to a mismatch between the ViewState id on the page and the ViewState id that is sent back in the response.
          Deryk Sinotte made changes -
          Assignee Priority P1 [ 10010 ] P3 [ 10012 ]
          Ken Fyten made changes -
          Fix Version/s 3.4 [ 10770 ]
          Fix Version/s 3.3 [ 10370 ]
          Hide
          Deryk Sinotte added a comment -

          Please review the JSF 2.2 change the ViewState key from ""javax.faces.ViewState" to "j_id1:javax.faces.ViewState:0" and report back on it's potential impact on ICEfaces.

          If changes are minor, we'll consider fixing it on the trunk so that we can move ahead on testing to see what else might be a problem for us. If changes are going to be significant or risky, we should consider branching our trunk for further work on getting 2.2 supported.

          Show
          Deryk Sinotte added a comment - Please review the JSF 2.2 change the ViewState key from ""javax.faces.ViewState" to "j_id1:javax.faces.ViewState:0" and report back on it's potential impact on ICEfaces. If changes are minor, we'll consider fixing it on the trunk so that we can move ahead on testing to see what else might be a problem for us. If changes are going to be significant or risky, we should consider branching our trunk for further work on getting 2.2 supported.
          Deryk Sinotte made changes -
          Assignee Deryk Sinotte [ deryk.sinotte ] Mircea Toma [ mircea.toma ]
          Deryk Sinotte made changes -
          Assignee Priority P3 [ 10012 ] P1 [ 10010 ]
          Hide
          Ken Fyten added a comment -

          Also note that any specific changes for JSF 2.2 should be logged in separate JIRAs and linked back to this summary JIRA.

          Show
          Ken Fyten added a comment - Also note that any specific changes for JSF 2.2 should be logged in separate JIRAs and linked back to this summary JIRA.
          Mircea Toma made changes -
          Link This issue depends on ICE-9247 [ ICE-9247 ]
          Hide
          Mircea Toma added a comment -

          Created ICE-9247 as child issue that needs to solve the handling of view state key format.

          Show
          Mircea Toma added a comment - Created ICE-9247 as child issue that needs to solve the handling of view state key format.
          Mircea Toma made changes -
          Assignee Mircea Toma [ mircea.toma ] Ken Fyten [ ken.fyten ]
          Ken Fyten made changes -
          Assignee Ken Fyten [ ken.fyten ] Carmen Cristurean [ ccristurean ]
          Hide
          Carmen Cristurean added a comment -

          It has been found that samples applications that usually have been tested until now on Tomcat6, need to be deployed onto Tomcat7 to be able to run the tests in automation.

          ICEfaces3/trunk revision # 34942
          Server: Tomcat6
          Browsers: IE7, Firefox3.6, Chrome26

          auction / auctionMonitor/ component-showcase/ basic/ compat-basic/ elementUpdate/ fajax/ scopes:
          Tests failed in automation on Tomcat6 due to an HTTP Error 500 when loading the test page in TestRunner (tests pass in automation on Tomcat7):

          HTTP Status 500 -
          type Exception report
          message
          description The server encountered an internal error () that prevented it from fulfilling this request.
          exception
          java.lang.NullPointerException
          com.sun.faces.config.InitFacesContext$ServletContextAdapter.getInitParameter(InitFacesContext.java:368)
          javax.faces.component.UIComponent.pushComponentToEL(UIComponent.java:1937)
          javax.faces.event.ComponentSystemEvent.processListener(ComponentSystemEvent.java:114)
          com.sun.faces.application.ApplicationImpl.processListeners(ApplicationImpl.java:2187)
          com.sun.faces.application.ApplicationImpl.invokeListenersFor(ApplicationImpl.java:2163)
          com.sun.faces.application.ApplicationImpl.publishEvent(ApplicationImpl.java:296)
          com.sun.faces.application.ApplicationImpl.publishEvent(ApplicationImpl.java:247)
          javax.faces.component.UIViewRoot$ViewMap.clear(UIViewRoot.java:1849)
          com.sun.faces.config.InitFacesContext.release(InitFacesContext.java:247)
          javax.faces.webapp.FacesServlet.service(FacesServlet.java:629)
          note The full stack trace of the root cause is available in the Apache Tomcat/6.0.26 logs.

          showcase:
          Tests were executed without any issues in automation on Tomcat7, and no other issues have been found except the ones already known.

          Show
          Carmen Cristurean added a comment - It has been found that samples applications that usually have been tested until now on Tomcat6, need to be deployed onto Tomcat7 to be able to run the tests in automation. ICEfaces3/trunk revision # 34942 Server: Tomcat6 Browsers: IE7, Firefox3.6, Chrome26 auction / auctionMonitor/ component-showcase/ basic/ compat-basic/ elementUpdate/ fajax/ scopes: Tests failed in automation on Tomcat6 due to an HTTP Error 500 when loading the test page in TestRunner (tests pass in automation on Tomcat7): HTTP Status 500 - type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception java.lang.NullPointerException com.sun.faces.config.InitFacesContext$ServletContextAdapter.getInitParameter(InitFacesContext.java:368) javax.faces.component.UIComponent.pushComponentToEL(UIComponent.java:1937) javax.faces.event.ComponentSystemEvent.processListener(ComponentSystemEvent.java:114) com.sun.faces.application.ApplicationImpl.processListeners(ApplicationImpl.java:2187) com.sun.faces.application.ApplicationImpl.invokeListenersFor(ApplicationImpl.java:2163) com.sun.faces.application.ApplicationImpl.publishEvent(ApplicationImpl.java:296) com.sun.faces.application.ApplicationImpl.publishEvent(ApplicationImpl.java:247) javax.faces.component.UIViewRoot$ViewMap.clear(UIViewRoot.java:1849) com.sun.faces.config.InitFacesContext.release(InitFacesContext.java:247) javax.faces.webapp.FacesServlet.service(FacesServlet.java:629) note The full stack trace of the root cause is available in the Apache Tomcat/6.0.26 logs. showcase: Tests were executed without any issues in automation on Tomcat7, and no other issues have been found except the ones already known.
          Hide
          Ken Fyten added a comment -

          JSF 2.2 requires Servlet 3.0. Supported platforms for ICEfaces 4 will be (initial release):

          • Tomcat 7
          • Glassfish 4
          • WildFly (JBoss) 8
          Show
          Ken Fyten added a comment - JSF 2.2 requires Servlet 3.0. Supported platforms for ICEfaces 4 will be (initial release): Tomcat 7 Glassfish 4 WildFly (JBoss) 8
          Ken Fyten made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Affects Compatibility/Configuration [ 10002 ]
          Assignee Priority P1 [ 10010 ]
          Resolution Fixed [ 1 ]
          Neil Griffin made changes -
          Link This issue depends on ICE-9680 [ ICE-9680 ]
          Neil Griffin made changes -
          Link This issue depends on ICE-9679 [ ICE-9679 ]
          Ken Fyten made changes -
          Fix Version/s 4.0 [ 11382 ]
          Ken Fyten made changes -
          Status Resolved [ 5 ] Closed [ 6 ]

            People

            • Assignee:
              Carmen Cristurean
              Reporter:
              Ted Goddard
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: