ICEfaces
  1. ICEfaces
  2. ICE-11212

Preliminary Support for Mojarra JSF 2.3

    Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.2
    • Labels:
      None
    • Environment:
      ICEfaces4 trunk r. 50008/ Jenkins Build # 2312
      Mojarra 2.3 JSF (javax.faces-2.3.0-m09)
      Server: Tomcat7.0.42
      Browsers: Firefox50, MsEdge38, Chrome55
    • Assignee Priority:
      P2
    • Affects:
      Compatibility/Configuration

      Description

      The following issues have been found after testing sample apps from IF4 trunk with Mojarra 2.3 (javax.faces-2.3.0-m09) JSF; any of these issues cannot be reproduced with the default Mojarra 2.2.14.

      1) auction - is not functional; bids cannot be placed, item details can be viewed only if clicking twice on the arrow icons.
      A JS error occurs when trying to place bids (MsEdge):
      SCRIPT5022: jsf.ajax.request: Form has no view state element
      jsf.js.jsf (1,34846)

      2) emporium - the application cannot be loaded in a browser because of an HTTP Status 500.
      The page renders this error:

      HTTP Status 500 - javax/enterprise/context/spi/Contextual
      type Exception report
      message javax/enterprise/context/spi/Contextual
      description The server encountered an internal error that prevented it from fulfilling this request.
      exception
      javax.servlet.ServletException: javax/enterprise/context/spi/Contextual
          javax.faces.webapp.FacesServlet.service(FacesServlet.java:681)
          org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
          org.icesoft.util.servlet.RequestLoggerFilter.doFilter(RequestLoggerFilter.java:74)
          org.icesoft.util.servlet.CustomHeaderFilter.doFilter(CustomHeaderFilter.java:82)

      root cause
      java.lang.NoClassDefFoundError: javax/enterprise/context/spi/Contextual
          java.lang.Class.forName0(Native Method)
          java.lang.Class.forName(Class.java:340)
          com.sun.faces.util.Util.loadClass(Util.java:303)
          com.sun.faces.application.ApplicationImpl.newThing(ApplicationImpl.java:1811)
          com.sun.faces.application.ApplicationImpl.createComponentApplyAnnotations(ApplicationImpl.java:1983)
          com.sun.faces.application.ApplicationImpl.createComponent(ApplicationImpl.java:1210)
          com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.createComponent(ComponentTagHandlerDelegateImpl.java:588)
          com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:176)
          javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:135)
          javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:96)
          org.icefaces.mobi.component.largeview.LargeViewHandler.applyNextHandler(LargeViewHandler.java:44)
          com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:203)
      ...........


      3) chat
      a) The application is functional, however, an NCI popup renders after staying on the page for a few seconds (there is no need to log in to see this NCI popup). There are no server errors, or browser console errors.

      b) A server warning occurs when logging out of chat:
      Jan 12, 2017 1:58:51 PM org.icepush.LocalPushGroupManager$QueueConsumerTask takeAndExecute
      WARNING: Notification queue encountered
      java.lang.IllegalArgumentException: Illegal argument notificationEntrySet: '[]'. Argument cannot be null or empty.
              at org.icesoft.util.PreCondition.checkIfIsNotNullAndIsNotEmpty(PreCondition.java:367)
              at org.icepush.NotificationEvent.<init>(NotificationEvent.java:38)
              at org.icepush.Notification.run(Notification.java:174)
              at org.icepush.LocalPushGroupManager$QueueConsumerTask.takeAndExecute(LocalPushGroupManager.java:1828)
              at org.icepush.LocalPushGroupManager$QueueConsumerTask.run(LocalPushGroupManager.java:1758)
              at java.util.TimerThread.mainLoop(Timer.java:555)
              at java.util.TimerThread.run(Timer.java:505)
      ............


      4) showcase
      a) Styling issue: the left-side navigation menu links start rendering in blue as in attached screen shot (Capture.PNG), after clicking a link to access the first component.

      b) A number of component demos cannot be accessed because of the same "javax.enterprise.context.spi.Contextual" error. As example:
      ace:accordion > Overview
      ace:breadcrumbMenu > Overview
      ace:dataTable > all demos
      tooltip > Delegate,
      tree > all demos
      On these demos, a "javax.enterprise.context.spi.Contextual/java.lang.NoClassDefFoundError" server error popup occurs on page load, and if reloading the page, the error is rendered on the page; the server log has the same error as the one mentioned at issue 2).


      c) icecore:defaultAction; ace:chart > Export:
      A JS error occurs when trying to access ace:chart > Export demo, or when pressing keys on the icecore:defaultAction demo.
      Error: jsf.ajax.request: Form has no view state element
      http://localhost:8080/showcase/javax.faces.resource/jsf.js.jsf?ln=javax.faces&stage=Development&v=4_2_0_170112
      Line 2470


      5) scopes > Application Scope:
      The browser console error mentioned at issue 4.c) was reproduced also with scopes > Application Scope demo on IE11/Windows7, and randomly on IE11/Windows10, by clicking fast on the '+' or '-' counter buttons:
      SCRIPT5022: jsf.ajax.request: Form has no view state element
      File: jsf.js.jsf, Line: 2470, Column: 21


      6) fajax:
      Test fails, the counter fails to increase to '2' when clicking 'Toggle Test 3' button; instead, it changes to '0'.
      No browser console, or server errors.

        Activity

        Hide
        Ken Fyten added a comment -

        You probably want to use the Glassfish 5.x preview release available here for this, JSF 2.3 has a bunch of EE8 only dependencies. Possible some or all of the issues found originally relate to using Tomcat for this.

        http://download.oracle.com/glassfish/5.0/promoted/index.html

        Show
        Ken Fyten added a comment - You probably want to use the Glassfish 5.x preview release available here for this, JSF 2.3 has a bunch of EE8 only dependencies. Possible some or all of the issues found originally relate to using Tomcat for this. http://download.oracle.com/glassfish/5.0/promoted/index.html
        Hide
        Carmen Cristurean added a comment - - edited

        Testing results on GlassFish5 (glassfish-5.0-b01) configured with Mojarra 2.3 JSF, using ICEfaces 4.2 BETA/ or IF4 trunk Jenkins Build 2312:

        Issue 1 - auction - still exists.

        Issue 2 - the "javax/enterprise/context/spi/Contextual" server error could not be reproduced with emporium or any of the other samples; emporium can be accessed in all browsers; however emporium is not functional: the auction items disappear from the demo pages after selecting a new tab on the Emporium demo.

        Issue 3 - chat app behaves identically on GlassFish5, and all issues are still reproducible.

        Issue 4.a - showcase styling - not reproducible on GlassFish5/with Mojarra 2.3.

        Issue 4.b - showcase - "javax/enterprise/context/spi/Contextual/java.lang.NoClassDefFoundError" server error - cannot be reproduced on any of the demos.
        All demos can be accessed, however the "jsf.ajax.request: Form has no view state element" JS error is seen on BreadcrumbMenu, Tooltip > Delegate, Tree > all demos when interacting with these demos.

        Issue 4.c - showcase - "jsf.ajax.request: Form has no view state element " JS errors - still exist.
        This JS error occurs on many showcase demos, causing part of them to fail, including the MOBI demos.

        Issue 5 - scopes - still exists.

        Issue 6 - fajax - still exists.

        Another issue found on GlassFish5: ace:tabSet is not working, being unable to change tabs. This cannot be reproduced on Tomcat because of the "javax.enterprise.context.spi.Contextual" server error that occurs when loading a page with tabSet.

        Show
        Carmen Cristurean added a comment - - edited Testing results on GlassFish5 (glassfish-5.0-b01) configured with Mojarra 2.3 JSF, using ICEfaces 4.2 BETA/ or IF4 trunk Jenkins Build 2312: Issue 1 - auction - still exists. Issue 2 - the "javax/enterprise/context/spi/Contextual" server error could not be reproduced with emporium or any of the other samples; emporium can be accessed in all browsers; however emporium is not functional: the auction items disappear from the demo pages after selecting a new tab on the Emporium demo. Issue 3 - chat app behaves identically on GlassFish5, and all issues are still reproducible. Issue 4.a - showcase styling - not reproducible on GlassFish5/with Mojarra 2.3. Issue 4.b - showcase - "javax/enterprise/context/spi/Contextual/java.lang.NoClassDefFoundError" server error - cannot be reproduced on any of the demos. All demos can be accessed, however the "jsf.ajax.request: Form has no view state element" JS error is seen on BreadcrumbMenu, Tooltip > Delegate, Tree > all demos when interacting with these demos. Issue 4.c - showcase - "jsf.ajax.request: Form has no view state element " JS errors - still exist. This JS error occurs on many showcase demos, causing part of them to fail, including the MOBI demos. Issue 5 - scopes - still exists. Issue 6 - fajax - still exists. Another issue found on GlassFish5: ace:tabSet is not working, being unable to change tabs. This cannot be reproduced on Tomcat because of the "javax.enterprise.context.spi.Contextual" server error that occurs when loading a page with tabSet.
        Hide
        Mircea Toma added a comment - - edited

        Changed method EnvUtils.isJSF22 to EnvUtils.isJSF22OrGreater and also modified its implementation to return true for JSF version greater or equal to 2.2. Used new method to decide the update format for javax.faces.ViewState.

        Show
        Mircea Toma added a comment - - edited Changed method EnvUtils.isJSF22 to EnvUtils.isJSF22OrGreater and also modified its implementation to return true for JSF version greater or equal to 2.2. Used new method to decide the update format for javax.faces.ViewState .
        Hide
        Mircea Toma added a comment -

        java.lang.NoClassDefFoundError: javax/enterprise/context/spi/Contextual exception can be avoided by adding cdi-spi-1.2.jar to the classpath. It seems Glassfish server has the library already included.

        Show
        Mircea Toma added a comment - java.lang.NoClassDefFoundError: javax/enterprise/context/spi/Contextual exception can be avoided by adding cdi-spi-1.2.jar to the classpath. It seems Glassfish server has the library already included.
        Hide
        Carmen Cristurean added a comment - - edited

        Verified all mentioned issues with ICEfaces4 trunk r 50176/ FF49, MsEdge, IE11, on GlassFish5: all issues have been resolved with exception of the showcase styling issue mentioned at 4.a). This is actually not Mojarra 2.3 JSF specific, being able to reproduce it also with Mojarra 2.2.14 on Tomcat7.

        Note: showcase tests have been re-run on FF49, and no other issues have been found.

        Show
        Carmen Cristurean added a comment - - edited Verified all mentioned issues with ICEfaces4 trunk r 50176/ FF49, MsEdge, IE11, on GlassFish5: all issues have been resolved with exception of the showcase styling issue mentioned at 4.a). This is actually not Mojarra 2.3 JSF specific, being able to reproduce it also with Mojarra 2.2.14 on Tomcat7. Note: showcase tests have been re-run on FF49, and no other issues have been found.
        Hide
        Mircea Toma added a comment -

        I can reproduce the styling issue with Firefox 50.1 only. I could not find anything on our part that cause this issue. We should maybe open another JIRA case for this, with a lower priority.

        Show
        Mircea Toma added a comment - I can reproduce the styling issue with Firefox 50.1 only. I could not find anything on our part that cause this issue. We should maybe open another JIRA case for this, with a lower priority.
        Hide
        Carmen Cristurean added a comment - - edited

        ICE-11221 was opened for the showcase styling issue. I can see this issue consistently in all browsers on my PC (MsEdge, Chrome, FF49, IE11).

        Show
        Carmen Cristurean added a comment - - edited ICE-11221 was opened for the showcase styling issue. I can see this issue consistently in all browsers on my PC (MsEdge, Chrome, FF49, IE11).

          People

          • Assignee:
            Mircea Toma
            Reporter:
            Carmen Cristurean
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: