Name not found exception
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   parul_dholakia
Posted On:   Wednesday, November 21, 2001 09:26 PM

I have written a small code for Websphere application server 3.5. ctxtInitCtxt = getInitialContext();// private method call String s1 = Attributes.qualifyRepositoryHomeName(strHostName, ""); //lookup for NodeHome Object obj = ctxtInitCtxt.lookup(s1 + "NodeHome"); nodeHome = (NodeHome)PortableRemoteObject.narrow( obj,com.ibm.ejs.sm.beans.NodeHome.class); I am getting the initial context but lookup fails. It gives nameNotFoundException "ejsadmin/node/192.168.2.12/homes/NodeHome" . Why this should happen ? It works at one place and fails on another.    More>>

I have written a small code for Websphere application server 3.5.


ctxtInitCtxt = getInitialContext();// private method call


String s1 =
Attributes.qualifyRepositoryHomeName(strHostName, "");


//lookup for NodeHome


Object obj = ctxtInitCtxt.lookup(s1 +
"NodeHome");


nodeHome =
(NodeHome)PortableRemoteObject.narrow( obj,com.ibm.ejs.sm.beans.NodeHome.class);


I am getting the initial context but lookup fails. It gives
nameNotFoundException
"ejsadmin/node/192.168.2.12/homes/NodeHome" . Why this should happen ? It
works at one place and fails on another.


Thanks in advcance.


Parul.

   <<Less

Re: Name not found exception

Posted By:   Michael_Brown  
Posted On:   Friday, November 23, 2001 09:36 AM

you are adding the host address to the nodename which is not necessary.

instead of Object obj = ctxtInitCtxt.lookup(s1+"NodeHome");

try

Object obj = ctxtInitCtxt.lookup("NodeHome");


it should work for you.
About | Sitemap | Contact