users@glassfish.java.net

EJB 3.1 remote interface access problems on Glassfish!

From: <forums_at_java.net>
Date: Fri, 16 Sep 2011 07:23:48 -0500 (CDT)

 Hi,

I am running with lots of troubles to get access to an EJB remote interface.
I have two EJB modules packed into an EAR file. One of the modules exposes an
EJB remote interface to the other one. The weirdest thing is when I
reload/redeploy the application, the lookups
(java:global/OCSA/OCSAProperties/Reader!ocsa.properties.ReaderRemote) to the
remote interface fail.


 

javax.naming.NamingException: Lookup failed for
'java:global/OCSA/OCSAProperties/Reader!ocs.properties.ReaderRemote' in
SerialContext[myEnv={java.naming.factory.initial=com.sun.enterprise.naming.impl
.SerialInitContextFactory,
java.naming.factory.state=com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl,
java.naming.factory.url.pkgs=com.sun.enterprise.naming} at
com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:518)
~[glassfish-naming.jar:3.1.1] at
com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:455)
~[glassfish-naming.jar:3.1.1] at
javax.naming.InitialContext.lookup(InitialContext.java:392) ~[na:1.6.0_26] at
javax.naming.InitialContext.lookup(InitialContext.java:392) ~[na:1.6.0_26] at
tng.ocs.sequencer.service.worker.ExecutionBlockWorkerThread.run(ExecutionBlockWorkerThread.java:146)
~[OSequencer_jar/:na] at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
[na:1.6.0_26] at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
[na:1.6.0_26] at java.lang.Thread.run(Thread.java:662) [na:1.6.0_26] Caused
by: javax.naming.NamingException: ejb ref resolution error for remote
business interfacetng.ocs.properties.ReaderRemote at
com.sun.ejb.EJBUtils.lookupRemote30BusinessObject(EJBUtils.java:434)
~[ejb-container.jar:3.1.1] at
com.sun.ejb.containers.RemoteBusinessObjectFactory.getObjectInstance(RemoteBusinessObjectFactory.java:75)
~[ejb-container.jar:3.1.1] at
javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
~[na:1.6.0_26] at
com.sun.enterprise.naming.impl.SerialContext.getObjectInstance(SerialContext.java:556)
~[glassfish-naming.jar:3.1.1] at
com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:514)
~[glassfish-naming.jar:3.1.1] ... 7 common frames omitted Caused by:
java.lang.NullPointerException: null at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.6.0_26] at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
~[na:1.6.0_26] at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
~[na:1.6.0_26] at java.lang.reflect.Method.invoke(Method.java:597)
~[na:1.6.0_26] at
com.sun.ejb.EJBUtils.lookupRemote30BusinessObject(EJBUtils.java:422)
~[ejb-container.jar:3.1.1] ... 11 common frames omitted
 

However, if I remove/undeploy the application from the container, I restart
Glassfish and deploy the EAR again, it works!. The lookups are ok then!!!.
So, I am not fully understand this JNDI behavior at all or whether i am
doing something wrong, missing some configuration or there is some issue is
flying around. Anyways, if anyone can help me out on this, I'll be very
pleased to hear any comment!

 

EAR name = OCSA.ear

Remote EJB module name = OCSAProperties.jar

Cheers

 

 


--
[Message sent by forum member 'joseguerra']
View Post: http://forums.java.net/node/843728