[jboss-user] [EJB 3.0] - Problem with NotEligibleForDirectInvocationException

Manu Osten do-not-reply at jboss.com
Wed Jul 14 14:04:35 EDT 2010


Manu Osten [http://community.jboss.org/people/argonist] created the discussion

"Problem with NotEligibleForDirectInvocationException"

To view the discussion, visit: http://community.jboss.org/message/552602#552602

--------------------------------------------------------------
Hello,

i want to test with JUnits the methods from session-bean, but the invoke to the methods is not working. I have no idea?

Session-Bean "AccountingBean":
@TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)
    @SuppressWarnings("unchecked")
    public Collection<InstitutionType> getInstitutionTypeList() {
        final Query query = manager.createQuery("from InstitutionType");
 
        return (Collection<InstitutionType>) query.getResultList();
    }


Testcase for getInstitutionTypeList()

@Test
    public void testGetInstitutionTypeList() {
        
        if(session == null) {
            System.out.println("session is Null");
        } else {
            System.out.println("session is Not Null");
            System.out.println(session.toString());
        }
        Collection<InstitutionType> typeList = null;
        try {
            typeList = session.getInstitutionTypeList();
        } catch (Exception e) {
            e.printStackTrace();
        }
        Assert.assertNotNull(typeList);
        Assert.assertEquals(typeList.size(), 7);
    }


Error-Message:

DEBUG [main] (ProxyObjectFactory.java:98) - org.jboss.ejb3.proxy.impl.objectfactory.ProxyObjectFactory servicing request for PonteSeam-ear/AccountingBean/remote
DEBUG [main] (MicroSocketClientInvoker.java:253) - SocketClientInvoker[77ff92f5, socket://localhost:3873] constructed
DEBUG [main] (MicroRemoteClientInvoker.java:240) - SocketClientInvoker[77ff92f5, socket://localhost:3873] connecting
DEBUG [main] (MicroSocketClientInvoker.java:735) - Creating semaphore with size 50
DEBUG [main] (MicroRemoteClientInvoker.java:245) - SocketClientInvoker[77ff92f5, socket://localhost:3873] connected
DEBUG [main] (ClientSocketWrapper.java:169) - reset timeout: 0
DEBUG [main] (InvokerRegistry.java:595) - removed SocketClientInvoker[77ff92f5, socket://localhost:3873] from registry
DEBUG [main] (MicroSocketClientInvoker.java:286) - SocketClientInvoker[77ff92f5, socket://localhost:3873] disconnecting ...
DEBUG [main] (SocketWrapper.java:123) - ClientSocketWrapper[Socket[addr=/127.0.0.1,port=3873,localport=45285].b8c3679] closing
DEBUG [main] (SessionProxyObjectFactory.java:130) - Created Proxy of type $Proxy14 for EJB3 Business Interface: de.kirchedlau.ponteseam.sessions.AccountingInterface
lookup 
session is Not Null
Proxy to jboss.j2ee:ear=PonteSeam-ear.ear,jar=PonteSeam-ejb.jar,name=AccountingBean,service=EJB3 implementing [interface de.kirchedlau.ponteseam.sessions.AccountingInterface]
DEBUG [main] (SessionProxyInvocationHandlerBase.java:187) - Couldn't handle invocation directly within org.jboss.ejb3.proxy.impl.handler.session.SessionRemoteProxyInvocationHandler at 5421e554: Current invocation "public abstract java.util.Collection de.kirchedlau.ponteseam.sessions.AccountingInterface.getInstitutionTypeList()" is not eligible for direct handling by org.jboss.ejb3.proxy.impl.handler.session.SessionRemoteProxyInvocationHandler at 5421e554
DEBUG [main] (SecurityAssociation.java:147) - Using ThreadLocal: false
DEBUG [main] (MicroSocketClientInvoker.java:253) - SocketClientInvoker[7e859a68, socket://localhost:3873] constructed
DEBUG [main] (MicroRemoteClientInvoker.java:240) - SocketClientInvoker[7e859a68, socket://localhost:3873] connecting
DEBUG [main] (MicroSocketClientInvoker.java:735) - Creating semaphore with size 50
DEBUG [main] (MicroRemoteClientInvoker.java:245) - SocketClientInvoker[7e859a68, socket://localhost:3873] connected
DEBUG [main] (ClientSocketWrapper.java:169) - reset timeout: 0
java.lang.NullPointerException
    at org.jboss.ejb3.stateless.StatelessContainer.dynamicInvoke(StatelessContainer.java:379)
    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:524)
    at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:232)
    at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:163)
    at org.jboss.remoting.Client.invoke(Client.java:1634)
    at org.jboss.remoting.Client.invoke(Client.java:548)
    at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:62)
    at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
    at org.jboss.aspects.tx.ClientTxPropagationInterceptor.invoke(ClientTxPropagationInterceptor.java:61)
    at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
    at org.jboss.ejb3.security.client.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:65)
    at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
    at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:74)
    at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
    at org.jboss.aspects.remoting.PojiProxy.invoke(PojiProxy.java:61)
    at $Proxy16.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 $Proxy15.getInstitutionTypeList(Unknown Source)
    at de.kirchedlau.ponte.ejb.sessions.AccoutingBeanTest.testGetInstitutionTypeList(AccoutingBeanTest.java:46)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
    at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
    at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
    at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:73)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:46)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:180)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:41)
    at org.junit.runners.ParentRunner$1.evaluate(ParentRunner.java:173)
    at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
    at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:220)
    at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:46)
    at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
    at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:74)
    at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
    at org.jboss.aspects.tx.ClientTxPropagationInterceptor.invoke(ClientTxPropagationInterceptor.java:61)
    at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
    at org.jboss.ejb3.security.client.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:65)
    at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
    at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:74)
    at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
    at org.jboss.aspects.remoting.PojiProxy.invoke(PojiProxy.java:61)
    at $Proxy16.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 $Proxy15.getInstitutionTypeList(Unknown Source)
    at de.kirchedlau.ponte.ejb.sessions.AccoutingBeanTest.testGetInstitutionTypeList(AccoutingBeanTest.java:46)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
    at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
    at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
    at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:73)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:46)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:180)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:41)
    at org.junit.runners.ParentRunner$1.evaluate(ParentRunner.java:173)
    at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
    at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:220)
    at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:46)
    at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
DEBUG [main] (InvokerRegistry.java:595) - removed SocketClientInvoker[7e859a68, socket://localhost:3873] from registry
DEBUG [main] (MicroSocketClientInvoker.java:286) - SocketClientInvoker[7e859a68, socket://localhost:3873] disconnecting ...
DEBUG [main] (SocketWrapper.java:123) - ClientSocketWrapper[Socket[addr=/127.0.0.1,port=3873,localport=45286].37722456] closing



What is wrong?

Manu

--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/552602#552602]

Start a new discussion in EJB 3.0 at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2029]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20100714/5804b3e8/attachment-0001.html 


More information about the jboss-user mailing list