ICEfaces
  1. ICEfaces
  2. ICE-4569

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

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Duplicate
    • Affects Version/s: 1.8.1
    • Fix Version/s: 1.8.2
    • Component/s: Framework
    • Labels:
      None
    • Environment:
      Windows XP, JBOSS 4.2.2, Icefaces 1.8.1, Myfaces 1.1.5

      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)

        Issue Links

          Activity

          Hide
          John Jones added a comment -

          This bug is very similar to the one identified in (ICE-4567). NoSuchMethodException is generated when an attribute tag is used within an icefaces component. An apparent fix is to handle any object that is an instance of the deprecated (only valid in JSF 1.1) javax.faces.webapp.AttributeTag separately in the logic. The new code then looks like:

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

          This is getting pretty tedious that all the 1.1 classes need to be specifically handled. I'm sure there is more that have been missed. It would have been nice if there were a "master switch" to determine the runtime JSF implementation rather than guess at the deprecated class names. Because there is no master switch, it looks more and more that JSF 1.1 is really not supported by these latest Icefaces releases.

          Show
          John Jones added a comment - This bug is very similar to the one identified in ( ICE-4567 ). NoSuchMethodException is generated when an attribute tag is used within an icefaces component. An apparent fix is to handle any object that is an instance of the deprecated (only valid in JSF 1.1) javax.faces.webapp.AttributeTag separately in the logic. The new code then looks like: } else if (top instanceof UIComponentTag || top instanceof ConverterTag || top instanceof AttributeTag) { //must be a JSF 1.1 tag values.put(name, value); This is getting pretty tedious that all the 1.1 classes need to be specifically handled. I'm sure there is more that have been missed. It would have been nice if there were a "master switch" to determine the runtime JSF implementation rather than guess at the deprecated class names. Because there is no master switch, it looks more and more that JSF 1.1 is really not supported by these latest Icefaces releases.
          Hide
          John Jones added a comment -

          Attached is the potential fix for this. It's not pretty but it's similar to the initial solution which handled the deprecated UIComponentTag separately in the code. The problem is that it still doesn't guarantee the handling of all objects created via a 1.1 JSF implementation.

          Show
          John Jones added a comment - Attached is the potential fix for this. It's not pretty but it's similar to the initial solution which handled the deprecated UIComponentTag separately in the code. The problem is that it still doesn't guarantee the handling of all objects created via a 1.1 JSF implementation.
          Hide
          Mark Collette added a comment -

          Why has this duplicate of ICE-4567 been made, instead of just adding to the existing Jira?

          Show
          Mark Collette added a comment - Why has this duplicate of ICE-4567 been made, instead of just adding to the existing Jira?

            People

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

              Dates

              • Created:
                Updated:
                Resolved: