I am using JMeter to connect to Websphere MQ for placing multiple messages to the Queue. I have tried the below<ol><li>
Downloaded the below jars into a separate path and enabled the user.classpath variable in
jmeter.properties and appended the jars path to it
g) providerutil.jar<ol start="2"><li>
Used JMS Publisher Sampler and have set the required details<a href="https://i.stack.imgur.com/XReMh.png" rel="nofollow"><img alt="enter image description here" class="b-lazy" data-src="https://i.stack.imgur.com/XReMh.png" data-original="https://i.stack.imgur.com/XReMh.png" src="https://etrip.eimg.top/images/2019/05/07/timg.gif" /></a></li> <li>
Ran the Sampler and I am getting error as
javax.naming.NameNotFoundException: com.ibm.mq.jms.MQQueueConnectionFactory <a href="https://i.stack.imgur.com/kBhTk.png" rel="nofollow"><img alt="enter image description here" class="b-lazy" data-src="https://i.stack.imgur.com/kBhTk.png" data-original="https://i.stack.imgur.com/kBhTk.png" src="https://etrip.eimg.top/images/2019/05/07/timg.gif" /></a>
I have tried downloading multiple other jars as specified in different forums on the internet. None of them seems to resolve this issue. The class
com.ibm.mq.jms.MQQueueConnectionFactory is indeed present in the MQ jars downloaded. Not sure why JMeter is unable to find this class.
Any help on this, please?Answer1:
Wow. You are missing a bunch of MQ JAR files.<blockquote>
That's not an MQ JAR file.
Here's the list of MQ JAR files that you need for MQ JMS Pub/Sub:<ol><li>com.ibm.mq.commonservices.jar</li> <li>com.ibm.mq.headers.jar</li> <li>com.ibm.mq.jar</li> <li>com.ibm.mq.jmqi.jar</li> <li>com.ibm.mq.pcf.jar</li> <li>com.ibm.mqjms.jar</li> <li>connector.jar</li> <li>dhbcore.jar</li> <li>fscontext.jar</li> <li>jms.jar</li> <li>jndi.jar</li> <li>jta.jar</li> <li>ldap.jar</li> <li>providerutil.jar</li> <li>rmm.jar</li> </ol>
If you want to make your life easier, starting with MQ v22.214.171.124, there is an MQ JAR file called '<a href="http://www.ibm.com/support/docview.wss?uid=swg21683398" rel="nofollow">com.ibm.mq.allclient.jar</a>' that contains everything.Answer2:
javax.naming.NameNotFoundException isn't anything to do with classes. If Java couldn't find the class then you'd get a ClassNotFoundException.
javax.naming.NameNotFoundException is a JNDI exception indicating that JNDI couldn't find anything with the name you passed in.
I expect the 'ConnectionFactory' field in the UI isn't looking for a class name, but is really looking for the JNDI name of the ConnectionFactory which you've configured with the required parameters to connect to your MQ queue manager. So an instance of MQQueueConnectionFactory rather than its class file.