• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem in JNDI look up in ejb 3.0

 
Noble Bhaskar Aswanapally
Greenhorn
Posts: 13
Chrome Eclipse IDE Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 9495
22
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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...
 
Maysam Shirazi
Greenhorn
Posts: 1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you can try this code(or like this) to find true name for lookup:

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic