Win a copy of Spark in Action this week in the Open Source Projects forum!

sathish kumar d

Greenhorn
+ Follow
since Jan 16, 2002
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by sathish kumar d

Hi all,
My client code is
---------------
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);
-----
When i run this code, i get the following error
-----Error---
avax.naming.NamingException: Error during resolve. Root exception is java.lang.NullPointerExcepti
n
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)

Kindly help to sort this problem, as my ejb has been deployed successfully...
Any other work around for client code
with regards
Sathish
18 years ago
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