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

Manu Osten do-not-reply at jboss.com
Wed Jul 21 17:27:25 EDT 2010


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

"Problem with NotEligibleForDirectInvocationException"

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

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

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

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

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/20100721/42d256f3/attachment-0001.html 


More information about the jboss-user mailing list