users@glassfish.java.net

jndi lookup of an ejb : problem while doing this from a LifeCycleListener

From: <glassfish_at_javadesktop.org>
Date: Thu, 27 Sep 2007 06:33:13 PDT

Hello,

First of all, thanks to the people who replied to my previous posts. I didn't answer since I don't have anything to add to this for the moment.

My problem concerns an ejb lookup from a lifeCycleListener.

I'm using the following code after the READY_EVENT :

InitialContext ictx = event.getLifecycleEventContext().getInitialContext() ;
IConsumerSession myBean= (IConsumerSession)ictx.lookup("beanName") ;
myBean.doSomething() ;

I'm able to call successfully my ejb from a standalone client. I've tried some other things (new initialContext, different bean declarations concerning the jndi scope of the bean...) but it didn't help. I can see my ejb correctly defined at the root of my jndi tree.

What I'm getting here are some corba insults that I really don't understand :

[#|2007-09-27T15:08:13.078+0200|WARNING|sun-appserver9.1|javax.enterprise.resource.corba.ee._CORBA_.util|_ThreadID=16;_ThreadName=pool-1-thread-4;_RequestID=c907db0f-dd4a-40d1-9bfa-a3fff6d1c2bf;|"IOP01211405: (BAD_OPERATION) Exception in loadStub"
org.omg.CORBA.BAD_OPERATION: vmcid: SUN minor code: 1405 completed: No
        at com.sun.corba.ee.impl.logging.UtilSystemException.exceptionInLoadStub(UtilSystemException.java:179)
        at com.sun.corba.ee.impl.logging.UtilSystemException.exceptionInLoadStub(UtilSystemException.java:197)
        at com.sun.corba.ee.impl.util.Utility.loadStub(Utility.java:827)
        at com.sun.corba.ee.impl.javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:219)
        at javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:137)
        at com.sun.ejb.EJBUtils.lookupRemote30BusinessObject(EJBUtils.java:324)
        at com.sun.ejb.containers.RemoteBusinessObjectFactory.getObjectInstance(RemoteBusinessObjectFactory.java:61)
        at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
        at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:320)
        at javax.naming.InitialContext.lookup(InitialContext.java:392)
        at com.gemalto.sandbox.jee.listener.QueuesLifeCycleListener.handleEvent(QueuesLifeCycleListener.java:88)
        at com.sun.appserv.server.ServerLifecycleModule.postEvent(ServerLifecycleModule.java:210)
        at com.sun.appserv.server.ServerLifecycleModule.onReady(ServerLifecycleModule.java:256)
        at com.sun.appserv.server.LifecycleModuleService$onReadyCaller.doRun(LifecycleModuleService.java:282)
        at com.sun.appserv.management.util.misc.RunnableBase.runSync(RunnableBase.java:283)
        at com.sun.appserv.management.util.misc.RunnableBase.run(RunnableBase.java:317)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
        at java.lang.Thread.run(Thread.java:619)
Caused by: org.omg.CORBA.BAD_OPERATION: vmcid: SUN minor code: 235 completed: Maybe
        at com.sun.corba.ee.impl.logging.ORBUtilSystemException.classNotFound3(ORBUtilSystemException.java:786)
        at com.sun.corba.ee.impl.presentation.rmi.StubFactoryFactoryDynamicBase.createStubFactory(StubFactoryFactoryDynamicBase.java:45)
        at com.sun.corba.ee.impl.util.Utility.loadStub(Utility.java:820)
        ... 19 more
Caused by: java.lang.ClassNotFoundException: com.sun.ejb.codegen.GenericEJBHome_Generated
        at com.sun.appserv.server.util.ASURLClassLoader.loadClass(ASURLClassLoader.java:116)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
        at com.sun.corba.ee.impl.util.JDKBridge.loadClass(JDKBridge.java:75)
        at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.loadClass(Util.java:630)
        at com.sun.corba.ee.impl.presentation.rmi.StubFactoryFactoryDynamicBase.createStubFactory(StubFactoryFactoryDynamicBase.java:43)
        ... 20 more
|#]

[#|2007-09-27T15:08:13.094+0200|WARNING|sun-appserver9.1|javax.enterprise.system.stream.err|_ThreadID=16;_ThreadName=pool-1-thread-4;_RequestID=c907db0f-dd4a-40d1-9bfa-a3fff6d1c2bf;|javax.naming.NamingException: ejb ref resolution error for remote business interfacecom.gemalto.sandbox.jee.timedsession.IConsumerSession [Root exception is java.lang.NullPointerException]
        at com.sun.ejb.EJBUtils.lookupRemote30BusinessObject(EJBUtils.java:348)
        at com.sun.ejb.containers.RemoteBusinessObjectFactory.getObjectInstance(RemoteBusinessObjectFactory.java:61)
        at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
        at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:320)
        at javax.naming.InitialContext.lookup(InitialContext.java:392)
        at com.gemalto.sandbox.jee.listener.QueuesLifeCycleListener.handleEvent(QueuesLifeCycleListener.java:88)
        at com.sun.appserv.server.ServerLifecycleModule.postEvent(ServerLifecycleModule.java:210)
        at com.sun.appserv.server.ServerLifecycleModule.onReady(ServerLifecycleModule.java:256)
        at com.sun.appserv.server.LifecycleModuleService$onReadyCaller.doRun(LifecycleModuleService.java:282)
        at com.sun.appserv.management.util.misc.RunnableBase.runSync(RunnableBase.java:283)
        at com.sun.appserv.management.util.misc.RunnableBase.run(RunnableBase.java:317)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
        at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.NullPointerException
        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 com.sun.ejb.EJBUtils.lookupRemote30BusinessObject(EJBUtils.java:340)
        ... 16 more
|#]

same as usual : thanks in advance for your answers ;)
[Message sent by forum member 'olivier_g' (olivier_g)]

http://forums.java.net/jive/thread.jspa?messageID=237379