wso2 / product-ei

An open source, a high-performance hybrid integration platform that allows developers quick integration with any application, data, or system.
https://wso2.com/integration/
Apache License 2.0
374 stars 280 forks source link

WSO2 - IBM MQ Error - JNDI failed to de-reference Reference with name {Queue Name}; is the factory com.ibm.mq.jms.MQQueueFactory in your classpath #5163

Closed VinothChandran closed 1 month ago

VinothChandran commented 4 years ago

I am using WSO2 EI 6.6.0 to connect IBM MQ 9.0 to publish message to queue and referred below URL to setup IBM MQ connection.https://docs.wso2.com/display/EI660/Configure+with+IBM+WebSphere+MQ

If I publish 100 messages to queue concurrently, one or two messages failed with below error.TID: [-1234] [] [2020-06-25 02:41:36,224] ERROR {org.apache.axis2.transport.jms.JMSMessageSender} Error while creating message sender org.apache.axis2.transport.base.BaseTransportException: JNDI failed to de-reference Reference with name QueuName; is the factory com.ibm.mq.jms.MQQueueFactory in your classpath? at org.apache.axis2.transport.base.BaseUtils.handleException(BaseUtils.java:168) at org.apache.axis2.transport.jms.JMSUtils.lookup(JMSUtils.java:749) at org.apache.axis2.transport.jms.JMSUtils.lookupDestination(JMSUtils.java:969) at org.apache.axis2.transport.jms.JMSConnectionFactory.getDestination(JMSConnectionFactory.java:302) at org.apache.axis2.transport.jms.JMSMessageSender.(JMSMessageSender.java:149) at org.apache.axis2.transport.jms.JMSSender.sendMessage(JMSSender.java:170) at org.apache.axis2.transport.base.AbstractTransportSender.invoke(AbstractTransportSender.java:112) at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:442) at org.apache.axis2.description.OutOnlyAxisOperationClient.executeImpl(OutOnlyAxisOperation.java:297) at org.apache.axis2.client.OperationClient.execute(OperationClient.java:149) at org.apache.synapse.core.axis2.Axis2FlexibleMEPClient.send(Axis2FlexibleMEPClient.java:634) at org.apache.synapse.core.axis2.Axis2Sender.sendOn(Axis2Sender.java:85) at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.send(Axis2SynapseEnvironment.java:571) at org.apache.synapse.endpoints.AbstractEndpoint.send(AbstractEndpoint.java:408) at org.apache.synapse.endpoints.AddressEndpoint.send(AddressEndpoint.java:74) at org.apache.synapse.endpoints.FailoverEndpoint.sendMessage(FailoverEndpoint.java:190) at org.apache.synapse.endpoints.FailoverEndpoint.send(FailoverEndpoint.java:101) at org.apache.synapse.endpoints.IndirectEndpoint.send(IndirectEndpoint.java:56) at org.apache.synapse.mediators.builtin.SendMediator.mediate(SendMediator.java:123) at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:109) at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:71) at org.apache.synapse.mediators.filters.FilterMediator.mediate(FilterMediator.java:171) at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:109) at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:71) at org.apache.synapse.mediators.filters.FilterMediator.mediate(FilterMediator.java:171) at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:109) at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:71) at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:158) at org.apache.synapse.core.axis2.ProxyServiceMessageReceiver.receive(ProxyServiceMessageReceiver.java:225) at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180) at org.apache.synapse.transport.passthru.ServerWorker.processNonEntityEnclosingRESTHandler(ServerWorker.java:368) at org.apache.synapse.transport.passthru.ServerWorker.processEntityEnclosingRequest(ServerWorker.java:427) at org.apache.synapse.transport.passthru.ServerWorker.run(ServerWorker.java:182) at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748)

However, it was working in EI 6.4.0. I am seeing some of the folders removed in wso2/lib folder. Not sure the exact reason for getting this issue.

Please help me to resolve this. I am using WSO2 EI 6.6.0 to connect IBM MQ 9.0 to publish message to queue and referred below URL to setup IBM MQ connection.https://docs.wso2.com/display/EI660/Configure+with+IBM+WebSphere+MQ

If I publish 100 messages to queue concurrently, one or two messages failed with below error.TID: [-1234] [] [2020-06-25 02:41:36,224] ERROR {org.apache.axis2.transport.jms.JMSMessageSender} Error while creating message sender org.apache.axis2.transport.base.BaseTransportException: JNDI failed to de-reference Reference with name QueuName; is the factory com.ibm.mq.jms.MQQueueFactory in your classpath? at org.apache.axis2.transport.base.BaseUtils.handleException(BaseUtils.java:168) at org.apache.axis2.transport.jms.JMSUtils.lookup(JMSUtils.java:749) at org.apache.axis2.transport.jms.JMSUtils.lookupDestination(JMSUtils.java:969) at org.apache.axis2.transport.jms.JMSConnectionFactory.getDestination(JMSConnectionFactory.java:302) at org.apache.axis2.transport.jms.JMSMessageSender.(JMSMessageSender.java:149) at org.apache.axis2.transport.jms.JMSSender.sendMessage(JMSSender.java:170) at org.apache.axis2.transport.base.AbstractTransportSender.invoke(AbstractTransportSender.java:112) at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:442) at org.apache.axis2.description.OutOnlyAxisOperationClient.executeImpl(OutOnlyAxisOperation.java:297) at org.apache.axis2.client.OperationClient.execute(OperationClient.java:149) at org.apache.synapse.core.axis2.Axis2FlexibleMEPClient.send(Axis2FlexibleMEPClient.java:634) at org.apache.synapse.core.axis2.Axis2Sender.sendOn(Axis2Sender.java:85) at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.send(Axis2SynapseEnvironment.java:571) at org.apache.synapse.endpoints.AbstractEndpoint.send(AbstractEndpoint.java:408) at org.apache.synapse.endpoints.AddressEndpoint.send(AddressEndpoint.java:74) at org.apache.synapse.endpoints.FailoverEndpoint.sendMessage(FailoverEndpoint.java:190) at org.apache.synapse.endpoints.FailoverEndpoint.send(FailoverEndpoint.java:101) at org.apache.synapse.endpoints.IndirectEndpoint.send(IndirectEndpoint.java:56) at org.apache.synapse.mediators.builtin.SendMediator.mediate(SendMediator.java:123) at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:109) at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:71) at org.apache.synapse.mediators.filters.FilterMediator.mediate(FilterMediator.java:171) at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:109) at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:71) at org.apache.synapse.mediators.filters.FilterMediator.mediate(FilterMediator.java:171) at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:109) at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:71) at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:158) at org.apache.synapse.core.axis2.ProxyServiceMessageReceiver.receive(ProxyServiceMessageReceiver.java:225) at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180) at org.apache.synapse.transport.passthru.ServerWorker.processNonEntityEnclosingRESTHandler(ServerWorker.java:368) at org.apache.synapse.transport.passthru.ServerWorker.processEntityEnclosingRequest(ServerWorker.java:427) at org.apache.synapse.transport.passthru.ServerWorker.run(ServerWorker.java:182) at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748)

However, it was working in EI 6.4.0. I am seeing some of the folders removed in wso2/lib folder. Not sure the exact reason for getting this issue.

Please help me to resolve this.

Below Axis2 configuration used for sending message to IBM MQ. `

com.sun.jndi.fscontext.RefFSContextFactory
<parameter locked="false" name="java.naming.provider.url">file:/data/JNDI_Context</parameter>
<parameter locked="false" name="transport.jms.ConnectionFactoryJNDIName">MQ_CF</parameter>
<parameter locked="false" name="transport.jms.ConnectionFactoryType">queue</parameter>
<parameter locked="false" name="transport.jms.UserName">user</parameter>
<parameter locked="false" name="transport.jms.Password">password</parameter>
<parameter locked="false" name="transport.jms.JMSSpecVersion">1.0</parameter>

com.sun.jndi.fscontext.RefFSContextFactory
<parameter locked="false" name="java.naming.provider.url">file:/data/JNDI_Context</parameter>
<parameter locked="false" name="transport.jms.ConnectionFactoryJNDIName">MQ_CF</parameter>
<parameter locked="false" name="transport.jms.ConnectionFactoryType">queue</parameter>
<parameter locked="false" name="transport.jms.UserName">user</parameter>
<parameter locked="false" name="transport.jms.Password">password</parameter>
<parameter locked="false" name="transport.jms.JMSSpecVersion">1.0</parameter>

`

Call End point

`

`
sdkottegoda commented 4 years ago

Hi Vinoth, thank you for reporting this issues. Could you please check whether your observation is similar to what's mentioned in https://github.com/wso2/product-ei/issues/5116

VinothChandran commented 4 years ago

Hi Sasikala,

Thanks for responding☺.

I don’t think it is similar to #5116https://github.com/wso2/product-ei/issues/5116. Here is my piece of code to publish message to IBM MQ 9.1. I am not using email send behavior in this service. Actually, this service is called from another parent service. Parent service is having a functionality of sending an email. However, I hope that will run in different thread. The same piece of code is working fine in EI 6.4.0. But issue in 6.6.0.

ERROR $1 $2

Appreciating your help ☺

Thanks, Vinoth From: Sasikala Kottegoda notifications@github.com Sent: Monday, June 29, 2020 11:00 AM To: wso2/product-ei product-ei@noreply.github.com Cc: Vinoth Neelakandan vinoth.neelakandan@aspiresys.com; Author author@noreply.github.com Subject: Re: [wso2/product-ei] WSO2 - IBM MQ Error - JNDI failed to de-reference Reference with name {Queue Name}; is the factory com.ibm.mq.jms.MQQueueFactory in your classpath (#5163)

CAUTION: External email. Please verify the veracity of the sender/content before opening a link or an attachment.

Hi Vinoth, thank you for reporting this issues. Could you please check whether your observation is similar to what's mentioned in #5116https://github.com/wso2/product-ei/issues/5116

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/wso2/product-ei/issues/5163#issuecomment-650913967, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AGCLCMZUUXR4MHLHNMOIHGDRZARFFANCNFSM4OIM2LUA.

[Aspire Systems]

This e-mail message and any attachments are for the sole use of the intended recipient(s) and may contain proprietary, confidential, trade secret or privileged information. Any unauthorized review, use, disclosure or distribution is prohibited and may be a violation of law. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message.