• 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 all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Bear Bibeault
  • Knute Snortum
  • paul wheaton
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Ganesh Patekar
  • Tim Holloway
  • Carey Brown
  • salvin francis

Ejb client code error during lookup-websphere

Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi techies,
This is my first question in this forum. Iam new to websphere app server. I have a stateless ejb deployed in websphere V3.5, when i run my client code i get the following error
Error :-
javax.naming.NamingException: Error during resolve. Root exception is java.lang.NullPointerExcepti
at com.ibm.ejs.ns.jndi.CNContextImpl.doLookup(CNContextImpl.java:726)
at com.ibm.ejs.ns.jndi.CNContextImpl.lookup(CNContextImpl.java:584)
at javax.naming.InitialContext.lookup(InitialContext.java:350)
at HelloClient.main(HelloClient.java:18)
My client code :-
Hashtable p=new Hashtable();
InitialContext ctx = new InitialContext(p);
Object look=ctx.lookup("HelloJndi");
Stateless.HelloHome home=(Stateless.HelloHome)javax.rmi.PortableRemoteObject.narrow(look,Stateless.HelloHome.class);
Stateless.Hello remote=home.create();
String msg=remote.sayHello(args[0]);
Thanx in advance,
rubbery bacon. rubbery tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!