ICEfaces
  1. ICEfaces
  2. ICE-4567

Receiving NoSuchMethodError exception when adding <f:convertDateTime> to an iceface component using JSF 1.1.5

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.8.1
    • Fix Version/s: 1.8.2-EE-Beta, 1.8.2-EE-GA, 1.8.3
    • Component/s: Framework
    • Labels:
      None
    • Environment:
      Windows XP, JBOSS 4.2.2, Icefaces 1.8.1, Myfaces 1.1.5
    • Affects:
      Compatibility/Configuration

      Description

      An exception occurs when adding a standard convertDateTime converter inside an iceface component (in my case specificaly an ice:outputText component). The exception seems to be due to the getValueExpression method of the ELSetPropertiesRule class calls a method (javax.faces.application.Application->getExpressionFactory) that doesn't exist until JSF 1.2. As stated above I am using 1.1.5 JSF.

      Here is the stack trace:
      12:58:32,620 INFO [STDOUT] 12:58:32,620 ERROR [Digester] Begin event threw error
      java.lang.NoSuchMethodError: javax.faces.application.Application.getExpressionFactory()Ljavax/el/ExpressionFactory;
      at com.icesoft.faces.webapp.parser.ELSetPropertiesRule.getValueExpression(ELSetPropertiesRule.java:153)
      at com.icesoft.faces.webapp.parser.ELSetPropertiesRule.begin(ELSetPropertiesRule.java:94)
      at org.apache.commons.digester.Rule.begin(Rule.java:175)
      at org.apache.commons.digester.Digester.startElement(Digester.java:1453)
      at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(Unknown Source)
      at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source)
      at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
      at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
      at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
      at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
      at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
      at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
      at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
      at org.apache.commons.digester.Digester.parse(Digester.java:1785)
      at com.icesoft.faces.webapp.parser.Parser.parse(Parser.java:130)
      at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:464)
      at com.icesoft.faces.application.D2DViewHandler.renderView(D2DViewHandler.java:153)
      at org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:41)
      at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:132)
      at com.icesoft.faces.webapp.http.core.JsfLifecycleExecutor.apply(JsfLifecycleExecutor.java:19)
      at com.icesoft.faces.context.View$2$1.respond(View.java:48)
      at com.icesoft.faces.webapp.http.servlet.ServletRequestResponse.respondWith(ServletRequestResponse.java:201)
      at com.icesoft.faces.webapp.http.servlet.JettyAdaptingServlet$ContinuationRequestResponse.respondWith(JettyAdaptingServlet.java:49)
      at com.icesoft.faces.context.View$2.serve(View.java:76)
      at com.icesoft.faces.context.View.servePage(View.java:139)
      at com.icesoft.faces.webapp.http.core.SingleViewServer.service(SingleViewServer.java:52)
      at com.icesoft.faces.webapp.http.common.ServerProxy.service(ServerProxy.java:11)
      at com.icesoft.faces.webapp.http.servlet.MainSessionBoundServlet$4.service(MainSessionBoundServlet.java:114)
      at com.icesoft.faces.webapp.http.common.standard.PathDispatcherServer.service(PathDispatcherServer.java:24)
      at com.icesoft.faces.webapp.http.servlet.MainSessionBoundServlet.service(MainSessionBoundServlet.java:160)
      at com.icesoft.faces.webapp.http.servlet.SessionDispatcher$1.service(SessionDispatcher.java:42)
      at com.icesoft.faces.webapp.http.servlet.JettyAdaptingServlet.service(JettyAdaptingServlet.java:29)
      at com.icesoft.faces.webapp.http.servlet.EnvironmentAdaptingServlet.service(EnvironmentAdaptingServlet.java:63)
      at com.icesoft.faces.webapp.http.servlet.SessionDispatcher.service(SessionDispatcher.java:62)
      at com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:23)
      at com.icesoft.faces.webapp.http.servlet.MainServlet.service(MainServlet.java:153)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
      at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
      at java.lang.Thread.run(Unknown Source)
      12:58:32,620 INFO [STDOUT] 12:58:32,620 ERROR [View] Problem encountered during View.servePage
      javax.faces.FacesException: Can't parse stream for /alineo/homepageTasks.jspx javax.faces.application.Application.getExpressionFactory()Ljavax/el/ExpressionFactory;
      at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:470)
      at com.icesoft.faces.application.D2DViewHandler.renderView(D2DViewHandler.java:153)
      at org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:41)
      at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:132)
      at com.icesoft.faces.webapp.http.core.JsfLifecycleExecutor.apply(JsfLifecycleExecutor.java:19)
      at com.icesoft.faces.context.View$2$1.respond(View.java:48)
      at com.icesoft.faces.webapp.http.servlet.ServletRequestResponse.respondWith(ServletRequestResponse.java:201)
      at com.icesoft.faces.webapp.http.servlet.JettyAdaptingServlet$ContinuationRequestResponse.respondWith(JettyAdaptingServlet.java:49)
      at com.icesoft.faces.context.View$2.serve(View.java:76)
      at com.icesoft.faces.context.View.servePage(View.java:139)
      at com.icesoft.faces.webapp.http.core.SingleViewServer.service(SingleViewServer.java:52)
      at com.icesoft.faces.webapp.http.common.ServerProxy.service(ServerProxy.java:11)
      at com.icesoft.faces.webapp.http.servlet.MainSessionBoundServlet$4.service(MainSessionBoundServlet.java:114)
      at com.icesoft.faces.webapp.http.common.standard.PathDispatcherServer.service(PathDispatcherServer.java:24)
      at com.icesoft.faces.webapp.http.servlet.MainSessionBoundServlet.service(MainSessionBoundServlet.java:160)
      at com.icesoft.faces.webapp.http.servlet.SessionDispatcher$1.service(SessionDispatcher.java:42)
      at com.icesoft.faces.webapp.http.servlet.JettyAdaptingServlet.service(JettyAdaptingServlet.java:29)
      at com.icesoft.faces.webapp.http.servlet.EnvironmentAdaptingServlet.service(EnvironmentAdaptingServlet.java:63)
      at com.icesoft.faces.webapp.http.servlet.SessionDispatcher.service(SessionDispatcher.java:62)
      at com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:23)
      at com.icesoft.faces.webapp.http.servlet.MainServlet.service(MainServlet.java:153)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
      at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
      at java.lang.Thread.run(Unknown Source)
      1. ELSetPropertiesRule.java
        8 kB
        John Jones
      2. ELSetPropertiesRule.java
        8 kB
        John Jones

        Issue Links

          Activity

          John Jones created issue -
          Hide
          John Jones added a comment -

          It seems there is an easy (albeit dirty) fix for this issue. In the ELSetPropertiesRule class, there is a specific condition to apply expression values a certain way if the object is of type UIComponentTag. UIComponentTag is deprecated and signifies that the object was generated in a 1.1.X JSF environment.

          The object upon which the current code is failing is of type ConverterTag, which is also deprecated and generated from a JSF 1.1.x environment. Code needs to be added so that the ConverterTag subclasses are also handled in a special manner.

          Here is the old line of code to represent checks for old JSF 1.1 values:
          } else if (top instanceof UIComponentTag)

          { //must be a JSF 1.1 tag values.put(name, value); This is all that is needed to fix this issue: }

          else if (top instanceof UIComponentTag || top instanceof ConverterTag) {
          //must be a JSF 1.1 tag
          values.put(name, value);

          Attached would be the new java code...

          Show
          John Jones added a comment - It seems there is an easy (albeit dirty) fix for this issue. In the ELSetPropertiesRule class, there is a specific condition to apply expression values a certain way if the object is of type UIComponentTag. UIComponentTag is deprecated and signifies that the object was generated in a 1.1.X JSF environment. The object upon which the current code is failing is of type ConverterTag, which is also deprecated and generated from a JSF 1.1.x environment. Code needs to be added so that the ConverterTag subclasses are also handled in a special manner. Here is the old line of code to represent checks for old JSF 1.1 values: } else if (top instanceof UIComponentTag) { //must be a JSF 1.1 tag values.put(name, value); This is all that is needed to fix this issue: } else if (top instanceof UIComponentTag || top instanceof ConverterTag) { //must be a JSF 1.1 tag values.put(name, value); Attached would be the new java code...
          John Jones made changes -
          Field Original Value New Value
          Attachment ELSetPropertiesRule.java [ 11779 ]
          Hide
          John Jones added a comment -

          I have added the fix for this in the attached java file. The solution is to handle parsed object values of type ConverterTag (deprecated and only used in SJF 1.1.x) similar to object values of type UIComponentTag.

          Show
          John Jones added a comment - I have added the fix for this in the attached java file. The solution is to handle parsed object values of type ConverterTag (deprecated and only used in SJF 1.1.x) similar to object values of type UIComponentTag.
          Hide
          John Jones added a comment -

          I have come across a similar bug using f:attribute and have created a separate ticket (ICE-4569). The exception and fixes are in the same code lines. Perhaps these can be combined.

          Show
          John Jones added a comment - I have come across a similar bug using f:attribute and have created a separate ticket ( ICE-4569 ). The exception and fixes are in the same code lines. Perhaps these can be combined.
          Ken Fyten made changes -
          Salesforce Case []
          Fix Version/s 1.8.2 [ 10190 ]
          Assignee Priority P1
          Assignee Mark Collette [ mark.collette ]
          Hide
          Mark Collette added a comment -

          I took the JSP component-showcase, and built it for JBoss 4.2, then put the myfaces jars in it. I disabled the JBoss 4.2.2 JSF RI jars, so that only the myfaces ones would be used. I went to the calendar page, which has an ice:outputText component with an f:convertDateTime tag. I did not get any exception in that console or log, and everything seemed to work fine. I also tried it with the JSF 1.1 RI jars on Tomcat 5.5, and that worked fine too. So, I can't reproduce this issue. As well, I'm not sure if it's valid at all to by using MyFaces or a JSF 1.1 implementation in JBoss 4.2.2, since it specifically ships with JSF 1.2 jars.

          Show
          Mark Collette added a comment - I took the JSP component-showcase, and built it for JBoss 4.2, then put the myfaces jars in it. I disabled the JBoss 4.2.2 JSF RI jars, so that only the myfaces ones would be used. I went to the calendar page, which has an ice:outputText component with an f:convertDateTime tag. I did not get any exception in that console or log, and everything seemed to work fine. I also tried it with the JSF 1.1 RI jars on Tomcat 5.5, and that worked fine too. So, I can't reproduce this issue. As well, I'm not sure if it's valid at all to by using MyFaces or a JSF 1.1 implementation in JBoss 4.2.2, since it specifically ships with JSF 1.2 jars.
          Ken Fyten made changes -
          Link This issue is duplicated by ICE-4569 [ ICE-4569 ]
          Hide
          Ted Goddard added a comment -

          Does component-showcase use a convertDateTime converter inside an icefaces component? This problem may be specific to such cases.

          Show
          Ted Goddard added a comment - Does component-showcase use a convertDateTime converter inside an icefaces component? This problem may be specific to such cases.
          Hide
          Mark Collette added a comment -

          In the calendar demonstration page, both the ice:selectInputDate and ice:outputText components make use of f:convertDateTime.

          Show
          Mark Collette added a comment - In the calendar demonstration page, both the ice:selectInputDate and ice:outputText components make use of f:convertDateTime.
          Ken Fyten made changes -
          Status Open [ 1 ] Closed [ 6 ]
          Assignee Priority P1
          Resolution Cannot Reproduce [ 5 ]
          Assignee Mark Collette [ mark.collette ] Ken Fyten [ ken.fyten ]
          Hide
          John Jones added a comment -

          why has this been closed? i can readily reproduce this issue and can upload a test case if anyone would like.

          Show
          John Jones added a comment - why has this been closed? i can readily reproduce this issue and can upload a test case if anyone would like.
          Hide
          Ken Fyten added a comment -

          Please upload a test case. We are unable to reproduce the issue ourselves based on the description.

          Show
          Ken Fyten added a comment - Please upload a test case. We are unable to reproduce the issue ourselves based on the description.
          Ken Fyten made changes -
          Resolution Cannot Reproduce [ 5 ]
          Status Closed [ 6 ] Reopened [ 4 ]
          Hide
          John Jones added a comment -

          We have encountered the same exact error when using validators (i.e. f:validateLongRange). Adding conditional logic to specially handle these tags also fixes the bugs similarly to the others.

          I have attached the latest code that includes all three fixes pertinent to this issue.

          Show
          John Jones added a comment - We have encountered the same exact error when using validators (i.e. f:validateLongRange). Adding conditional logic to specially handle these tags also fixes the bugs similarly to the others. I have attached the latest code that includes all three fixes pertinent to this issue.
          John Jones made changes -
          Attachment ELSetPropertiesRule.java [ 11905 ]
          Hide
          Ken Fyten added a comment -

          John, Thanks for the contributed patches, but we require a test case that readily reproduces this issue as we have been unable to do so. It is possible that you may have a configuration problem that is causing this issue for you..? Please provide the test-case that fails for you, and the specifics on which app. server + version, etc. you are using. Thx.

          Show
          Ken Fyten added a comment - John, Thanks for the contributed patches, but we require a test case that readily reproduces this issue as we have been unable to do so. It is possible that you may have a configuration problem that is causing this issue for you..? Please provide the test-case that fails for you, and the specifics on which app. server + version, etc. you are using. Thx.
          Hide
          Ken Fyten added a comment -

          We have been unable to reproduce these exceptions.

          Show
          Ken Fyten added a comment - We have been unable to reproduce these exceptions.
          Ken Fyten made changes -
          Status Reopened [ 4 ] Closed [ 6 ]
          Resolution Cannot Reproduce [ 5 ]
          Hide
          John Jones added a comment -

          I think I have discovered why we can readily reproduce this and why Ice developers cannot. We having been deploying to JBoss using the "org.jboss.jbossfaces.WAR_BUNDLES_JSF_IMPL" context parameter. We have also left the default RI alone as it comes bundled with JBoss. It seems that both RI and myfaces 1.1 class files are being loaded but the RI classes are taking precedence during parsing of components in the render response phase.

          To be sure, I removed the RI jar files and configuration from the jboss-web-deployer and added in the necessary jar files from myfaces. The defects as I described in this ticket are no longer an issue since the RI is no longer being loaded.

          So the question then remains: Is IceFaces supported using the org.jboss.jbossfaces.WAR_BUNDLES_JSF_IMPL web.xml context parameter? I haven't seen anything in documentation, forums, or deployment guides that suggests that it isn't. There is already a case (ICE-4264) in which a fix was implemented specifically to handle this parameter.

          If the expectation is that IceFaces does support myfaces 1.1 on JBoss 4.2.x with this parameter in a non-modified JBoss environment (still containing RI) then could you please reopen this ticket? If this is reopened, I have a test case ready to attach for all three bugs that I have reported through this case.

          Thanks!

          Show
          John Jones added a comment - I think I have discovered why we can readily reproduce this and why Ice developers cannot. We having been deploying to JBoss using the "org.jboss.jbossfaces.WAR_BUNDLES_JSF_IMPL" context parameter. We have also left the default RI alone as it comes bundled with JBoss. It seems that both RI and myfaces 1.1 class files are being loaded but the RI classes are taking precedence during parsing of components in the render response phase. To be sure, I removed the RI jar files and configuration from the jboss-web-deployer and added in the necessary jar files from myfaces. The defects as I described in this ticket are no longer an issue since the RI is no longer being loaded. So the question then remains: Is IceFaces supported using the org.jboss.jbossfaces.WAR_BUNDLES_JSF_IMPL web.xml context parameter? I haven't seen anything in documentation, forums, or deployment guides that suggests that it isn't. There is already a case ( ICE-4264 ) in which a fix was implemented specifically to handle this parameter. If the expectation is that IceFaces does support myfaces 1.1 on JBoss 4.2.x with this parameter in a non-modified JBoss environment (still containing RI) then could you please reopen this ticket? If this is reopened, I have a test case ready to attach for all three bugs that I have reported through this case. Thanks!
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #19498 Mon Oct 26 12:44:59 MDT 2009 ted.goddard detect additional JSF1.1 tags (ICE-4567)
          Files Changed
          Commit graph MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/webapp/parser/ELSetPropertiesRule.java
          Hide
          Ken Fyten added a comment -

          Now that we understand what's going on here it seems that this should be fixed so that ICEfaces will support the 'org.jboss.jbossfaces.WAR_BUNDLES_JSF_IMPL' web.xml context parameter correctly when both JSF 1.2 and MyFaces 1.1 are present.

          Show
          Ken Fyten added a comment - Now that we understand what's going on here it seems that this should be fixed so that ICEfaces will support the 'org.jboss.jbossfaces.WAR_BUNDLES_JSF_IMPL' web.xml context parameter correctly when both JSF 1.2 and MyFaces 1.1 are present.
          Ken Fyten made changes -
          Resolution Cannot Reproduce [ 5 ]
          Status Closed [ 6 ] Reopened [ 4 ]
          Affects [Compatibility/Configuration]
          Assignee Priority P3
          Assignee Ken Fyten [ ken.fyten ] Ted Goddard [ ted.goddard ]
          Ken Fyten made changes -
          Salesforce Case []
          Fix Version/s 1.8.3 [ 10211 ]
          Fix Version/s 1.8.2 [ 10190 ]
          Hide
          John Jones added a comment -

          Here's the simple test case for the 3 errors associated with this item. thanks!

          Show
          John Jones added a comment - Here's the simple test case for the 3 errors associated with this item. thanks!
          John Jones made changes -
          Attachment IceFacesTestSrc.zip [ 12061 ]
          Hide
          Joanne Bai added a comment -

          Tested f:convertDateTime and f:attribute with success on ICEfaces trunk revision 19507 + JBOSS 4.2.2 + Myfaces 1.1.5

          Test app committed to repo\qa\trunk\Regression\ICE-4567

          Show
          Joanne Bai added a comment - Tested f:convertDateTime and f:attribute with success on ICEfaces trunk revision 19507 + JBOSS 4.2.2 + Myfaces 1.1.5 Test app committed to repo\qa\trunk\Regression\ ICE-4567
          Ken Fyten made changes -
          Status Reopened [ 4 ] Resolved [ 5 ]
          Assignee Priority P3
          Resolution Fixed [ 1 ]
          Assignee Ted Goddard [ ted.goddard ]
          Ken Fyten made changes -
          Fix Version/s 1.8.2-EE-Beta [ 10215 ]
          Ken Fyten made changes -
          Fix Version/s 1.8.2-EE-GA [ 10216 ]
          Ken Fyten made changes -
          Status Resolved [ 5 ] Closed [ 6 ]

            People

            • Assignee:
              Unassigned
              Reporter:
              John Jones
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: