AnsweredAssumed Answered

IBM MQ service virtualization – Getting Error  “java.lang.NoClassDefFoundError: com/ibm/mq/MQException”

Question asked by venukg on Aug 17, 2018
Latest reply on Aug 22, 2018 by venukg

I have developed virtual service using request and response pairs and two Proxy Queues.

 

I am using Devtest 10.1 and IBM MQ Manager running on 8.X version.

 

I have placed below jar files in my local while developing the service to connect the MQ Manager and able to connect successfully.

 

 

  • com.ibm.mq.allclient.jar -
  • com.ibm.mq.commonservices.jar
  • com.ibm.mq.headers.jar
  • com.ibm.mq.jar
  • com.ibm.mq.jmqi.jar
  • com.ibm.mq.pcf.jar
  • com.ibm.mqjms.jar

 

But when I placed these jar files into devtest server side and tried to deploy the virtual service.

 

Once I deploy the service, I logged into the portal and find the errors against the deployed service and it was going offline once errors reached to more than 200.

 

Error:

============================================================================

| Exception:

============================================================================

| Message:     Test Execution Stopped due to exception

----------------------------------------------------------------------------

| Trapped Exception: com/ibm/mq/MQException

| Trapped Message:   java.lang.NoClassDefFoundError: com/ibm/mq/MQException

----------------------------------------------------------------------------

STACK TRACE

java.lang.NoClassDefFoundError: com/ibm/mq/MQException

                at com.itko.lisa.messaging.providers.ibmmq.IbmMqQueueManagerAsset.createInstance(IbmMqQueueManagerAsset.java:270)

                at com.itko.lisa.messaging.providers.ibmmq.IbmMqQueueManagerAsset.createInstance(IbmMqQueueManagerAsset.java:65)

                at com.itko.lisa.asset.LocalAssetRuntime$InstanceEntry.open(LocalAssetRuntime.java:2320)

                at com.itko.lisa.asset.LocalAssetRuntime$InstanceEntry.checkOut(LocalAssetRuntime.java:1539)

                at com.itko.lisa.asset.LocalAssetRuntime$RuntimeEntry.checkOut(LocalAssetRuntime.java:803)

                at com.itko.lisa.asset.LocalAssetRuntime.doOpenAsset(LocalAssetRuntime.java:166)

                at com.itko.lisa.asset.LocalAssetRuntime.openAssetInScope(LocalAssetRuntime.java:123)

                at com.itko.lisa.asset.LocalAssetRuntime.openAsset(LocalAssetRuntime.java:114)

                at com.itko.lisa.messaging.providers.ibmmq.IbmMqQueueAsset.createInstance(IbmMqQueueAsset.java:234)

                at com.itko.lisa.messaging.providers.ibmmq.IbmMqQueueAsset.createInstance(IbmMqQueueAsset.java:43)

                at com.itko.lisa.asset.LocalAssetRuntime$InstanceEntry.open(LocalAssetRuntime.java:2320)

                at com.itko.lisa.asset.LocalAssetRuntime$InstanceEntry.checkOut(LocalAssetRuntime.java:1539)

                at com.itko.lisa.asset.LocalAssetRuntime$RuntimeEntry.checkOut(LocalAssetRuntime.java:803)

                at com.itko.lisa.asset.LocalAssetRuntime.doOpenAsset(LocalAssetRuntime.java:166)

                at com.itko.lisa.asset.LocalAssetRuntime.openAssetInScope(LocalAssetRuntime.java:123)

                at com.itko.lisa.asset.LocalAssetRuntime.openAssetInScope(LocalAssetRuntime.java:121)

                at com.itko.lisa.asset.LocalAssetRuntime.openAsset(LocalAssetRuntime.java:114)

                at com.itko.lisa.messaging.providers.ibmmq.IbmMqGetOperation.executeSync(IbmMqGetOperation.java:1128)

                at com.itko.lisa.messaging.providers.ibmmq.IbmMqGetOperation.doExecute2(IbmMqGetOperation.java:914)

                at com.itko.lisa.messaging.providers.ibmmq.IbmMqGetOperation.doExecute2(IbmMqGetOperation.java:78)

                at com.itko.lisa.asset.operation.AbstractRetryableRuntimeOperation.doExecute(AbstractRetryableRuntimeOperation.java:30)

                at com.itko.lisa.asset.operation.AbstractRuntimeOperation.execute(AbstractRuntimeOperation.java:167)

                at com.itko.lisa.messaging.providers.ibmmq.IbmMqGetOperation.executePrepareOnly(IbmMqGetOperation.java:892)

                at com.itko.lisa.messaging.builder.AbstractMultiReceiveOperation.doExecute(AbstractMultiReceiveOperation.java:417)

                at com.itko.lisa.asset.operation.AbstractRuntimeOperation.execute(AbstractRuntimeOperation.java:167)

                at com.itko.lisa.asset.operation.AbstractOperationStep.execute(AbstractOperationStep.java:176)

                at com.itko.lisa.asset.operation.AbstractOperationStep.execute(AbstractOperationStep.java:125)

                at com.itko.lisa.messaging.vse.AbstractVseListenStep.execute(AbstractVseListenStep.java:53)

                at com.itko.lisa.test.TestNode.executeNode(TestNode.java:981)

                at com.itko.lisa.test.TestCase.execute(TestCase.java:1294)

                at com.itko.lisa.test.TestCase.execute(TestCase.java:1198)

                at com.itko.lisa.test.TestCase.executeNextNode(TestCase.java:1183)

                at com.itko.lisa.test.TestCase.executeTest(TestCase.java:1124)

                at com.itko.lisa.coordinator.Instance.run(Instance.java:204)

Caused by: java.lang.ClassNotFoundException: com.ibm.mq.MQException

                at java.net.URLClassLoader.findClass(URLClassLoader.java:381)

                at java.lang.ClassLoader.loadClass(ClassLoader.java:424)

                at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)

                at java.lang.ClassLoader.loadClass(ClassLoader.java:357)

                ... 34 more

 

Question: is there any additional jar files are required?

Outcomes