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

          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>
          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 .
          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.
          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.
          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.
          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.
          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

            People

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

              Dates

              • Created:
                Updated:
                Resolved: