Virtual services MQ connections failing in 10.8 with 'Bad Type on Operand Stack' error
search cancel

Virtual services MQ connections failing in 10.8 with 'Bad Type on Operand Stack' error

book

Article ID: 385671

calendar_today

Updated On:

Products

Service Virtualization

Issue/Introduction

After upgrading to DevTest 10.8, we are seeing the MQ connections fail for our virtual services, with the following error:

STACK TRACE
java.lang.VerifyError: Bad type on operand stack
Exception Details:
  Location:
    com/ibm/mq/ese/jmqi/ESEJMQI.spiConnect(Ljava/lang/String;Lcom/ibm/mq/jmqi/system/SpiConnectOptions;Lcom/ibm/mq/jmqi/MQCNO;Lcom/ibm/mq/jmqi/handles/Phconn;Lcom/ibm/mq/jmqi/handles/Pint;Lcom/ibm/mq/jmqi/handles/Pint;)V @63: invokespecial
  Reason:
    Type 'com/ibm/mq/jmqi/system/SpiConnectOptions' (current frame, stack[2]) is not assignable to 'com/ibm/mq/jmqi/system/LpiPrivConnStruct'
  Current Frame:
    bci: @63
    flags: { }
    locals: { 'com/ibm/mq/ese/jmqi/ESEJMQI', 'java/lang/String', 'com/ibm/mq/jmqi/system/SpiConnectOptions', 'com/ibm/mq/jmqi/MQCNO', 'com/ibm/mq/jmqi/handles/Phconn', 'com/ibm/mq/jmqi/handles/Pint', 'com/ibm/mq/jmqi/handles/Pint' }
    stack: { 'com/ibm/mq/ese/jmqi/ESEJMQI', 'java/lang/String', 'com/ibm/mq/jmqi/system/SpiConnectOptions', 'com/ibm/mq/jmqi/MQCNO', 
'com/ibm/mq/jmqi/handles/Phconn', 'com/ibm/mq/jmqi/handles/Pint', 'com/ibm/mq/jmqi/handles/Pint' }

Environment

DevTest 10.8

Cause

Upon investigation, we noticed the following MQ jar files were placed in the DevTest_Home\lib directory:

  • com.ibm.mq.commonservices.jar
  • com.ibm.mq.headers.jar
  • com.ibm.mq.jar
  • com.ibm.mq.jmqi.jar
  • connector.jar
  • com.ibm.mqjms.jar
  • com.ibm.mq.allclient-9.0.4.0.jar
  • dhbcore.jar
  • jms.jar
  • jndi.jar
  • com.ibm.dhbcore.jar

Placing the MQ jar files in the DevTest_Home\lib directory appears to be conflicting with the core DevTest jars. DevTest 10.8 is picky about where 3rd-party jars are place. A good rule of thumb is to place all 3rd-party jar files inside the DevTest_Home\lib\shared directory.

Resolution

To correct the issue, move the following two jars into the DevTest_Home/lib/shared directory:

  • com.ibm.mq.allclient-9.0.4.0.jar
  • com.ibm.mq.commonservices.jar

Remove all other jars, as these are not required for MQ release 9, and restarted the service.