permaculture playing cards*
The moose likes EJB and other Java EE Technologies and the fly likes Problem in JNDI look up in ejb 3.0 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Problem in JNDI look up in ejb 3.0" Watch "Problem in JNDI look up in ejb 3.0" New topic
Author

Problem in JNDI look up in ejb 3.0

Noble Bhaskar Aswanapally
Greenhorn

Joined: Mar 05, 2007
Posts: 13

Hi

I have written a simple program on ejb 3.0

Remote Interface


Bean class


jar file name I created is stateless_example.jar

Client program



I am getting following exception
Exception in thread "main" javax.naming.NameNotFoundException: While trying to lookup 'stateless_example.CalculatorBean/remote' didn't find subcontext 'stateless_example'. Resolved '' [Root exception is javax.naming.NameNotFoundException: While trying to lookup 'stateless_example.CalculatorBean/remote' didn't find subcontext 'stateless_example'. Resolved '']; remaining name 'stateless_example/CalculatorBean/remote'
at weblogic.rjvm.ResponseImpl.unmarshalReturn(ResponseImpl.java:234)
at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:348)
at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:259)
at weblogic.jndi.internal.ServerNamingNode_1030_WLStub.lookup(Unknown Source)
at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:392)
at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:380)
at javax.naming.InitialContext.lookup(Unknown Source)
at stateless.client.Client.main(Client.java:41)


Any suggestions where it is wrong...

Regards
Bhaskar
Ankit Garg
Sheriff

Joined: Aug 03, 2008
Posts: 9291
    
  17

I'm not sure but I think the lookup string that you are using might not work in Weblogic (I think it works in jBoss but I think weblogic uses a different kind of syntax). Maybe this could help...


SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
Maysam Shirazi
Greenhorn

Joined: Sep 12, 2009
Posts: 1
you can try this code(or like this) to find true name for lookup:

 
wood burning stoves
 
subject: Problem in JNDI look up in ejb 3.0
 
Similar Threads
jndi name in ejb3?
JNDI not creating for EJB Local interfaces example
Could not access Local Session Bean using JNDI lookup
EJB 3.0 - NoInitialContextException
ejb3 application client can't find session bean. Error: Exception in thread "main" java.lang.Asserti