[jboss-jira] [JBoss JIRA] Commented: (EJBTHREE-1994) ServiceContainer.dynamicInvoke can lead to NPE

Andrew Lee Rubinger (JIRA) jira-events at lists.jboss.org
Thu Jan 21 09:04:19 EST 2010


    [ https://jira.jboss.org/jira/browse/EJBTHREE-1994?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12507503#action_12507503 ] 

Andrew Lee Rubinger commented on EJBTHREE-1994:
-----------------------------------------------

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."

> ServiceContainer.dynamicInvoke can lead to NPE
> ----------------------------------------------
>
>                 Key: EJBTHREE-1994
>                 URL: https://jira.jboss.org/jira/browse/EJBTHREE-1994
>             Project: EJB 3.0
>          Issue Type: Bug
>          Components: core
>    Affects Versions: EJB3_1 1.0.1, Plugin 1.0.19
>            Reporter: jaikiran pai
>            Assignee: jaikiran pai
>
> 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.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list