wood burning stoves 2.0*
The moose likes Websphere and the fly likes JMS CommunicationException Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Websphere
Bookmark "JMS CommunicationException" Watch "JMS CommunicationException" New topic

JMS CommunicationException

Rr Kumaran
Ranch Hand

Joined: Sep 17, 2001
Posts: 548
Hi All,

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:

Properties env = new Properties();
env.put("javax.naming.Context.INITIAL_CONTEXT_FACTORY", "com.ibm.websphere.naming.WsnInitialContextFactory");
env.put("javax.naming.Context.PROVIDER_URL", "iiop://localhost:900");

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


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,

RR Kumaran
SCJP 1.4
Roland Barcia
Ranch Hand

Joined: Apr 15, 2004
Posts: 181
Here is a sample:

Hashtable env = new Hashtable();
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: IBM Distinguished Engineer, CTO Mobile for Lab Services
Consider Paul's rocket mass heater.
subject: JMS CommunicationException