I am using WebSphere Application Server 5.0 on Windows 2000. I have created below using WAS 5.0 admin console: a. JNDI Name "TopicConnectionFactory" using <node name>->Resources->WebSphere JMS Provider->WebSphere Topic Connection Factories b. JNDI Name "ChatTopic" using <node name>->Resources->WebSphere JMS Provider->WebSphere Topic Destinations
I have written a standalone JMS client "Chat.java" whose partial is below:
I started the server ran the Chat.java as "java Chat Topic admin welcome" then I am getting exception "javax.naming.CommunicationException: Can't find SerialContextProvider" and I am not able to create conFactory object using above client code.
Can anybody tell what am I missing here. What all classpath and path settings I have to do ?
Thanks & Regards, Kumar.
Joined: Apr 15, 2004
Here is a sample:
Hashtable env = new Hashtable(); env.put(Context.INITIAL_CONTEXT_FACTORY, "com.ibm.websphere.naming.WsnInitialContextFactory"); env.put(Context.PROVIDER_URL, "corbaloc:iiop:myhost.mycompany.com:2809"); Context initialContext = new InitialContext(env);
You are using the old iiop style which should work, but the port should be 2809 mandated by the J2EE spec as the default port for ORBS.
Roland Barcia<br />STSM - ISSW Lead Web 2.0 Architect