IBM Support

java.lang.IllegalArgumentException with WMQ client jar files v7.0.1.6 and Java 7 on Sterling B2B Integrator

Troubleshooting


Problem

When trying to connect from IBM Sterling B2B Integrator (ISBI) running on Java 7 to a WebSphere MQ (WMQ) Server using WMQ client jar files version 7.0.1.6 there might be "java.lang.IllegalArgumentException: Comparison method violates its general contract!" if the Queue Manager (QM) is not reachable.

Symptom

Using WMQ client jar files older version 7.0.1.10 on ISBI running on Java 7.
When enabling in ISBI for example WMQ Adapter (async receive) or WebSphereMQ Suite Async Receive Service while QM is unreachable the following error can be found in system.log (issued by async receive WMQ Adapter) and WebSphereMQSuite.log (issued by WebSphereMQ Suite Async Receive), respectively:


    [2014-11-21 12:40:43.622] ERROR <WMQConxPool-WMQ-1222093894> Exception in MQCONN
    [2014-11-21 12:40:43.631] ERROR [1416570043631] Comparison method violates its general contract!
    [2014-11-21 12:40:43.631] ERRORDTL [1416570043631]java.lang.IllegalArgumentException: Comparison method violates its general contract!
    at java.util.TimSort.mergeHi(TimSort.java:879)
    at java.util.TimSort.mergeAt(TimSort.java:496)
    at java.util.TimSort.mergeCollapse(TimSort.java:419)
    at java.util.TimSort.sort(TimSort.java:225)
    at java.util.TimSort.sort(TimSort.java:184)
    at java.util.Arrays.sort(Arrays.java:670)
    at com.ibm.mq.constants.MQConstants.getFields(MQConstants.java:277)
    at com.ibm.mq.constants.MQConstants.lookup(MQConstants.java:204)
    at com.ibm.mq.constants.MQConstants.lookup(MQConstants.java:264)
    at com.ibm.mq.constants.MQConstants.lookup(MQConstants.java:254)
    at com.ibm.mq.jmqi.remote.internal.RemoteFAP.jmqiConnect(RemoteFAP.java:2072)
    at com.ibm.mq.jmqi.remote.internal.RemoteFAP.jmqiConnect(RemoteFAP.java:1286)
    at com.ibm.mq.MQSESSION.MQCONNX_j(MQSESSION.java:915)
    at com.ibm.mq.MQManagedConnectionJ11.<init>(MQManagedConnectionJ11.java:227)
    at com.ibm.mq.MQClientManagedConnectionFactoryJ11._createManagedConnection(MQClientManagedConnectionFactoryJ11.java:505)
    at com.ibm.mq.MQClientManagedConnectionFactoryJ11.createManagedConnection(MQClientManagedConnectionFactoryJ11.java:547)
    at com.ibm.mq.StoredManagedConnection.<init>(StoredManagedConnection.java:95)
    at com.ibm.mq.MQSimpleConnectionManager.allocateConnection(MQSimpleConnectionManager.java:207)
    at com.ibm.mq.MQQueueManagerFactory.obtainBaseMQQueueManager(MQQueueManagerFactory.java:869)
    at com.ibm.mq.MQQueueManagerFactory.procure(MQQueueManagerFactory.java:761)
    at com.ibm.mq.MQQueueManagerFactory.constructQueueManager(MQQueueManagerFactory.java:712)
    at com.ibm.mq.MQQueueManagerFactory.createQueueManager(MQQueueManagerFactory.java:171)
    at com.ibm.mq.MQQueueManager.<init>(MQQueueManager.java:603)
    at com.sterlingcommerce.woodstock.services.websphereMQ.WMQConxPool.openConnection(WMQConxPool.java:191)
    at com.sterlingcommerce.woodstock.services.websphereMQ.WMQConxPool.newConnection(WMQConxPool.java:155)
    at com.sterlingcommerce.woodstock.services.websphereMQ.WMQConxPool.getConnection(WMQConxPool.java:100)
    at com.sterlingcommerce.woodstock.services.websphereMQ.WMQConxPool.accessQueue(WMQConxPool.java:67)
    at com.sterlingcommerce.woodstock.services.websphereMQ.WebSphereMQServerImpl.doRcv(WebSphereMQServerImpl.java:288)
    at com.sterlingcommerce.woodstock.services.websphereMQ.WMQAsyncThread.run(WMQAsyncThread.java:47)

Cause

ISBI version 5.2.3 and later uses per default WMQ client jar files version 7.0.1.6.
For WMQ version older than 7.0.1.10 there is a known problem APAR IC88187 resulting in the exception listed above.
For details see IBM Technote MQ APAR IC88187 (fixed with WMQ version 7.0.1.10)

Diagnosing The Problem

The exception may occur on the following conditions:

1. using WMQ client jar files version prior 7.0.1.10 (e.g. version 7.0.1.6 that are included per default when installing ISBI 5.2.3 and later)
2. MQ down or QM unreachable (e.g. channel, listener, etc. down)
3. enable async receive WMQ Adapter or WebSphereMQ Suite Async Receive
4. you may find the exception stack listed above in system.log.* resp. WebSphereMQSuite.log.*

Resolving The Problem

To solve this problem please use WMQ client jars newer than version 7.0.1.10, version 7.1.0.3, or version 7.5.0.1, respectively.

For download and installation tips, please see IBM Technote: How to get and install new WebSphere MQ Client jar files for Sterling B2B Integrator?

[{"Product":{"code":"SS3JSW","label":"IBM Sterling B2B Integrator"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"Adapters","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"5.2.3;5.2.4","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]

Document Information

Modified date:
25 February 2019

UID

swg21691259