Getting below exception at runtime during queue connection -
java.lang.ClassCastException: com.ibm.mq.connector.outbound.MQQueueProxy incompatible with com.ibm.mq.jms.MQQueue
Below is the piece of code for reference. I am trying to run application on Websphere Liberty -
connection = queueConnFactory.createConnection();
logger.debug("got connection = " + (connection != null));
session = connection.createSession(Boolean.FALSE, Session.AUTO_ACKNOWLEDGE);
logger.debug("got Session = " + (session != null));
((MQQueue)requestQueue).setTargetClient(com.ibm.mq.jms.JMSC.MQJMS_CLIENT_NONJMS_MQ);
producer = session.createProducer(requestQueue);
Message documentRequestMessage = session.createTextMessage(messageData);
Getting exception during setTargetClient. I also tried setting target client as MQJMS_CLIENT_JMS_COMPLIANT, but still getting same error.
Following jars are in my dependencies -
com.ibm.mqjms-1.0
com.ibm.mq-1.0
com.ibm.dhbcore-61
In Websphere Liberty profile -
<feature>wmqJmsClient-2.0</feature>
is installed.
<variable name="wmqJmsClient.rar.location" value="${shared.resource.dir}/wmq/jmsra.rar"/>
- this is also available on the server
This same application is running on Tomcat without any error.