11 Replies Latest reply on Jul 21, 2010 5:45 PM by Manu Osten

    Problem with NotEligibleForDirectInvocationException

    Manu Osten Apprentice

      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@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@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

        • 1. Re: Problem with NotEligibleForDirectInvocationException
          Manu Osten Apprentice

          Have you no idea? your posting would help me.

           

          Manu

          • 2. Re: Problem with NotEligibleForDirectInvocationException
            jaikiran pai Master
             typeList = session.getInstitutionTypeList();
            

             

             

            How do you get the "session" object? Also are you sure that your client side classpath has the same jars/classes of your bean interfaces, as that on the server?

            • 3. Re: Problem with NotEligibleForDirectInvocationException
              Manu Osten Apprentice

              Hello,

               

              "session" object:

               

              static EJBHandler ejbHandler;
                  static AccountingInterface session;
                  static AuthInterface authsession;
              
                  @BeforeClass
                  public static void setUpBeforeClass() throws Exception {
              //        ExecuteMySQLScripts executeScripts = new ExecuteMySQLScripts();
              //        executeScripts.executeMySQLScripts();
                      ejbHandler = new EJBHandler();
                      session = ejbHandler.accoutingsession;
                      authsession = ejbHandler.authSession;
                  }

               

               

              EJBHandler

               

              package de.kirchedlau.ponte.utils.sessions;
              
              import javax.naming.Context;
              import javax.naming.InitialContext;
              import javax.naming.NamingException;
              
              import com.sun.corba.se.impl.javax.rmi.PortableRemoteObject;
              
              import de.kirchedlau.ponteseam.sessions.AccountingInterface;
              import de.kirchedlau.ponteseam.sessions.AuthInterface;
              import de.kirchedlau.ponteseam.sessions.ContentInterface;
              import de.kirchedlau.ponteseam.sessions.MailInterface;
              import de.kirchedlau.ponteseam.sessions.RequestInterface;
              
              public class EJBHandler {
                  
                  Context jndiContext = null;
                  public ContentInterface contentSession = null;
                  public RequestInterface requestSession = null;
                  public AuthInterface authSession = null;
                  public MailInterface mailsession = null;
                  public AccountingInterface accoutingsession = null;
                  
                  public EJBHandler() {
                      setContext();
                      contentSession = new SessionFinder<ContentInterface>().getRef("PonteSeam-ear/ContentBean/remote", ContentInterface.class);
                      requestSession = new SessionFinder<RequestInterface>().getRef("PonteSeam-ear/RequestBean/remote", RequestInterface.class);
                      authSession = new SessionFinder<AuthInterface>().getRef("PonteSeam-ear/AuthBean/remote", AuthInterface.class);
                      mailsession = new SessionFinder<MailInterface>().getRef("PonteSeam-ear/MailBean/remote",MailInterface.class);
                      accoutingsession = new SessionFinder<AccountingInterface>().getRef("PonteSeam-ear/AccountingBean/remote",AccountingInterface.class);
                  }
                  
                  private void setContext()
                  {
                      try {
                          jndiContext = new InitialContext();
                          
                      } catch (NamingException e) {
                          e.printStackTrace();
                      }
                  }
                      
                  // T: SessionBean Interface
                  public class SessionFinder<T>
                  {
              
                      @SuppressWarnings("unchecked")
                      public T getRef(String className, Class classOfT){
                          try {
                              Object ref1 = jndiContext.lookup(className);
                              T session =  (T) new PortableRemoteObject().narrow( ref1, classOfT);
                              return session;
                          } catch (NamingException e) {
                              e.printStackTrace();
                          }
                          return null;
                      }        
                  }
              }
              

               

               

              I think that classpath is right.

              • 4. Re: Problem with NotEligibleForDirectInvocationException
                jaikiran pai Master

                Sorry, I forgot about this thread. Were you able to get past this issue?

                • 5. Re: Problem with NotEligibleForDirectInvocationException
                  Manu Osten Apprentice

                  I thought, you cannot help me.   ok. I have still problem and dont know why.

                   

                   

                  Manu

                  • 6. Re: Problem with NotEligibleForDirectInvocationException
                    jaikiran pai Master

                    Which exact version of JBoss AS is this? And since this is EJB3, you don't have to do PortableRemoteObject.narrow:

                     

                     

                     Object ref1 = jndiContext.lookup(className);
                                    T session =  (T) new PortableRemoteObject().narrow( ref1, classOfT);
                                    return session;
                    
                    
                    

                     

                     

                    Change that to directly return the object that was looked up. Also please post the relevant EJB3 code/configs.

                    • 7. Re: Problem with NotEligibleForDirectInvocationException
                      Manu Osten Apprentice

                      hmmm. I try to start without PortableRemoteObject.narrow. It is not working.

                       

                      error message:

                       

                       

                      java.lang.ClassCastException: javax.naming.Reference cannot be cast to de.kirchedlau.ponteseam.sessions.ContentInterface
                          at de.kirchedlau.ponte.utils.sessions.EJBHandler.<init>(EJBHandler.java:26)
                          at de.kirchedlau.ponte.ejb.sessions.AccoutingBeanTest.setUpBeforeClass(AccoutingBeanTest.java:30)
                          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                       

                       

                       

                      ok with relevant EJB-Code:

                       

                      JUnit-Class (AccountingBeanTest):

                       

                      static EJBHandler ejbHandler;
                          static AccountingInterface session;
                          static AuthInterface authsession;
                      
                          @BeforeClass
                          public static void setUpBeforeClass() throws Exception {
                              ejbHandler = new EJBHandler();
                              session = ejbHandler.accoutingsession;
                          }
                      
                          @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);
                          }
                      
                      

                       

                      statless Bean (AccountingBean)

                       

                       

                      @Name("accountingBean")
                      @Stateless
                      public class AccountingBean implements AccountingInterface {
                      
                          @PersistenceContext(unitName = "PonteSeam")
                          private EntityManager manager;
                          
                          @Resource
                          SessionContext context;
                      
                          @TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)
                          @SuppressWarnings("unchecked")
                          public Collection<InstitutionType> getInstitutionTypeList() {
                              final Query query = manager.createQuery("from InstitutionType");
                      
                              return (Collection<InstitutionType>) query.getResultList();
                          }
                      

                       

                      Interface:

                      @Remote
                      public interface AccountingInterface {
                          
                          // InstitutionTypes
                          public Collection<InstitutionType> getInstitutionTypeList();

                       

                       

                      Calling EJB-Beans from war-files with same EJBHandler is working, but from JUnit not.

                       

                      Manu

                      • 8. Re: Problem with NotEligibleForDirectInvocationException
                        jaikiran pai Master
                        java.lang.ClassCastException: javax.naming.Reference cannot be cast to de.kirchedlau.ponteseam.sessions.ContentInterface
                        
                        
                        
                        

                         

                        Looks like you are missing the jbossall-client.jar (and the other jars that are referenced in its META-INF/MANIFEST.MF file) from the JUnit classpath. Those jars are available in JBOSS_HOME/client folder. Add them to the client classpath of your JUnit test.

                        • 9. Re: Problem with NotEligibleForDirectInvocationException
                          Manu Osten Apprentice

                          Now I solved the problem with PortableRemoteObject.narrow. : ) I added the classpath to jars in JBOSS_HOME/client folder.

                           

                          But I have still problem from 1. posting.

                          • 10. Re: Problem with NotEligibleForDirectInvocationException
                            Manu Osten Apprentice

                            I tried to use another way to test. I started a normal client-application to get the data via EJB from DB. Same problem...

                             

                            Client-application:

                             

                            package de.kirchedlau.ponte.ejb.clients;
                            
                            import java.util.Collection;
                            
                            import javax.naming.InitialContext;
                            import javax.naming.NameClassPair;
                            import javax.naming.NamingEnumeration;
                            import javax.naming.NamingException;
                            
                            import de.kirchedlau.ponte.utils.sessions.EJBHandler;
                            import de.kirchedlau.ponteseam.entities.InstitutionType;
                            import de.kirchedlau.ponteseam.sessions.AccountingInterface;
                            
                            public class MeinJndiContext {
                                
                                public static void main(String[] args) throws NamingException {
                                    InitialContext ctx = new InitialContext();
                                    System.out.println("Liste der Namen im JNDI-Context:");
                                    showJndiContext(ctx, "", "");
                                    ctx.close();
                                    EJBHandler ejbHandler = new EJBHandler();
                                    AccountingInterface session = ejbHandler.accoutingsession;
                                    Collection<InstitutionType> list = session.getInstitutionTypeList();
                                    for(InstitutionType i : list) {
                                        System.out.println(i.getInstitutionType());
                                    }
                                }
                            
                                @SuppressWarnings("unchecked")
                                public static void showJndiContext(InitialContext ctx, String name, String space) {
                                    if (null == name)
                                        name = "";
                                    if (null == space)
                                        space = "";
                                    try {
                                        NamingEnumeration en = ctx.list(name);
                                        while (en != null && en.hasMoreElements()) {
                                            String delim = (null != name && 0 < name.length()) ? "/" : "";
                                            NameClassPair nc = (NameClassPair) en.next();
                                            System.out.println(space +  name + delim + nc);
                                            if (40 > space.length())
                                                showJndiContext(ctx, nc.getName(), "    " + space);
                                        }
                                    } catch (javax.naming.NamingException ex) {
                            //            System.out.println("Exception "+ ex);
                                    }
                                }
                            }
                            

                             

                             

                            Error message:

                             

                            Liste der Namen im JNDI-Context:
                            UserTransactionSessionFactory: $Proxy340
                            UUIDKeyGeneratorFactory: org.jboss.ejb.plugins.keygenerator.uuid.UUIDKeyGeneratorFactory
                            SecureManagementView: org.jnp.interfaces.NamingContext
                                SecureManagementView/remote-org.jboss.deployers.spi.management.ManagementView: Proxy for: org.jboss.deployers.spi.management.ManagementView
                                SecureManagementView/remote: Proxy for: org.jboss.deployers.spi.management.ManagementView
                            SecureDeploymentManager: org.jnp.interfaces.NamingContext
                                SecureDeploymentManager/remote-org.jboss.deployers.spi.management.deploy.DeploymentManager: Proxy for: org.jboss.deployers.spi.management.deploy.DeploymentManager
                                SecureDeploymentManager/remote: Proxy for: org.jboss.deployers.spi.management.deploy.DeploymentManager
                            HiLoKeyGeneratorFactory: org.jboss.ejb.plugins.keygenerator.hilo.HiLoKeyGeneratorFactory
                            persistence.unit:unitName=PonteSeam-ear.ear: org.jnp.interfaces.NamingContext
                                persistence.unit:unitName=PonteSeam-ear.ear/PonteSeam-ejb.jar#PonteSeam: org.hibernate.impl.SessionFactoryImpl
                            XAConnectionFactory: org.jboss.jms.client.JBossConnectionFactory
                            topic: org.jnp.interfaces.NamingContext
                            ClusteredConnectionFactory: org.jboss.jms.client.JBossConnectionFactory
                            ProfileService: org.jboss.aop.generatedproxies.AOPProxy$2
                            SecureProfileService: org.jnp.interfaces.NamingContext
                                SecureProfileService/remote: Proxy for: org.jboss.profileservice.spi.ProfileService
                                SecureProfileService/remote-org.jboss.profileservice.spi.ProfileService: Proxy for: org.jboss.profileservice.spi.ProfileService
                            PonteSeam-ear: org.jnp.interfaces.NamingContext
                                PonteSeam-ear/RequestBean: org.jnp.interfaces.NamingContext
                                PonteSeam-ear/TimerServiceDispatcher: org.jnp.interfaces.NamingContext
                                PonteSeam-ear/AuthBean: org.jnp.interfaces.NamingContext
                                PonteSeam-ear/MailBean: org.jnp.interfaces.NamingContext
                                PonteSeam-ear/AccountingBean: org.jnp.interfaces.NamingContext
                                PonteSeam-ear/ContentBean: org.jnp.interfaces.NamingContext
                                PonteSeam-ear/EjbSynchronizations: org.jnp.interfaces.NamingContext
                            queue: org.jnp.interfaces.NamingContext
                                queue/DLQ: org.jboss.jms.destination.JBossQueue
                                queue/ExpiryQueue: org.jboss.jms.destination.JBossQueue
                            ClusteredXAConnectionFactory: org.jboss.jms.client.JBossConnectionFactory
                            UserTransaction: org.jboss.tm.usertx.client.ClientUserTransaction
                            ConnectionFactory: org.jboss.jms.client.JBossConnectionFactory
                            jmx: org.jnp.interfaces.NamingContext
                                jmx/invoker: org.jnp.interfaces.NamingContext
                                jmx/rmi: org.jnp.interfaces.NamingContext
                            TomcatAuthenticators: java.util.Properties
                            console: org.jnp.interfaces.NamingContext
                                console/PluginManager: $Proxy335
                            {jnp.parsedName=, java.naming.provider.url=localhost:1099, java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces, jnp.socket.Factory=org.jnp.interfaces.TimedSocketFactory}
                            Exception in thread "main" 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:67)
                                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 $Proxy11.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 $Proxy10.getInstitutionTypeList(Unknown Source)
                                at de.kirchedlau.ponte.ejb.clients.MeinJndiContext.main(MeinJndiContext.java:23)
                                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:67)
                                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 $Proxy11.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 $Proxy10.getInstitutionTypeList(Unknown Source)
                                at de.kirchedlau.ponte.ejb.clients.MeinJndiContext.main(MeinJndiContext.java:23)
                            

                             

                            hmmm....

                            • 11. Re: Problem with NotEligibleForDirectInvocationException
                              Manu Osten Apprentice

                              I tried to copy the client-application from ear-project with seam-feature to normal jar-project and to start. It's working!! Problem was seam-feature, so I should solve that. In background, the old projects (jar and war) are migrated in new ear-project with seam-feature, so I got some problem like in 1. posting.