@Willem.Jiang [via Camel] <[email protected]> Thanks for the reply, I am using openJRE11
BTW , is the cast exception due to java version? My assumption is it should be related to IBM libs according to code, during runtime, the session is expected as MQQueueSession instance but it is MQSession instance instead . MQQueueSession wmqSession = (MQQueueSession) session ---------- Forwarded message --------- From: Willem.Jiang [via Camel] <[email protected]> Date: Sat, Oct 19, 2019 at 3:31 AM Subject: Re: Camel always sending MQRFH2 headers to target WebsphereMQ queue To: W.Y <[email protected]> Which version of JDK are you using? >From the stack trace, it looks like you cannot cast the com.ibm.mq.jms.MQSession to com.ibm.mq.jms.MQQueueSession. I think you need to check the client code for more information. Willem Jiang Twitter: willemjiang Weibo: 姜宁willem On Fri, Oct 18, 2019 at 11:51 PM Wang Yan <[hidden email] <http:///user/SendEmail.jtp?type=node&node=5845741&i=0>> wrote: > > I have problem , camel is always sending MQRFH2 headers to target > WebsphereMQ queue > > I used below code try to solve the problem but i got > Setup of JMS message listener invoker failed for destination > > - trying to recover. Cause: class com.ibm.mq.jms.MQSession cannot be cast > to class com.ibm.mq.jms.MQQueueSession (com.ibm.mq.jms.MQSession and > com.ibm.mq.jms.MQQueueSession are in unnamed module of loader > org.springframework.boot.loader.LaunchedURLClassLoader @5056dfcb) > > > IBM library i used is > // https://mvnrepository.com/artifact/com.ibm.mq/com.ibm.mq.allclient > implementation 'com.ibm.mq:com.ibm.mq.allclient:9.1.1.0' > > What could be the problem? Did I used to wrong libs? any suggestions or > feedback are more than welcome! > > > JmsComponent wmq = new JmsComponent(connectionFactory); > wmq.setDestinationResolver(new DestinationResolver() { public Destination > resolveDestinationName(Session session, String destinationName, boolean > pubSubDomain) throws JMSException { MQQueueSession wmqSession = > (MQQueueSession) session; return wmqSession.createQueue("queue:///" + > destinationName + "?targetClient=1"); } }); ------------------------------ If you reply to this email, your message will be added to the discussion below: https://camel.465427.n5.nabble.com/Camel-always-sending-MQRFH2-headers-to-target-WebsphereMQ-queue-tp5845716p5845741.html To unsubscribe from Camel always sending MQRFH2 headers to target WebsphereMQ queue, click here <https://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5845716&code=d3lhbmJveEBnbWFpbC5jb218NTg0NTcxNnwxMTU1MzAzODM=> . NAML <https://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
