Unable to Create JNDI Context
7 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Prakash_Venkataramani
Posted On:   Friday, May 9, 2003 07:04 AM

I am using Websphere 5.0. All I am trying to do is some JMS Stuff.I am trying to create TopicConnectionFactory and Topic.I have all the setup required in the AppServer. Now I am specifying the PROVIDER_URL and INITIAL_CONTEXT_FACTORY. In the PROVIDER_URL,I am typically giving a Corba address,crobaloc:iiop/localhost/2809/ IN the Initial COntext Facotry ,I am specifying the COm.ibm.WsnInitialContextFactory. I know this is simple and straight forward.Any help is appreciated. But I get an error like : java.lang.IncompatibleClassChangeError: com.ibm.CORBA.iiop.ORB method createObjectURL(Ljava/lang/String;)Lcom/ibm/CORBA/iiop/ObjectURL; at com.ibm.ws   More>>


I am using Websphere 5.0.


All I am trying to do is some JMS Stuff.I am trying to create TopicConnectionFactory and Topic.I have all the setup required in the AppServer.



Now I am specifying the
PROVIDER_URL and INITIAL_CONTEXT_FACTORY.
In the PROVIDER_URL,I am typically giving a Corba address,crobaloc:iiop/localhost/2809/


IN the Initial COntext Facotry ,I am specifying the COm.ibm.WsnInitialContextFactory.

I know this is simple and straight forward.Any help is appreciated.

But I get an error like :
java.lang.IncompatibleClassChangeError: com.ibm.CORBA.iiop.ORB method createObjectURL(Ljava/lang/String;)Lcom/ibm/CORBA/iiop/ObjectURL;
at com.ibm.ws.naming.util.WsnInitCtxFactory.parseIiopUrl(WsnInitCtxFactory.java:1668)
at com.ibm.ws.naming.util.WsnInitCtxFactory.parseBootstrapURL(WsnInitCtxFactory.java:1427)
at com.ibm.ws.naming.util.WsnInitCtxFactory.getInitialContextInternal(WsnInitCtxFactory.java:368)
at com.ibm.ws.naming.util.WsnInitCtx.getContext(WsnInitCtx.java:102)
at com.ibm.ws.naming.util.WsnInitCtx.getContextIfNull(WsnInitCtx.java:408)
at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:131)
at javax.naming.InitialContext.lookup(InitialContext.java:359)
at JMSPublisher.main(JMSPublisher.java:56)

   <<Less

Re: Unable to Create JNDI Context

Posted By:   Rohit_Shirodkar  
Posted On:   Friday, July 25, 2003 11:36 AM

Hi Prakash,


Got another breakthrough after about 4-5 days. Although I am not yet successful, I feel that I am pretty close. I am also as you are trying to do a simple JMS stuff in WSAD 5.0.



I also got the exception.
java.lang.IncompatibleClassChangeError: com.ibm.CORBA.iiop.ORB method createObjectURL(Ljava/lang/String;)Lcom/ibm/CORBA/iiop/ObjectURL



I am giving a small sample of the code that I have.




Properties env = new Properties( );

env.put(Context.SECURITY_PRINCIPAL,"guest");

env.put(Context.SECURITY_CREDENTIALS,"guest");

env.put(Context.INITIAL_CONTEXT_FACTORY,"com.ibm.websphere.naming.WsnInitialContextFactory");

InitialContext jndi = new InitialContext(env);


// Look up a JMS connection factory

TopicConnectionFactory conFactory =(TopicConnectionFactory)jndi.lookup("TopicConnFactory");




Also what is important is the jar files that you add and the order of these jar files.




runtimes/base_v5/java/jre/lib/rt.jar

runtimes/base_v5/mqjms/Java/lib/jms.jar

runtimes/aes_v4_jars/lib/ns.jar

wstools/eclipse/plugins/com.ibm.websphere.aes.v4_4.0.4/lib/iwsorb.jar

runtimes/base_v5/lib/naming.jar



All these folders are under the
Program Files/IBM/WebSphere Studio/




Now I am getting the following exception
javax.naming.NameNotFoundException: TopicConnFactory

where TopicConnFactory is the lookup for the TopicConnectionFactory.

Re: Unable to Create JNDI Context

Posted By:   Rohit_Shirodkar  
Posted On:   Wednesday, July 23, 2003 12:57 PM

Hi Prakash,

I think the Context.PROVIDER_URL that u are providing is incorrect.
The value should be "iiop://localhost:2809".

Rohit

Re: Unable to Create JNDI Context

Posted By:   thomas_hummel  
Posted On:   Friday, June 20, 2003 06:31 AM

I got a similar problem (IncompatibleClassChangeError during the lookup with an ApplicationClient).



Maybe it helps if you run your client as WebSphere V5 Application Client.

Re: Unable to Create JNDI Context

Posted By:   William_Keyser  
Posted On:   Thursday, June 12, 2003 06:31 AM

I'm getting the same kind of message using iiop://localhost:2809/ as the URL PROVIDER string and com.ibm.websphere.naming.WsnInitialContextFactory as the default factory.


If anybody has solve this problem, whould he be so kind as to explaining how.


I admit it sounds like a class version mismatch (something to do with using the wrong jar files). I'm using naming.jar, namingclient.jar, ibmorb.jar and ecutils.jar but where should I pick them up from (I've found at least two version of ibmorb.jar).

Re: Unable to Create JNDI Context

Posted By:   Usman_ahmad  
Posted On:   Tuesday, June 10, 2003 12:50 AM

HEre's something you might like to try. I too am using WebSphere 5.0. Try the initial Provider URL with corbaloc:iiop:localhost:2809. You can also just try the initial context(Initial ctx = new InitialContext();) if you like. Good luck and let me know how you do.

Re: Unable to Create JNDI Context

Posted By:   Joseph_Sadove  
Posted On:   Wednesday, June 4, 2003 11:45 AM

Try using the full package name. Hope it helps.


com.ibm.websphere.naming.WsnInitialContextFactory

Re: Unable to Create JNDI Context

Posted By:   Anonymous  
Posted On:   Thursday, May 22, 2003 08:45 AM

I got the same problem ... trying to start with WSAD5.0 and JMS. Any help would be great.
Tks.
--MAS
About | Sitemap | Contact