Win a copy of JDBC Workbook this week in the JDBC and Relational Databases forum
or A Day in Code in the A Day in Code forum!
  • 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 ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

Ejb client code error during lookup-websphere

 
Greenhorn
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
on
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();
p.put(Context.INITIAL_CONTEXT_FACTORY,"com.ibm.ejs.ns.jndi.CNInitialContextFactory");
p.put(Context.PROVIDER_URL,"iiop://localhost:900";);
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]);
System.out.println("Output...."+msg);
-----------------
Thanx in advance,
sathish
 
I'd appreciate it if you pronounced my name correctly. Pinhead, with a silent "H". Petite ad:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic