0
votes

I am using JMeter to connect to Websphere MQ for placing multiple messages to the Queue. I have tried the below

  1. Downloaded the below jars into a separate path and enabled the user.classpath variable in jmeter.properties and appended the jars path to it

    a) com.ibm.mq.jar

    b) com.ibm.mqjms.jar

    c) dhbcore.jar

    d) fscontext.jar

    e) javax.jms.jar

    f) jms.jar

    g) providerutil.jar

    1. Used JMS Publisher Sampler and have set the required detailsenter image description here

    2. Ran the Sampler and I am getting error as javax.naming.NameNotFoundException: com.ibm.mq.jms.MQQueueConnectionFactory enter image description here

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?

2
Did you follow the steps here? stackoverflow.com/questions/33278071/…Pete
Yes i did follow those steps. Roger also mentioned information related to that in the Answer. However, no luckManiram

2 Answers

1
votes

Wow. You are missing a bunch of MQ JAR files.

e) javax.jms.jar

That's not an MQ JAR file.

Here's the list of MQ JAR files that you need for MQ JMS Pub/Sub:

  1. com.ibm.mq.commonservices.jar
  2. com.ibm.mq.headers.jar
  3. com.ibm.mq.jar
  4. com.ibm.mq.jmqi.jar
  5. com.ibm.mq.pcf.jar
  6. com.ibm.mqjms.jar
  7. connector.jar
  8. dhbcore.jar
  9. fscontext.jar
  10. jms.jar
  11. jndi.jar
  12. jta.jar
  13. ldap.jar
  14. providerutil.jar
  15. rmm.jar

If you want to make your life easier, starting with MQ v8.0.0.4, there is an MQ JAR file called 'com.ibm.mq.allclient.jar' that contains everything.

1
votes

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.