Problem determination for the IBM MQ resource adapter

When using the IBM MQ resource adapter, most errors cause exceptions to be thrown, and these exceptions are reported to the user in a manner that depends on the application server. The resource adapter makes extensive use of linked exceptions to report problems. Typically, the first exception in a chain is a high-level description of the error, and subsequent exceptions in the chain provide the more detailed information that is required to diagnose the problem.

For example, if the IVT program fails to obtain a connection to a IBM MQ queue manager, the following exception might be thrown:
javax.jms.JMSException: MQJCA0001: An exception occurred in the JMS layer.
See the linked exception for details.
Linked to this exception is a second exception:
javax.jms.JMSException: MQJMS2005: failed to create an MQQueueManager for
'localhost:ExampleQM'
This exception is thrown by IBM MQ classes for JMS and has a further linked exception:
com.ibm.mq.MQException: MQJE001: An MQException occurred: Completion Code 2,
Reason 2059
This final exception indicates the source of the problem. Reason code 2059 is MQRC_Q_MGR_NOT_AVAILABLE, which indicates that the queue manager specified in the definition of the ConnectionFactory object might not have been started.

If the information provided by exceptions is not sufficient to diagnose a problem, you might need to request a diagnostic trace. For information about how to enable diagnostic tracing, see Configuration of the IBM MQ resource adapter.

Configuration problems commonly occur in the following areas:

  • Deploying the resource adapter
  • Deploying MDBs
  • Create connections for outbound communication

  • Problems in deploying the resource adapter
    If the resource adapter fails to deploy, check that Java EE Connector Architecture (JCA) resources are configured correctly. If IBM MQ is already installed, check that the correct versions of the JCA and IBM MQ classes for JMS are in the class path.
  • Problems in deploying MDBs
    Failures when the application server attempts to start message delivery to an MDB might be caused by an error in the definition of the associated ActivationSpec object, or by missing resources.
  • Problems in creating connections for outbound communication
    A failure in outbound communication can occur if a ConnectionFactory object cannot be found, or if the ConnectionFactory object is found but a connection cannot be created. There are various reasons for either of these problems.

Parent topic: Java and JMS troubleshooting


Related information