0

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?

Adnan
  • 2,931
  • 3
  • 23
  • 35
Maniram
  • 169
  • 1
  • 3
  • 12
  • Did you follow the steps here? http://stackoverflow.com/questions/33278071/jmeter-to-connect-to-ibm-mq – Pete Sep 07 '16 at 23:27
  • Yes i did follow those steps. Roger also mentioned information related to that in the Answer. However, no luck – Maniram Sep 08 '16 at 03:29

2 Answers2

1

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.

Roger
  • 7,062
  • 13
  • 20
  • Hmm.. dint help much. It is still the same issue. I have tried both ways. 1) Installing all the jars specified by you 2) With allclient jar. Looking at the error, i understand that it is looking for `com.ibm.mq.jms.MQQueueConnectionFactory` class which is already present in `com.ibm.mqjms.jar`. This jar is under the Jmeter lib. Should have worked properly. – Maniram Sep 07 '16 at 16:21
1

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.

Tim McCormick
  • 956
  • 4
  • 7
  • Thanks for the explanation. I was able to see the connection factory name in the .bindings file and have used the same in Jmeter as well. So it should have found the jndi name for Connection Factory correctly. Below is what i see in .bindings file `Foreign_CF_DR/ClassName=com.ibm.mq.jms.MQQueueConnectionFactory` – Maniram Sep 12 '16 at 03:40
  • Looks like the JNDI name is 'Foreign_CF_DR' – Tim McCormick Sep 12 '16 at 13:22
  • unfortunately, it is not the case. I have tried that as well earlier. It is still failing with similar error `javax.naming.NameNotFoundException: Foreign_CF_DR` – Maniram Sep 12 '16 at 16:51