KB Article #44118
Connection Issue Between Gateway and JMS Provider
Problem
Connection issue between Gateway and JMS Provider. Not able to send messages to MQ queuer.
Connection Type : "Client" using .binding flate file : JMS Client (and Gateway) and MQ queuer are on different machines.
Got this error :
5/4/07 2:24:56 PM CEST> <Warning> <JmsOutboundConnector JMS_XML_RESPONSE.initJms> <Caught: javax.naming.NoInitialContextException : Cannot in
stantiate class: com.sun.jndi.fscontext.RefFSContextFactory > <Thread-0>
<5/4/07 2:24:56 PM CEST> <Warning> <JmsOutboundConnector JMS_XML_RESPONSE.initJms> <Failed to connect to JMS provider> <Thread-0>
<5/4/07 2:24:56 PM CEST> <Error> <JmsOutboundConnector JMS_XML_RESPONSE.setException> <com.axway.gateway.jms.CommunicationException: Failed to
connect to JMS provider
at com.axway.gateway.jms.JmsConnector.initJms(JmsConnector.java:163)
at com.axway.gateway.jms.JmsOutboundConnector.initJms(JmsOutboundConnector.java:124)
at com.axway.gateway.jms.JmsConnector.init(JmsConnector.java:91)
at com.axway.gateway.jms.JmsConnector.run(JmsConnector.java:39)
Caused by: javax.naming.NoInitialContextException: Cannot instantiate class: com.sun.jndi.fscontext.RefFSContextFactory [Root exception is ja
va.lang.ClassNotFoundException: com.sun.jndi.fscontext.RefFSContextFactory ]
Resolution
Issue due to missing jars files on the JMS provider side.
IBM recommend some jars to be specified on the classloader (the number depends on the version of MQ). However, these jars are not sufficient to use the JMS provider.
To fix the problem :
1) Get all jars from the Websphere MQ installation located in the directory "/mqm/Java/ib"
2) Transfer in the Gateway environment all these jars files to the directory where the Class Loader(JMS Remote Site configuration) will point to.
3) Specify in the Class Loader configuration only the jars indicated in IBM prerequisites