Default messaging provider - troubleshooting tips

This topic provides a set of specific tips to help you troubleshoot problems for JMS messaging with the default messaging provider.

For general tips about troubleshooting problems with WebSphere® messaging, see Tips for troubleshooting WebSphere Messaging. This topic provides additional tips specific to the default messaging provider and its use of service integration technologies.

JMS client applications running inside the J2EE client container fail when invoking the ConnectionFactory.createConnection method

When a JMS client application is running inside the J2EE client container, on a machine that is running no other WebSphere processes, a call to the ConnectionFactory.createConnection method can fail with the following error:
CWSIJ0005E: An instance of the channel framework service to use for communication cannot be found
Cause

The ConnectionFactory for the default messaging provider has a dependency on the Channel Framework Service. It locates the Channel Framework Service using a lookup in the JNDI namespace. To connect to a naming service, the ConnectionFactory uses an InitialContext object created using the default constructor.

When the JMS client is running within an application server environment, the InitialContext object is able to successfully connect to the naming service, the Channel Framework Service is located and the call to createConnection completes successfully.

However, when the JMS client is executing within the J2EE client container, the InitialContext object uses the value of the java.naming.provider.url system property, to determine the location of the naming service to connect to. If no value is specified for this property, it attempts to connect to a naming service located at port 2809 on the local client machine. If there is no server running on the client machine, there is no naming service listening on this port on the local machine. This causes the createConnection method to fail with the following error:
CWSIJ0005E: An instance of the channel framework service to use for communication cannot be found
Solution
A JMS client application can specify the value of the java.naming.provider.url programmatically, using code of the form:
String key = "java.naming.provider.url";
String value = "iiop://some.remote.machine:9810";
System.setProperty(key, value);

This code should be run prior to invoking the createConnection method on the ConnectionFactory object.

Alternatively, if you use the launchClient script from the command line to launch the J2EE client container, you can specify either of the following command line parameters:
  • launchClient <CLIENT EAR> -CCBootstrapHost=some.remote.machine -CCBootstrapPort=981
  • launchClient <CLIENT EAR> -CCproviderURL=iiop://some.remote.machine:9810

This ensures that if no provider URL is specified programmatically, then any InitialContext objects default to using the provider URL specified on the command line.




Related tasks
Managing messaging with the default messaging provider
Reference topic Reference topic    

Terms and conditions for information centers | Feedback

Last updatedLast updated: Aug 30, 2013 10:47:11 PM CDT
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=pix&product=was-nd-iseries&topic=rjn_prob0
File name: rjn_prob0.html