Why does my MQ resource adapter fail to start and report an MQJCA1008 error?
email@example.com 12000048MT Visits (1472)
Every once in a while, a customer will contact IBM Support and say:
I've got the MQ resource adapter deployed into an application server, and it fails to start with the error "MQJCA1008: An incorrect version of the MQ classes for JMS was found. Deployment failed". What's going on?
In this short blog post, I'll explain what the MQJCA1008 error message means and how to resolve it.
What's inside the MQ resource adapter
The MQ resource adapter is made up of a number of different components, as shown below:
The Java Message Queueing Interface (often referred to as the JMQI) is a Java implemention of the standard MQI, and handles all of the communication between the resource adapter and queue managers. The Local JMQI is used by applications that connect to a queue manager using the BINDINGS transport, and the Remote JMQI is used when an application connects to a queue manager using the CLIENT transport.
and are used by enterprise applications that perform outbound messaging, as well as activation specifications.
Speaking of activation specifications, the MQ resource adapter also contains a set of Connector classes. These classes provide an implementation of the Java Connector Architecture (JCA) specification which allow the application server to drive activation specifications in a standard way.
The final component in the resource adapter are the
Why the MQJCA1008 error occurs and how to resolve it
As you can see, the MQ resource adapter contains a lot of stuff! This means that when it has been deployed into an application server, the resource adapter should have access to all of the classes that it requires to run. There is no need to:
then it is possible that there will be two different versions of the MQ classes for JMS on the application server's CLASSPATH:
This could potentially lead to unexpected behaviour, and exceptions such as Clas
So if the MQ resource adapter fails to start and reports the MQJCA1008 error, then you should check the application server's CLASSPATH and remove any entries for either the relocatable JAR file or the MQ classes for JMS. This will ensure that the resource adapter only picks up the MQ classes for JMS that are contained within it, and will work as expected.
As always, I hope this helps!