This is similar to the earlier question Exception in thread “main” java.lang.NoClassDefFoundError: com/ibm/mq/MQException
I am facing a similar issue in Linux. I have installed the following:
MQSeriesRuntime-7.0.1-3.x86_64.rpm
MQSeriesSDK-7.0.1-3.x86_64.rpm
MQSeriesJava-7.0.1-3.x86_64.rpm
MQSeriesServer-7.0.1-3.x86_64.rpm
When I create an execution group , I get:java.lang.ClassNotFoundException: com.ibm.mq.MQException
I have CLASSPATH
set by using this line of code:export CLASSPATH=$CLASSPATH:/opt/mqm/java/lib/com.ibm.mq.jmqi.jar:/opt/mqm/java/lib/com.ibm.mq.jar:.
Version of broker is 8.0.0.1 and that of MQ is 7.0.1.3 . Can you please suggest what is wrong? According to the previous answer, am I supposed to install the Client also?
You need to review the WMQ Using Java manual for WMQ v7.0.1.*, as you are missing MQ JAR files.
For MQ base Java (not MQ/JMS), you need at least 5 MQ JAR files:
No, you do not need to install the client. The response in the other question was based on having a non-standard install of the client jars. In this case, you appear to have a standard install of WMQ Server. In addition to the RPMs you have provided, there is also an RPM for the MQSeries JRE, although I do not expect that to be the issue here. You obviously have some JRE, presumably the one installed by Broker.
So this should come down to a case of differential diagnosis. Divide and conquer.
/opt/mqm/java/bin/setjmsenv
command as described in Environment variables relevant to WebSphere MQ classes for Java? Sourcing this script in the broker startup script would capture all the relevant classes and do so in a way that is intended to work consistently as you upgrade to later versions.There's not enough information in the posted question to provide a confident answer but answering these diagnostic questions should help narrow it down or solve it altogether.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With