JMS Exception When Testing JMS Connection to ApacheMQ

Document ID : KB000046325
Last Modified Date : 14/02/2018
Show Technical Document Details

 

Problem:

 

When I enter my valid JMS configuration and take the option to test settings it is failing to connect.
I am getting the following error in the ssg_0_0.log:

INFO    141 com.l7tech.server.transport.jms.JmsAdminImpl: Caught JmsConfigException while testing endpoint 'Error connecting to JMS, could not create initial context : Cannot instantiate class: org.apache.activemq.jndi.ActiveMQInitialContextFactory'.

 

Environment: 

 

API Gateway 8.x

ActiveMQ 5.3.2

 

 

Cause:

 

The Gateway is unable to load or locate the required ActiveMQ client libraries. The files are not included with the Gateway.
 

 

Resolution:

 

Copy the appropriate client libraries for the version of ApacheMQ you are using to the Gateway in the appropriate location, set file(s) permissions and ownership, restart ssg. Please ensure you are using a supported version by checking the release notes of the Gateway version you are using.

Example:

1) FTP the client libraries to the Gateway to the /home/ssgconfig directory.

/home/ssgconfig/activemq-all-5.3.2.jar

2) Move or copy the activemq-all-5.3.2.jar to /opt/SecureSpan/Gateway/runtime/lib/ext

mv /home/ssgconfig/activemq-all-5.3.2.jar /opt/SecureSpan/Gateway/runtime/lib/ext

3) Change ownership of the jar file(s)

 

chown layer7:layer7 /opt/SecureSpan/Gateway/runtime/lib/ext/activemq-all-5.3.2.jar

4) Change permissions of the file(s)

chmod 644 /opt/SecureSpan/Gateway/runtime/lib/ext/activemq-all-5.3.2.jar

 

5) Restart ssg

 

service ssg stop

service ssg start

 

 

Additional Information:  

 

https://docops.ca.com/ca-api-gateway/9-1/en/configure-security/tasks-menu-security-options/manage-jms-destinations/install-the-jms-interface