• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Rob Spoor
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Carey Brown
Bartenders:

Problem in JNDI look up in ejb 3.0

 
Greenhorn
Posts: 13
Eclipse IDE Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Sheriff
Posts: 9697
43
Android Google Web Toolkit Hibernate IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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...
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
you can try this code(or like this) to find true name for lookup:

reply
    Bookmark Topic Watch Topic
  • New Topic