Troubleshoot: Configuring WebSphere Commerce with WebSphere MQ

If a fatal error is encountered by the Listener for WebSphere MQ, the listeners will automatically restart after a set period.

To change the time to reconnect value:

  1. Open the Configuration Manager
  2. Navigate to Commerce > Instance List > instance> Transports > Inbound > Listener for WebSphere MQ.
  3. In the Time to Reconnect field to the time type the time in seconds that the Listener for WebSphere MQ will take to reconnect.
  4. Restart WebSphere Commerce.

Few problems encountered and their solutions are listed here:

Problem:

After setting up WebSphere Commerce Developer to work with WebSphere MQ, the following (or similar) exception is observed during server startup:

[2/21/06 9:55:03:848 CST] 52989e1b SystemErr     R java.lang.UnsatisfiedLinkError: 
C:\WebSphere\WebSphere MQ\Java\lib\mqjbnd05.dll: Can't find dependent libraries

The cause is the MQ_INSTALL_ROOT variable by default is pointing to the WebSphere MQ client installation instead of the server installation.

Solution:

  1. Open the WebSphere Application Server Administration Console
  2. Under Environment -> Manage WebSphere Variables click on MQ_INSTALL_ROOT
  3. In the value field specify the correct path to the WebSphere MQ server installation directory
  4. Click OK to save your changes.
  5. Restart WebSphere Commerce Developer.

Problem:

When sending a message to a backend system with WepSphere MQ, unexpected characters show up in the front of the xml message. For example, from the WebSphere Commerce logs:

com.ibm.commerce.messaging.outboundservice.Messaging.sendReceiveImmediate() Message content is: 

Solution:

The default value is "JMS" when a JNDI entry is defined for an outbound queue. However, if the targetClient field is not changed to "MQ", unexpected characters will appear at the beginning of the messages sent by WebSphere Commerce on these 2 queues.

  1. Open the WebSphere Application Server Administrative Console, for example: http://host_name:9090/admin
  2. Login with your User ID. Note: The User ID does not require a password, and does not need to be a User ID of a user in the local user registry. It is only used to track user-specific changes to configuration data. Security is NOT enabled.
  3. Change the queue destination defined for the outbound queues named JMSOutboundQueue and JMSErrorQueue. Enter "MQ" for the targetClient field instead of "JMS".