MyFaces Core
  1. MyFaces Core
  2. MYFACES-3535

javax.faces.el.MethodNotFoundException: javax.el.MethodNotFoundException:

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: JSR-314
    • Labels:
      None
    • Environment:
      WebSphere 8.002

      Description

      Application port from from Mojarra / Glassfish 3.1 and JBoss 7.1 to WebSphere 8 using MyFaces. With the Mojarra implementation no problems arise, while with MyFaces almost nothing is running! Class not found exceptions, Method not found exceptions, see log trace, while every thing exist and the difference consist of the jsf implementation used by the AS!

      The method ProjectHandler#generateDocumentContent() exist, and is declared public!
      action="#

      {cc.attrs.handler.generateDocumentContent(cc.attrs.handler.documentId[0])}

      "
      "cc.attrs.handler" is correctly replaced by "ProjectHandler" so the syntax is correct and Myfaces should also be able to find the method:
      public final String generateDocumentContent(final String contentType)

      { ... }

      [02.05.12 08:22:12:382 MESZ] 0000003a FfdcProvider W com.ibm.ws.ffdc.impl.FfdcProvider logIncident FFDC1003I: FFDC Inci
      dent emitted on D:\programs\IBM\WebSphere\AppServer\profiles\AppSrv01\logs\ffdc\server1_3a1fffb_12.05.02_08.22.12.272254
      170309146331495.txt com.ibm.ws.webcontainer.webapp.WebApp.getResourceAsStream 602
      [02.05.12 08:22:12:428 MESZ] 0000003a ErrorPageWrit E An exception occurred
      javax.faces.el.MethodNotFoundException: javax.el.MethodNotFoundException: /resources/ut
      ils/listMenu.xhtml at line 98 and column 72 action="#

      {cc.attrs.handler.generateDocumentContent(cc.attrs.handler.document Id[0])}

      ": Method not found: ch.commcity.monterosa.web.ProjectHandler@39c7d55.generateDocumentContent()
      at javax.faces.component._MethodExpressionToMethodBinding.invoke(_MethodExpressionToMethodBinding.java:92)
      at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:100)
      at javax.faces.component.UICommand.broadcast(UICommand.java:120)
      at javax.faces.component.UIViewRoot._broadcastAll(UIViewRoot.java:973)
      at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:275)
      at javax.faces.component.UIViewRoot._process(UIViewRoot.java:1285)
      at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:711)
      at org.apache.myfaces.lifecycle.InvokeApplicationExecutor.execute(InvokeApplicationExecutor.java:34)
      at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:171)
      at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:189)
      at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1188)
      at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:763)
      at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:454)
      at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:178)
      at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1020)
      at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:87)
      at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:895)
      at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1662)
      at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:195)
      at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:452)
      at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:511)
      at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:305)
      at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:276)
      at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.j
      ava:214)
      at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
      at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
      at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
      at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
      at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
      at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
      at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
      at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
      at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1659)
      Caused by: javax.el.MethodNotFoundException: /resources/utils/listMenu.xhtml at line 98 and column 72 action="#

      {cc.attrs .handler.generateDocumentContent(cc.attrs.handler.documentId[0])}

      ": Method not found: ch.commcity.monterosa.web.ProjectH
      andler@39c7d55.generateDocumentContent()
      at org.apache.myfaces.view.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:91)
      at javax.faces.component._MethodExpressionToMethodBinding.invoke(_MethodExpressionToMethodBinding.java:88)
      ... 33 more

      1. TextLog_12.05.04_11.09.24.log
        170 kB
        Jürg Brandenberger
      2. TextLog_12.05.04_11.09.24.log
        170 kB
        Jürg Brandenberger
      3. TextLog_12.05.04_11.09.24.log
        170 kB
        Jürg Brandenberger

        Activity

        Jürg Brandenberger created issue -
        Hide
        Martin Kočí added a comment -

        Hi, I don't thinks this is a myfaces issue. Method invocations are handled by Expression Language implementation (= implementation of javax.el package). I guess this implementation in different in WebSphere. What version of:
        1) myfaces
        2) EL implementation

        do you use?

        Can you provide a simple test case (bean + xhtml) to reproduce this issue?

        Show
        Martin Kočí added a comment - Hi, I don't thinks this is a myfaces issue. Method invocations are handled by Expression Language implementation (= implementation of javax.el package). I guess this implementation in different in WebSphere. What version of: 1) myfaces 2) EL implementation do you use? Can you provide a simple test case (bean + xhtml) to reproduce this issue?
        Hide
        Martin Marinschek added a comment -

        I am missing some parts of the stacktrace here, where the real action happens (from within the EL implementation). Either Jürg didn't supply this, or we are loosing parts of the stacktrace in TagMethodExpression. I remember Facelets had an issue there with loosing stacktraces, so we might have inherited this down.

        Anyways Martin is totally right, this can only be an issue with the EL implementation, as the instance and the method name have already been resolved: I would guess that this is either a package private or elsehow interesting method, which is found with one EL impl, but not with the other. Could this be, Jürg?

        best regards,

        Martin

        Show
        Martin Marinschek added a comment - I am missing some parts of the stacktrace here, where the real action happens (from within the EL implementation). Either Jürg didn't supply this, or we are loosing parts of the stacktrace in TagMethodExpression. I remember Facelets had an issue there with loosing stacktraces, so we might have inherited this down. Anyways Martin is totally right, this can only be an issue with the EL implementation, as the instance and the method name have already been resolved: I would guess that this is either a package private or elsehow interesting method, which is found with one EL impl, but not with the other. Could this be, Jürg? best regards, Martin
        Hide
        Martin Marinschek added a comment -

        Ah, hold on: it could be that the parameter resolves to null. But even then, the EL implementation should pass it on. Jürg, can you debug and see what the incoming method parameter is?

        handler.generateDocumentContent(cc.attrs.handler.documentId[0])}": Method not found: ch.commcity.monterosa.web.ProjectH
        andler@39c7d55.generateDocumentContent()

        best regards,

        Martin

        Show
        Martin Marinschek added a comment - Ah, hold on: it could be that the parameter resolves to null. But even then, the EL implementation should pass it on. Jürg, can you debug and see what the incoming method parameter is? handler.generateDocumentContent(cc.attrs.handler.documentId [0] )}": Method not found: ch.commcity.monterosa.web.ProjectH andler@39c7d55.generateDocumentContent() best regards, Martin
        Hide
        Martin Marinschek added a comment -

        A P.S.: class not found exceptions are with a high probability not a MyFaces issue, either. But if you post the problems we will certainly try to help you out.

        best regard,

        Martin

        Show
        Martin Marinschek added a comment - A P.S.: class not found exceptions are with a high probability not a MyFaces issue, either. But if you post the problems we will certainly try to help you out. best regard, Martin
        Jürg Brandenberger made changes -
        Field Original Value New Value
        Attachment TextLog_12.05.04_11.09.24.log [ 12525586 ]
        Jürg Brandenberger made changes -
        Attachment TextLog_12.05.04_11.09.24.log [ 12525591 ]
        Hide
        Jürg Brandenberger added a comment -

        At first thanks for looking at the case.
        Please remember the application under test is running on Glassfish 3.1, Jboss 7.1 and Weblogic 12c without any problem of course those servers use the mojarra implementation of JSF2. Now, the application must run on WebSpere 8.x too. Actually exactly on 8.002 / 8.003. WAS us MyFaces instead of mojarra.
        In the shown case, a list of projects is shown in a table. As long, as no project has stakeholders assigned, the list is rendered and displayed. But if Stakeholders are assigned, the following code snippet applies:
        <h:column>
        <f:facet name="header">#

        {webText.project_stakeholders}

        </f:facet>
        <h:panelGroup id="short_sh" class="stakeholderTab" layout="block">
        #

        {(proj.stakeholders.size() gt 0) ? proj.stakeholders.get(0).fullName : null}

        <br />
        #

        {(proj.stakeholders.size() gt 1) ? proj.stakeholders.get(1).fullName : null}

        </h:panelGroup>
        </h:column>
        I.e. at most to names are displayed per row. This throws the following NoSuchMethodException.
        [04.05.12 11:38:19:454 MESZ] 00000044 FaceletViewDe E Error Rendering View[/pages/lists/projects.xhtml] javax.el.ELException: /pages/lists/projects.xhtml: java.lang.NoSuchMethodException: org .apache.openjpa.util.java$util$ArrayList$proxy.get(java.lang.Long)
        From a list we read out either index 0 or 1, by doing list.get(0), or list.get(1). However MyFaces tries to do list.get(java.lang.Long), which of course is not defined by the java language and hence provokes the mentioned Exception. The same I observed in a similar way with String.substring(int,int) see Issue MYFACES-3533! Those issues are showstoppers for the project, so to have a work around quickly is very important.

        Show
        Jürg Brandenberger added a comment - At first thanks for looking at the case. Please remember the application under test is running on Glassfish 3.1, Jboss 7.1 and Weblogic 12c without any problem of course those servers use the mojarra implementation of JSF2. Now, the application must run on WebSpere 8.x too. Actually exactly on 8.002 / 8.003. WAS us MyFaces instead of mojarra. In the shown case, a list of projects is shown in a table. As long, as no project has stakeholders assigned, the list is rendered and displayed. But if Stakeholders are assigned, the following code snippet applies: <h:column> <f:facet name="header"># {webText.project_stakeholders} </f:facet> <h:panelGroup id="short_sh" class="stakeholderTab" layout="block"> # {(proj.stakeholders.size() gt 0) ? proj.stakeholders.get(0).fullName : null} <br /> # {(proj.stakeholders.size() gt 1) ? proj.stakeholders.get(1).fullName : null} </h:panelGroup> </h:column> I.e. at most to names are displayed per row. This throws the following NoSuchMethodException. [04.05.12 11:38:19:454 MESZ] 00000044 FaceletViewDe E Error Rendering View [/pages/lists/projects.xhtml] javax.el.ELException: /pages/lists/projects.xhtml: java.lang.NoSuchMethodException: org .apache.openjpa.util.java$util$ArrayList$proxy.get(java.lang.Long) From a list we read out either index 0 or 1, by doing list.get(0), or list.get(1). However MyFaces tries to do list.get(java.lang.Long), which of course is not defined by the java language and hence provokes the mentioned Exception. The same I observed in a similar way with String.substring(int,int) see Issue MYFACES-3533 ! Those issues are showstoppers for the project, so to have a work around quickly is very important.
        Jürg Brandenberger made changes -
        Attachment TextLog_12.05.04_11.09.24.log [ 12525592 ]
        Hide
        Jürg Brandenberger added a comment -

        Please remove two of the attachments. The content of all of them is identical. They are 3 by accident! Sorry.

        Show
        Jürg Brandenberger added a comment - Please remove two of the attachments. The content of all of them is identical. They are 3 by accident! Sorry.
        Hide
        Martin Kočí added a comment -

        Hi, this is Expression Language feature, not myfaces. All String #

        { ... }

        are instances of javax.el.ValueExpression and resolving this expression is outside myfaces. I guess you are able to reproduce this issue with simple

        #

        {proj.stakeholders.get(0)}

        without any component, right? It seems that EL creates from "0" a java.util.Lang (that is correct) but does not perform coertion from Long -> Integer . Same reason for MYFACES-3533.

        I'm no expert for WAS, but log shows that WAS uses simply tomcat as web container and therefore org.apache.el implementation. Please try to locate jasper-el.jar in WAS instalation and provide Implementation-Version: form MANIFEST.MF . Please join IRC #myfaces if you need some operative help

        Show
        Martin Kočí added a comment - Hi, this is Expression Language feature, not myfaces. All String # { ... } are instances of javax.el.ValueExpression and resolving this expression is outside myfaces. I guess you are able to reproduce this issue with simple # {proj.stakeholders.get(0)} without any component, right? It seems that EL creates from "0" a java.util.Lang (that is correct) but does not perform coertion from Long -> Integer . Same reason for MYFACES-3533 . I'm no expert for WAS, but log shows that WAS uses simply tomcat as web container and therefore org.apache.el implementation. Please try to locate jasper-el.jar in WAS instalation and provide Implementation-Version: form MANIFEST.MF . Please join IRC #myfaces if you need some operative help
        Hide
        Martin Kočí added a comment -

        I this this is cause of the problems: https://issues.apache.org/bugzilla/show_bug.cgi?id=50790

        Show
        Martin Kočí added a comment - I this this is cause of the problems: https://issues.apache.org/bugzilla/show_bug.cgi?id=50790
        Hide
        Jürg Brandenberger added a comment -

        w.r.t. #

        {proj.stakeholders.get(0)}

        : yes of course, it’s the same.
        I don’t know, but it can very well be an EL issue!
        w.r.t. jasper-el.jar, this is not as simple! I found within the plugin directory of WAS a javax.j2ee.el.jar with a version of 2.2.0 from December 11. But I’m not sure if this jar is used for running applications. Within lib, there is another j2ee.jar, which includes javax.el classes, but no version. I think this one is used, but I may be wrong. The only hint with regard to version, both are from December 11.
        W.r.t Tomcat, It seems not to be exactly the same issue. Tomcat had an issue with regard to string. In my case, we have #

        {proj.stakeholders.get(0).fullNamel}

        , which returns a string, but isn’t one. I’ll try to get an answer from IBM.

        Show
        Jürg Brandenberger added a comment - w.r.t. # {proj.stakeholders.get(0)} : yes of course, it’s the same. I don’t know, but it can very well be an EL issue! w.r.t. jasper-el.jar, this is not as simple! I found within the plugin directory of WAS a javax.j2ee.el.jar with a version of 2.2.0 from December 11. But I’m not sure if this jar is used for running applications. Within lib, there is another j2ee.jar, which includes javax.el classes, but no version. I think this one is used, but I may be wrong. The only hint with regard to version, both are from December 11. W.r.t Tomcat, It seems not to be exactly the same issue. Tomcat had an issue with regard to string. In my case, we have # {proj.stakeholders.get(0).fullNamel} , which returns a string, but isn’t one. I’ll try to get an answer from IBM.
        Hide
        Paul Nicolucci added a comment -

        Have you tried this on WAS8.0.0.3 as well?

        Show
        Paul Nicolucci added a comment - Have you tried this on WAS8.0.0.3 as well?
        Hide
        Jürg Brandenberger added a comment -

        yes, the same! But on an other computer with other additional problems, probabely due to not yet resolved configuration problems. I'm working on both in parallel!

        Show
        Jürg Brandenberger added a comment - yes, the same! But on an other computer with other additional problems, probabely due to not yet resolved configuration problems. I'm working on both in parallel!
        Hide
        Jürg Brandenberger added a comment -

        I must correct my last entry. The problem is gone on WAS-8.0.0.3! Now it works, as it should! I upgraded the 8.0.0.2 server to the new version and it worked. The correction of the configuration problem on the other 8.0.0.3 Server is still left, but this would be an easy one!
        Thanks for the moral support. This was as important as any other valuable hint.

        Show
        Jürg Brandenberger added a comment - I must correct my last entry. The problem is gone on WAS-8.0.0.3! Now it works, as it should! I upgraded the 8.0.0.2 server to the new version and it worked. The correction of the configuration problem on the other 8.0.0.3 Server is still left, but this would be an easy one! Thanks for the moral support. This was as important as any other valuable hint.
        Hide
        Jürg Brandenberger added a comment -

        This can be considered as closed. It seems, it was an EL-Issue on WAS 8.0.02, which has been corrected on WAS 8.0.0.3!

        Show
        Jürg Brandenberger added a comment - This can be considered as closed. It seems, it was an EL-Issue on WAS 8.0.02, which has been corrected on WAS 8.0.0.3!
        Jürg Brandenberger made changes -
        Status Open [ 1 ] Closed [ 6 ]
        Resolution Fixed [ 1 ]

          People

          • Assignee:
            Unassigned
            Reporter:
            Jürg Brandenberger
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development