EJB 3.0
  1. EJB 3.0
  2. EJBTHREE-1994

ServiceContainer.dynamicInvoke can lead to NPE

    Details

    • Type: Bug Bug
    • Status: Open Open (View Workflow)
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: Plugin 1.0.19, EJB3_1 1.0.1
    • Fix Version/s: None
    • Component/s: core
    • Labels:
      None
    • Similar Issues:
      Show 10 results 

      Description

      When a method is not present, the ServiceContainer.dynamicInvoke leads to NPE:

      java.lang.NullPointerException
      at org.jboss.ejb3.service.ServiceContainer.dynamicInvoke(ServiceContainer.java:477)
      at org.jboss.ejb3.session.InvokableContextClassProxyHack._dynamicInvoke(InvokableContextClassProxyHack.java:53)
      at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:91)
      at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:82)
      at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:891)
      at org.jboss.remoting.transport.socket.ServerThread.completeInvocation(ServerThread.java:744)
      at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:697)
      at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:551)
      at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:232)
      at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:211)
      at org.jboss.remoting.Client.invoke(Client.java:1724)
      at org.jboss.remoting.Client.invoke(Client.java:629)
      at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:60)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
      at org.jboss.aspects.tx.ClientTxPropagationInterceptor.invoke(ClientTxPropagationInterceptor.java:61)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
      at org.jboss.ejb3.security.client.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:65)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
      at rte.gsr.app.jboss.ClientIntercepteur.invoke(ClientIntercepteur.java:114)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
      at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:74)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
      at org.jboss.aspects.remoting.PojiProxy.invoke(PojiProxy.java:62)
      at $Proxy3.invoke(Unknown Source)
      at org.jboss.ejb3.proxy.impl.handler.session.SessionProxyInvocationHandlerBase.invoke(SessionProxyInvocationHandlerBase.java:207)
      at org.jboss.ejb3.proxy.impl.handler.session.SessionProxyInvocationHandlerBase.invoke(SessionProxyInvocationHandlerBase.java:164)
      at $Proxy2.toto(Unknown Source)

      Looking at the other containers (like StatelessContainer) they too can lead to such a NPE. The containers need to throw NoSuchMethodError or something more meaningful in the absence of a method.

        Activity

        Hide
        Andrew Rubinger
        added a comment -

        I'd instead opt for one of our own "MethodNotPresentException extends RuntimeException"-type thing. NoSuchMethodError is a LinkageError type:

        "Normally, this error is caught by the compiler; this error can only occur at run time if the definition of a class has incompatibly changed."

        Show
        Andrew Rubinger
        added a comment - I'd instead opt for one of our own "MethodNotPresentException extends RuntimeException"-type thing. NoSuchMethodError is a LinkageError type: "Normally, this error is caught by the compiler; this error can only occur at run time if the definition of a class has incompatibly changed."
        Hide
        jaikiran pai
        added a comment -
        Show
        jaikiran pai
        added a comment - Related issue http://community.jboss.org/message/540691#540691

          People

          • Assignee:
            jaikiran pai
            Reporter:
            jaikiran pai
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: