Lookup Problem In WebSphere
2 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Anonymous
Posted On:   Wednesday, May 14, 2003 02:56 AM

Hi Friends , I am getting one small in look up . My question Is. I have written one small bean usually HelloWorld bean in WebSphere. While looking up that bean I am getting problem. My code goes like this. Properties props= new Properties(); props.put(Context.INITIAL_CONTEXT_FACTORY, "com.ibm.websphere.naming.WsnInitialContextFactory"); props.put(Context.PROVIDER_URL,"iiop://localhost:900"); Context ctx = new InitialContext(props); while running this code i am gettting the following runtime eror. Run time Error it is throwing is Error Is : Cannot instantiate class: com.ibm.websphere.naming.WsnInitialContextFactory   More>>

Hi Friends ,
I am getting one small in look up .

My question Is. I have written one small bean usually HelloWorld bean in WebSphere. While looking up that bean I am getting problem.

My code goes like this.


Properties props= new Properties();
props.put(Context.INITIAL_CONTEXT_FACTORY, "com.ibm.websphere.naming.WsnInitialContextFactory");

props.put(Context.PROVIDER_URL,"iiop://localhost:900");
Context ctx = new InitialContext(props);


while running this code i am gettting the following runtime eror.

Run time Error it is throwing is
Error Is :

Cannot instantiate class: com.ibm.websphere.naming.WsnInitialContextFactory

What is the reason.. I put all jar files in classpath.

Thanks in advance.

   <<Less

Re: Lookup Problem In WebSphere

Posted By:   Christoph_Baresel  
Posted On:   Monday, June 2, 2003 06:18 AM

Hi ,

what about omitting the properties, then you get the
default local InitialContext of the server.
Maybe it works???

good luck

Christoph

Re: Lookup Problem In WebSphere

Posted By:   Prakash_Venkataramani  
Posted On:   Wednesday, May 21, 2003 06:40 AM


If you are running in WAS 5.0, do not try to run it as
an application.


Try to run it in a container,and you do not need to supply
the env properties.You can create the Initial Context without any parameters.

Hope this helps.

About | Sitemap | Contact