Categories
Performance Testing testing

Loadtesting Websphere IBM MQ server using JMETER

 

 About :

For Loadtesting Apache Active MQ , JMS-Point-to-Point sampler in Jmeter will help us. Think that you do not have JNDI settings and no apache activemq for JMS messaging, instead IBM Websphere MQ is in place.  One day your manager is coming and asking you to test IBM MQ using open source testing tool as they do not ready to pay for small scale performance testing.

In that case , here is the steps to use Jmeter to load test IBM Websphere MQ.
The content here is pretty much precious and definitely it will save your valuable time 🙂

  • Below are the Java and MQ jars needed.  Download these jar files and place it under Jmeter’s libext directory. ‘jmeter-jms-skip-jndi-0.0.1.jar‘ is the jar contains the MQ declaration and coding to connect it. You can down it from the URL :http://www.java2s.com/Code/Jar/j/Downloadjmeterjmsskipjndi001jar.htm
    • com.ibm.mq.jar
    • org.springframework.beans.jar
    • org.springframework.jms.jar
    • javax.jms.jar
    • jmeter-jms-skip-jndi-0.0.1.jar
    • spring-core.jar
  •  Open Jmeter -> File-> New->TestPlan -> Add Thread Group
  • Under Thread Group add Samplers->JMS Point-to-Point Sampler and configure the parameter. As given in the below Screenshot.
  •  Run Jmeter Script and Enjoy IBM MQ load testing .

MQ1

154 replies on “Loadtesting Websphere IBM MQ server using JMETER”

The attached screenshot is not very clear and I could not do the settings as specified.
Please re-attach the screen shot.

Hi Suganthi/Sandeep
Can you give me some sample xml content which I can use for testing.

I get the NULL pointer exception error when I test it, I feel the content is not in proper format..

awesome, though it’s simplified from yogesh’s blog. I was getting the class not found errors unless i include the jar files in the run time in the thread group…

Hi Anand,

It is right but I have never included class files in Jmeter class path. Instead I will always place all the external jar files to lib/ext folder and set JAVA_HOME environmental variable.

hi Sugandhi,

I am getting below error after running the test by adding JAR’s in the Lib.

Response code:
Response message: javax.naming.NoInitialContextException: Cannot instantiate class: com.elega9t.jmeter.jms.testing.InitialContextFactory [Root exception is java.lang.ClassNotFoundException: com.elega9t.jmeter.jms.testing.InitialContextFactory ]

can u please help to correct the error.

Hi Saranya,

It seems like the jar file ‘jmeter-jms-skip-jndi-0.0.1.jar’ is not included / referred by jmeter script. Please ensure that it is placed in the jmeter/lib/ext folder.

Thanks
Suganthi

i can see the file jmeter-jms-skip-jndi-0.0.1.jar included in lib ext directory.Kindlyb help in resolving this error.
error description:
Thread Name: Thread Group 1-1
Sample Start: 2014-02-19 12:29:35 IST
Load time: 0
Latency: 0
Size in bytes: 0
Headers size in bytes: 0
Body size in bytes: 0
Sample Count: 1
Error Count: 1
Response code:
Response message: javax.naming.NoInitialContextException: Cannot instantiate class: com.elega9t.jmeter.jms.testing.InitialContextFactory [Root exception is java.lang.ClassNotFoundException: com.elega9t.jmeter.jms.testing.InitialContextFactory ]

Response headers:

SampleResult fields:
ContentType:
DataEncoding: null

Hi Saranya,

Did you set JMETER_HOME environmental variable? If you set this environment variable, Jmeter should be able to access your jars automatically. Can you confirm this?

Regards
Suganthi

JAVA_HOME should be the path till the JDK folder and JMETER_HOME should be the path of jmeter folder from your system

Hi Suganthi, could you help to look into why below error message display? how to fix it?
Thread Name: Thread Group 1-1
Sample Start: 2014-04-10 15:58:19 CST
Load time: 1
Latency: 0
Size in bytes: 0
Headers size in bytes: 0
Body size in bytes: 0
Sample Count: 1
Error Count: 1
Response code:
Response message: java.lang.NoClassDefFoundError: com/ibm/mq/jms/MQQueueConnectionFactory

Response headers:

SampleResult fields:
ContentType:
DataEncoding: null

Hi Iris,

It seems like you have not added IBM MQ jar file. Please Ensure the following jar files in your jmeter/lib/ext folder.

• com.ibm.mq.jar
• org.springframework.beans.jar
• org.springframework.jms.jar
• javax.jms.jar
• jmeter-jms-skip-jndi-0.0.1.jar
• spring-core.jar

Thank you, it’s been fixed, I add other jar files as well
com.ibm.mqjms.jar
javax.resource.jar
com.ibm.dhbcore.jar

But now there is another question:

it report that NullPointerException as below:
Thread Name: Thread Group 1-1
Sample Start: 2014-04-10 17:00:31 CST
Load time: 0
Latency: 0
Size in bytes: 0
Headers size in bytes: 0
Body size in bytes: 0
Sample Count: 1
Error Count: 1
Response code:
Response message: java.lang.NullPointerException

Response headers:

SampleResult fields:
ContentType:
DataEncoding: null

Do you have any idea?

It means that you MQ is not able to communicate. Can you recheck the parameters as in the image that i have posted.

1. Queues should start with QUEUE_yourqueuname
2. check intialcontextfacory (give it as it is in the image)
3. verify channel,hostname,queuemanager,transportType and port

I’ve checked my parameter
1. Queue is started with QUEUE_
2. intial contextfactory is same as your image which is com.elega9t.jmeter.jms.InitialContextFactory
3. I set channel=XXX, host=XXX, queueManager=XXX, port=XXX, and I don’t set transportType, may I know is the parameter name case sensitive? what’s transportType? is it necessary?

normally we use keystore to connect MQ together with channel, host, and queueManager etc. but in your example there is setting for keystore related, how can I do in order use keystore to connecting the queue?

Yes transportType is mandatory and case sensitive. For my app it is 1. can u check it by giving tranportType as 1

There is no keystore settings needed here. if you are using IBM Websphere MQ, then these settings will lead connecting to IBM MQ from Jmeter.

I see..now that error was not existing.
and comes another error which I searched in internet but no founding yet, sorry to disturb you all the time, would you pls see below error, seems it failed to connect hostname by the queueManager
Response code:
Response message: javax.naming.NamingException: MQJMS2005: failed to create MQQueueManager for ‘XXXXXXXX:XXXX’—>(‘Hostname:queueManager’)

Initially me too gone through all of these errors.Please recheck your parameter values, you would have done a mistake or given wrong value on Queue manager details.

Yes, I’ve gone throung all the parameter setting here, still get the same error code, not sure where is wrong
QueueConnectionFactory:CONNECTION_FACTORY
JNDI Request Queue:QUEUE_XXXXXX1
JNDI Request Queue:QUEUE_XXXXXX2
Communication stype:request response
Initial ContextFactory:com.elega9t.jmeter.jms.InitialContextFactory
channel:TSSXXXX.XXXXXXXX
port:1414
hostName:aptXXX1.XXXXXXXX.XXX
queueManager:APTXXXX
transportType:1

Hi Suganthi,
I have installed IBM Websphere MQ in my system and I was able to send message but in JMeter it is not working. Getting the following error.

Response message: javax.naming.NamingException: MQJMS2005: failed to create MQQueueManager for ‘D-113043666:MQ_Balaji’

JMS Resources:
————–
Queue Connection Factory: CONNECTION_FACTORY
JNDI name Request queue: QUEUE_Test01
JNDI name Receive queue: -blank-

JNDI Properties:
—————-
channel SYSTEM.DEF.CLNTCONN
hostName D-113043666 (my sys name)
port 1415
queueManager MQ_Balaji
transportType 1

Please help.

Hi Balaji,

one thing i am able to see is you have given reply to queue ‘blank’. Its mandatory that you have to give valid reply queue as QUEUE_yourqueuename.

Can you give it and let me know?

But this error is related to your configuration details like queue manager details and other parameters. Please check once again.

I did not face this error Balaji. This error seems to be in relation with connection_factory or other related parameters. if you unjar the file ‘jmeter-jms-skip-jndi-0.0.1.jar’ you can see all the parameters assigned internally. Please check this once, you may get some clue and please let me know if you still need my help.

for my app channel name is ‘SYSTEM.ADMIN.SVRCONN’, if this is common, it may work for you, try this

Make sure your user name (if you are running jmeter in windows, then your windows login user name) is added in the MQ Users, or watch the MQ Logs for more information.

Hi Suganthi,

I am getting the below error:
java.lang.NoClassDefFoundError: com/ibm/msg/client/commonservices/trace/Trace

Pls Advice..

I am getting below error in jmeter listener

Thread Name: JMSTestPlan-PointtoPoint 1-1
Sample Start: 1970-01-01 05:30:00 IST
Load time: 0
Latency: 0
Size in bytes: 0
Headers size in bytes: 0
Body size in bytes: 0
Sample Count: 1
Error Count: 1
Response code: 000
Response message: javax.naming.NamingException: Expected javax.jms.ConnectionFactory, found javax.naming.Reference

Response headers:

SampleResult fields:
ContentType:
DataEncoding: null

pl advise.

Hi Nikhil,

Not needed. Queue connection settings are already there in the jmeter jar file ‘jmeter-jms-skip-jndi-0.0.1.jar’ ,.

Hi… Thanks for this. When I publish a message using the above my message goes in MQHRF2 format. I need to send message in MQSTR format. Any suggestions ?

Hi jack,

Design the workload model for the above settings i have described and add set thread group for the same

Hi Suganthi,

i have added all the required jar’s but on running the script i am getting below error,

2014/07/28 21:39:00 ERROR – jmeter.protocol.jms.sampler.JMSSampler: java.lang.NullPointerException
at com.elega9t.jmeter.jms.InitialContextFactory$1.lookup(InitialContextFactory.java:52)
at javax.naming.InitialContext.lookup(InitialContext.java:411)
at org.apache.jmeter.protocol.jms.sampler.JMSSampler.threadStarted(JMSSampler.java:328)
at org.apache.jmeter.threads.JMeterThread$ThreadListenerTraverser.addNode(JMeterThread.java:599)
at org.apache.jorphan.collections.HashTree.traverseInto(HashTree.java:961)
at org.apache.jorphan.collections.HashTree.traverse(HashTree.java:946)
at org.apache.jmeter.threads.JMeterThread.threadStarted(JMeterThread.java:568)
at org.apache.jmeter.threads.JMeterThread.initRun(JMeterThread.java:556)
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:254)
at java.lang.Thread.run(Thread.java:724

did anyone have noticed this issue? if yes then how it was resolved.

Thank You !!!

Hi,

Can you please check that ‘communcation style’ in jms request as ‘ Request Response’ and run the test once again

Thanks
Suganthi

Hi Suganthi,
I was going through your blog and able to resolve some of the initials errors that were coming. Now I am getting below exception and there is no class name mentioned as well.
Thread Name: Thread Group 1-1
Sample Start: 2014-10-24 11:06:32 EDT
Load time: 0
Latency: 0
Size in bytes: 0
Headers size in bytes: 0
Body size in bytes: 0
Sample Count: 1
Error Count: 1
Response code:
Response message: java.lang.NoClassDefFoundError

Response headers:

SampleResult fields:
ContentType:
DataEncoding: null

I am now able to solve that issue by placing additional jars that were required. Now , I am getting another exception.

Thread Name: Thread Group 1-1
Sample Start: 2014-10-24 11:45:15 EDT
Load time: 0
Latency: 0
Size in bytes: 0
Headers size in bytes: 0
Body size in bytes: 0
Sample Count: 1
Error Count: 1
Response code:
Response message: javax.jms.JMSException: MQJMS2008: failed to open MQ queue ”.

Response headers:

SampleResult fields:
ContentType:
DataEncoding: null

I am not sure how to put the queue name on fields “JNDI Name Request Queue” , “JNDI Name Receive Queue”. I have placed as below :
JNDI Name Request Queue : QUEUE_QM.BRK.TEST
JNDI Name Receive Queue : QUEUE_QM_BRK_REC_TEST
Please let me know if it is correct .

Hi Suganthi,

I am getting below error in JMETER while trying to connect to Queue in remote Queue Manager.

2014/10/24 13:02:50 DEBUG – jmeter.protocol.jms.sampler.Receiver: Receiver – ctor. Creating consumer with JMS Selector:
2014/10/24 13:02:50 ERROR – jmeter.protocol.jms.sampler.JMSSampler: MQJMS2008: failed to open MQ queue ”. javax.jms.InvalidDestinationException: MQJMS2008: failed to open MQ queue ”.
at com.ibm.msg.client.wmq.v6.jms.internal.MQQueueServices.getQueueOpenException(MQQueueServices.java:902)
at com.ibm.msg.client.wmq.v6.jms.internal.JMSServicesMgr.getQueueOpenException(JMSServicesMgr.java:159)
at com.ibm.msg.client.wmq.v6.jms.internal.MQSession.createQConsumer(MQSession.java:3072)
at com.ibm.msg.client.wmq.v6.jms.internal.MQSession.createConsumer(MQSession.java:2391)
at com.ibm.msg.client.wmq.v6.jms.internal.MQSession.createConsumer(MQSession.java:2450)
at com.ibm.msg.client.jms.internal.JmsSessionImpl.createConsumer(JmsSessionImpl.java:794)
at com.ibm.msg.client.jms.internal.JmsSessionImpl.createConsumer(JmsSessionImpl.java:844)
at com.ibm.msg.client.jms.internal.JmsQueueSessionImpl.createReceiver(JmsQueueSessionImpl.java:92)
at com.ibm.mq.jms.MQQueueSession.createReceiver(MQQueueSession.java:121)
at com.ibm.mq.jms.MQQueueSession.createConsumer(MQQueueSession.java:196)
at org.springframework.jms.connection.CachingConnectionFactory$CachedSessionInvocationHandler.getCachedConsumer(CachingConnectionFactory.java:373)
at org.springframework.jms.connection.CachingConnectionFactory$CachedSessionInvocationHandler.invoke(CachingConnectionFactory.java:323)
at $Proxy1.createConsumer(Unknown Source)
at org.apache.jmeter.protocol.jms.sampler.Receiver.(Receiver.java:75)
at org.apache.jmeter.protocol.jms.sampler.Receiver.createReceiver(Receiver.java:100)
at org.apache.jmeter.protocol.jms.sampler.JMSSampler.threadStarted(JMSSampler.java:332)
at org.apache.jmeter.threads.JMeterThread$ThreadListenerTraverser.addNode(JMeterThread.java:597)
at org.apache.jorphan.collections.HashTree.traverseInto(HashTree.java:961)
at org.apache.jorphan.collections.HashTree.traverse(HashTree.java:946)
at org.apache.jmeter.threads.JMeterThread.threadStarted(JMeterThread.java:566)
at org.apache.jmeter.threads.JMeterThread.initRun(JMeterThread.java:554)
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:253)
at java.lang.Thread.run(Thread.java:662)

I am now able to connect to Queue Manager and send message using single queue and channel connection. What if i need to connect to different queues using separate channel connection for the same queue manager. Can we increase the queue and channel count using this tool.

Hi Gaurav..Good to know that issue is resolved. For the above question, add CSV DATA CONFIG element and give different queue names in the CSV and call that variable name in the respective JMS sampler. Hope this helps you..Do let me know the results.
Thank you,
Site admin

Hi Suganthi,

I have remote queue manager, can i provide remore provide URL and connect through JMETER. will it support remote connection?

Thanks,
Bala.J

Hi Bala,

Local or Remote it does not matter.Provide the right queue manager configuration parameters,But it matters when you consider response time as it will add network latency .

Hi,

Thanks for this awesome page content. I have a question, does the IBM MQ server always require to have the Initial Context Factory(JNDI Properties) configured in order to establish a connection with Jmeter? Is it possible to configure Jmeter by not specifying the Initial Context Factory if the IBM MQ server does not have the Initial Context Factory configured?

Thank you
Nick

Hi Nick,

Hi Nick,

The above settings are given for the scenario where JNDI properties are not available in IBM Webphere MQ . Using Initial context factory properties are given in order to tell client to connect to the right Queue Manager .
You can use decompiler and see the code written in jmeter-jms-skip-jndi-0.0.1.jar file.

You can even modify the code and generate your own JAR file.

Hi Suganthi,

I have another question, I get the following error in the log file while attempting to establish a connection to the IBM MQ server:

jmeter.threads.JMeterThread: Thread started: Point-to-Point 1-1
2015/06/05 09:06:09 ERROR – jmeter.protocol.jms.sampler.JMSSampler: MQJMS2013: invalid security authentication supplied for MQQueueManager javax.naming.NamingException: MQJMS2013: invalid security authentication supplied for MQQueueManager

The IBM MQ server has no authentification information configured so it should accept a connection without specifying a username and a password. Do you know if we have to add the username and password JNDI properties and set their values to ‘string empty’ in Jmeter? Will I have to modify the jmeter-jms-skip-jndi-0.0.1.jar file in order to do so?

Thank you,
Nick

Make sure your user name (if you are running jmeter in windows, then your windows login user name) is added in the MQ Users, or watch the MQ Logs for more information.

Hi Suganthi,

I have a question concerning the collection of test results. I would like to retrieve the data from the response message and to view it in a file with a timestamp. I’m always receiving the “No reply message received” for each Request. I believe it’s because the application on the other end consumes the request message and produces a new message for the response thus losing the Request Message Identifier. I also noticed that the response message gets consumed once in the Receive queue. I’m wondering where the response messages go after being consumed and are the response messages conserved somewhere in a file after being consumed?

Thank you,
Nick

Yes Nick. There are 2 things you have to set it here,
1) Select communication type as ‘ Request and Response’
2) Set Timeout little more than usual like ‘500000’ (which is 500 secs)
3) Also you can not see the message in the explorer as the Jmeter reads it , instead you can view it in Response data of Jmeter , set response assertion, so that you do not need to check each request response.

Thanks Suganthi for your kind response.

Also, do you know if there’s a way for the request and response messages to not be correlated or must they absolutely be correlated in order to view the Response data in Jmeter?

Nick

I am not sure about the alternative way of correlation. in other way , yes, Correlation is must in order to see the response.

Hi,

I am trying to get this working on a MAC and I always get this error.

Invalid name. Should be ‘CONNECTION_FACTORY’ or should start with ‘QUEUE_’

I have set queueconnection factory to CONNECTION_FACTORY and tried by using queue name with QUQUE_.

Thanks for your time.
-Anand

Hi,

I am trying to get this working but I am getting the below error:

Root exception is java.lang.ClassNotFoundException: com.sun.jndi.fscontext.RefFSContextFactory]

Can you please help me with this?

Regards,
Pradhyumna

Hi Prad,

Can you please give me some more details on what you are trying to test? is it IBM Websphere MQ?

Also it seems like you are testing with JNDI settings. If you follow the above steps in the post, with the jars that i specified you have to give the appropriate queue name and queue manager details in JMS point to point sample with no jndi settings.

Hi Suganthi,

Yes it is IBM MQ. I need to put messages at a particular rate for a load test.
I solved most of the error but now I am getting a class not found error.

javax/transaction/TransactionManager java.lang.NoClassDefFoundError: javax/transaction/TransactionManager

Thanks for replying. Much appreciated.

-Prad

It is related to your application/project where you are missing some dependency jar in the project class path.

Hi,

I encountered the following error(see below), and tried the solutions mentioned in the previous comments but I was still unable to resolve it. Please help. 🙂

Response message: javax.naming.NamingException: JMSWMQ2013: The security authentication was not valid that was supplied for QueueManager ‘TEST.QUEUE.MANAGER’ with connection mode ‘Client’ and host name ‘XXX.XX.X.XX(1414)’.

Thanks in advance!

Hi Jonathan,

Looks like jmeter not able to communicate with MQ server details you provided. Check your queue manager ,host-name and also ensure that queue names starts with ‘Queue_’ at its beginning.

Thanks
Suganthi

Suganthi, Thank you for your blog; it is really helpful.
I am getting the following error; kindly help me. 🙂
Regards,
-prasad.

Settings:-
CONNECTION_FACTORY
QUEUE_Req
QUEUE_Res

hostname: 127.0.0.1
port: 1415
queueManager: Test
tranportType: 1
channel: SYSTEM.ADMIN.SVRCONN
Content: 1|212661223344|EN|Test Message from Prasad

Error:-
2015/08/20 22:47:15 INFO – jmeter.threads.JMeterThread: Thread started: Thread Group 1-1
2015/08/20 22:47:15 ERROR – jmeter.protocol.jms.sampler.JMSSampler: java.lang.NullPointerException
at com.elega9t.jmeter.jms.InitialContextFactory$1.lookup(InitialContextFactory.java:53)
at javax.naming.InitialContext.lookup(Unknown Source)
at org.apache.jmeter.protocol.jms.sampler.JMSSampler.threadStarted(JMSSampler.java:329)
at org.apache.jmeter.threads.JMeterThread$ThreadListenerTraverser.addNode(JMeterThread.java:610)
at org.apache.jorphan.collections.HashTree.traverseInto(HashTree.java:998)
at org.apache.jorphan.collections.HashTree.traverse(HashTree.java:980)
at org.apache.jmeter.threads.JMeterThread.threadStarted(JMeterThread.java:579)
at org.apache.jmeter.threads.JMeterThread.initRun(JMeterThread.java:567)
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:257)
at java.lang.Thread.run(Unknown Source)

2015/08/20 22:47:15 WARN – jmeter.protocol.jms.sampler.JMSSampler: Session may not be null while creating message java.lang.IllegalStateException: Session may not be null while creating message
at org.apache.jmeter.protocol.jms.sampler.JMSSampler.createMessage(JMSSampler.java:189)
at org.apache.jmeter.protocol.jms.sampler.JMSSampler.sample(JMSSampler.java:145)
at org.apache.jmeter.threads.JMeterThread.process_sampler(JMeterThread.java:434)
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:261)
at java.lang.Thread.run(Unknown Source)

2015/08/20 22:47:15 INFO – jmeter.threads.JMeterThread: Thread is done: Thread Group 1-1
2015/08/20 22:47:15 INFO – jmeter.threads.JMeterThread: Thread finished: Thread Group 1-1
2015/08/20 22:47:15 INFO – jmeter.engine.StandardJMeterEngine: Notifying test listeners of end of test
2015/08/20 22:47:15 INFO – jmeter.gui.util.JMeterMenuBar: setRunning(false,*local*)

Prasad,

looks like InitialContextFactory is not found. Can you check it and let me know

Hi Suganthi,

where can I download following Jar files? They are available on the lik you have provided.

• com.ibm.mq.jar
• org.springframework.beans.jar
• org.springframework.jms.jar
• javax.jms.jar
• jmeter-jms-skip-jndi-0.0.1.jar
• spring-core.jar

Thanks

Hi Suganthi

Please ignore my previous question. I have download jar files and copied on to /lib/ext folder. Alos. I have set JAVA_HOME and JMETER_HOME correctly.

Jmeter throws following error. Please advice.

2015/08/25 16:15:06 ERROR – jmeter.protocol.jms.sampler.JMSSampler: com/ibm/mq/jms/MQQueueConnectionFactory java.lang.NoClassDefFoundError: com/ibm/mq/jms/MQQueueConnectionFactory
at com.elega9t.jmeter.jms.InitialContextFactory$1.lookup(InitialContextFactory.java:51)
at javax.naming.InitialContext.lookup(Unknown Source)
at org.apache.jmeter.protocol.jms.sampler.JMSSampler.threadStarted(JMSSampler.java:329)
at org.apache.jmeter.threads.JMeterThread$ThreadListenerTraverser.addNode(JMeterThread.java:610)
at org.apache.jorphan.collections.HashTree.traverseInto(HashTree.java:998)
at org.apache.jorphan.collections.HashTree.traverse(HashTree.java:980)
at org.apache.jmeter.threads.JMeterThread.threadStarted(JMeterThread.java:579)
at org.apache.jmeter.threads.JMeterThread.initRun(JMeterThread.java:567)
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:257)
at java.lang.Thread.run(Unknown Source)

2015/08/25 16:15:06 WARN – jmeter.protocol.jms.sampler.JMSSampler: Session may not be null while creating message java.lang.IllegalStateException: Session may not be null while creating message
at org.apache.jmeter.protocol.jms.sampler.JMSSampler.createMessage(JMSSampler.java:189)
at org.apache.jmeter.protocol.jms.sampler.JMSSampler.sample(JMSSampler.java:145)
at org.apache.jmeter.threads.JMeterThread.process_sampler(JMeterThread.java:434)
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:261)
at java.lang.Thread.run(Unknown Source)

2015/08/25 16:15:06 INFO – jmeter.threads.JMeterThread: Thread is done: Thread Group 1-1
2015/08/25 16:15:06 INFO – jmeter.threads.JMeterThread: Thread finished: Thread Group 1-1
2015/08/25 16:15:06 INFO – jmeter.engine.StandardJMeterEngine: Notifying test listeners of end of test
2015/08/25 16:15:06 INFO – jmeter.gui.util.JMeterMenuBar: setRunning(false,*local*)

Hi Suganthi

How can I parametrise the queue name instead of hard coding.
JNDI name Request queue value is set to “QUEUE_postcard” which works fine.

However JNDI name Request queue value is set to “QUEUE_${Que}” fails .
where in “Que” is a CVS data set config element.

Thanks

Hi Suganthi,

I have sample XML files and I need to push them to MQ. I have got Queue Manager, Queue Manager Cluster and Queue names from Developers.

What other data do I need to ask from Developer and how to simulate this using JMeter.

We have IBM MQ9 series in place.

Thanks,
Devendra

That is enough for now. Try follow the specified steps above and let me know if you face any issues.

Hi Suganthi ,

Your blog is awesome,

Please help me as we are testing IBM MQ ,
I have a JMeter JMS Point to Point test in which I am sending an some data packets onto a queue which should go further and response is expected,instead i am getting

“No reply message received”
If I set the ‘communication-style’ to ‘Request Only’ the test passes. All my connections are correct and I am using JMeter version 2.13 with all IBM MQ JMS implementation jars.
I have also changed the jmeter.properties file to enable JMSSampler.useSecurity.properties=false. This has not worked.

Please help us to fix this issue

Thanks Kiran.

I think you are getting that due to timeout issue .Keep the communication-style as “Request Response” and Increase the timeout to some 15mins which is 900000 milliseconds , this is max value if response does not come still , you have to check whether it is a performance issue.

I had the same issue and this is how it was addressed:

It appears if you are using different queues for request and response, neither of the pre defined attributes to use either messageID or CorrelationID to track response messages does not work.

Therefore don’t select any of the two – deselect both. Instead, define a new attribute any the JMS properties for correlation ID as follows

Property name: JMSCorrelationId Property value: MesgID-${_time(,)}

This should work fine.

Hi Suganthi,

Awesome blog .

Could you help me in this how can i send request for different queues through distributed jmeter(using 1 machine as mater and other 2 are slaves )?

I have the same problem as PerfTester.

I downloaded all needed jars from http://www.java2s.com/
com.ibm.mq.jar
org.springframework.beans.jar
org.springframework.jms.jar
javax.jms.jar
jmeter-jms-skip-jndi-0.0.1.jar
spring-core.jar

and saved to apache-jmeter-2.13libext path

Anyone could upload working libraries to for example dropbox?

2015/11/10 17:25:49 ERROR – jmeter.protocol.jms.sampler.JMSSampler: com/ibm/mq/jms/MQQueueConnectionFactory java.lang.NoClassDefFoundError: com/ibm/mq/jms/MQQueueConnectionFactory
at com.elega9t.jmeter.jms.InitialContextFactory$1.lookup(InitialContextFactory.java:51)
at javax.naming.InitialContext.lookup(Unknown Source)
at org.apache.jmeter.protocol.jms.sampler.JMSSampler.threadStarted(JMSSampler.java:329)
at org.apache.jmeter.threads.JMeterThread$ThreadListenerTraverser.addNode(JMeterThread.java:610)
at org.apache.jorphan.collections.HashTree.traverseInto(HashTree.java:998)
at org.apache.jorphan.collections.HashTree.traverse(HashTree.java:980)
at org.apache.jmeter.threads.JMeterThread.threadStarted(JMeterThread.java:579)
at org.apache.jmeter.threads.JMeterThread.initRun(JMeterThread.java:567)
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:257)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: com.ibm.mq.jms.MQQueueConnectionFactory
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
… 10 more

2015/11/10 17:25:49 WARN – jmeter.protocol.jms.sampler.JMSSampler: Session may not be null while creating message java.lang.IllegalStateException: Session may not be null while creating message
at org.apache.jmeter.protocol.jms.sampler.JMSSampler.createMessage(JMSSampler.java:189)
at org.apache.jmeter.protocol.jms.sampler.JMSSampler.sample(JMSSampler.java:145)
at org.apache.jmeter.threads.JMeterThread.process_sampler(JMeterThread.java:434)
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:261)
at java.lang.Thread.run(Unknown Source)

2015/11/10 17:25:49 INFO – jmeter.threads.JMeterThread: Thread is done: Thread Group 1-1
2015/11/10 17:25:49 INFO – jmeter.threads.JMeterThread: Thread finished: Thread Group 1-1
2015/11/10 17:25:49 INFO – jmeter.engine.StandardJMeterEngine: Notifying test listeners of end of test
2015/11/10 17:25:49 INFO – jmeter.gui.util.JMeterMenuBar: setRunning(false,*local*)

issue has been resolved,
it needs some more jars than sugandi specified

the issues and fixes are like below
• Response message: javax.naming.NoInitialContextException: Cannot instantiate class: com.elega9t.jmeter.jms.InitialContextFactory [Root exception is java.lang.ClassNotFoundException: com.elega9t.jmeter.jms.InitialContextFactory]
Solution: place jmeter-jms-skip-jndi-0.0.1.jar in JMETER_HOME/lib/ext
• Response message: java.lang.NoClassDefFoundError: com/ibm/mq/jms/MQQueueConnectionFactory
Solution: added com.ibm.mq.jar, org.springframework.beans.jar ,org.springframework.jms.jar, javax.jms.jar &
spring-core.jar in JMETER_HOME/lib/ext still same issue  .
Added “dhbcore.jar” JMETER_HOME/lib/ext, this issue resolved
• Response message: java.lang.NoClassDefFoundError: javax/transaction/TransactionManager
Solution: add “javaee.jar in” in JMETER_HOME/lib/ext

ping me if you face any other issues

I am getting following error. Please help/suggest.

ERROR – jmeter.threads.JMeterThread: Test failed! java.lang.NoSuchMethodError: com.ibm.mq.jmqi.handles.Hconn.getQsgName()Ljava/lang/String;
at com.ibm.msg.client.wmq.internal.WMQConnection.(WMQConnection.java:542)
at com.ibm.msg.client.wmq.factories.WMQConnectionFactory.createV7ProviderConnection(WMQConnectionFactory.java:7192)
at com.ibm.msg.client.wmq.factories.WMQConnectionFactory.createProviderConnection(WMQConnectionFactory.java:6583)
at com.ibm.msg.client.jms.admin.JmsConnectionFactoryImpl.createConnection(JmsConnectionFactoryImpl.java:295)
at com.ibm.mq.jms.MQConnectionFactory.createCommonConnection(MQConnectionFactory.java:6232)
at com.ibm.mq.jms.MQQueueConnectionFactory.createQueueConnection(MQQueueConnectionFactory.java:115)
at org.springframework.jms.connection.SingleConnectionFactory.doCreateConnection(SingleConnectionFactory.java:345)
at org.springframework.jms.connection.SingleConnectionFactory.initConnection(SingleConnectionFactory.java:295)
at org.springframework.jms.connection.SingleConnectionFactory.createConnection(SingleConnectionFactory.java:227)
at org.springframework.jms.connection.SingleConnectionFactory.createQueueConnection(SingleConnectionFactory.java:244)
at com.elega9t.jmeter.jms.InitialContextFactory$1.lookup(InitialContextFactory.java:60)
at javax.naming.InitialContext.lookup(Unknown Source)
at org.apache.jmeter.protocol.jms.sampler.JMSSampler.threadStarted(JMSSampler.java:329)
at org.apache.jmeter.threads.JMeterThread$ThreadListenerTraverser.addNode(JMeterThread.java:610)
at org.apache.jorphan.collections.HashTree.traverseInto(HashTree.java:998)
at org.apache.jorphan.collections.HashTree.traverseInto(HashTree.java:999)
at org.apache.jorphan.collections.HashTree.traverse(HashTree.java:980)
at org.apache.jmeter.threads.JMeterThread.threadStarted(JMeterThread.java:579)
at org.apache.jmeter.threads.JMeterThread.initRun(JMeterThread.java:567)
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:257)
at java.lang.Thread.run(Unknown Source)

But Shubra, it is related to jar file only it is unable to detect your jar com.ibm.mq.jmqi.jar.

Hi Suganthi,

We have installed MQ Explorer in the same machine, from here we are able to connect to the Queues, from JMeter end do we need to get any details from MQ to set? like initialContextFactory and queueConnectionFactory or can we give whatever has been given in the above image?

Give the messages in the CSV file and parameterize it in Jmeter. If you have a line of message as input , then use line separator
in csv config element instead of comma delimeter
${__BeanShell(System.getProperty(“line.separator”);)} – give this expression in the place of delimeter

Hi Suganthi,
thanks for the reply

i did like this
1. added CSV config, which has single column and more data
2. ${__BeanShell(System.getProperty(“line.separator”);)} – added this at delimeter option
3. specified ${Data} in CONTENT

Result:
message sent to the queue is EOF,
i’m unable to attach images here else explanation would have been better.

Thanks

Are you referring the input as ‘Data’ ? If so can you attach Debug Sampler and see what is being sent to ${Data}?

Yes i’m referring input as Data,
in debug sampler i can test=,

if you have such configuration, can you attach a screenshot here please?

HI, can we send multiple messages per thread? I’m able to do JMS testing with multiple threads sending 1 message each, but I want to test with 1 thread sending multiple messages. Appreciate any help.

I am using Point to Point sampler from JMS to send message to MQ Queue

I am able to telnet to MQ server.

when i run my script in JMeter – i am getting the following error:

Response message: javax.naming.NameNotFoundException: myQueueName

Let me know what the issue is?

Hi,
Could you please help? I double checked all the jmeter test plan settings as per your screenshot. I added all jars. I am getting following error and not able to find why it is showing this error. I have following filled:
QueueConnection Factory: CONNECTION_FACTORY
JNDI name from request queue: QUEUE_
JNDI name from Receive queue: QUEUE_
Communication Style: Request Response
both use ids checked
Timeout: 10000
content is filled

Initial Context Factory: com.elega9t.jmeter.jms.InitialContextFactory
channel
hostName
port
queueManager
tranportType
is filled

I get this error:

Thanks for help.

Praveen
2016/09/25 20:47:55 ERROR – jmeter.protocol.jms.sampler.JMSSampler: java.lang.NullPointerException
at com.elega9t.jmeter.jms.InitialContextFactory$1.lookup(InitialContextFactory.java:56)
at javax.naming.InitialContext.lookup(Unknown Source)
at org.apache.jmeter.protocol.jms.sampler.JMSSampler.threadStarted(JMSSampler.java:329)
at org.apache.jmeter.threads.JMeterThread$ThreadListenerTraverser.addNode(JMeterThread.java:647)
at org.apache.jorphan.collections.HashTree.traverseInto(HashTree.java:996)
at org.apache.jorphan.collections.HashTree.traverse(HashTree.java:978)
at org.apache.jmeter.threads.JMeterThread.threadStarted(JMeterThread.java:616)
at org.apache.jmeter.threads.JMeterThread.initRun(JMeterThread.java:604)
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:237)
at java.lang.Thread.run(Unknown Source)

2016/09/25 20:47:55 WARN – jmeter.protocol.jms.sampler.JMSSampler: Session may not be null while creating message java.lang.IllegalStateException: Session may not be null while creating message
at org.apache.jmeter.protocol.jms.sampler.JMSSampler.createMessage(JMSSampler.java:189)
at org.apache.jmeter.protocol.jms.sampler.JMSSampler.sample(JMSSampler.java:145)
at org.apache.jmeter.threads.JMeterThread.executeSamplePackage(JMeterThread.java:465)
at org.apache.jmeter.threads.JMeterThread.processSampler(JMeterThread.java:410)
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:241)
at java.lang.Thread.run(Unknown Source)

Hi All,
I tried everything given in this blog but still stuck with the following error:

jmeter.protocol.jms.sampler.JMSSampler: javax/transaction/TransactionManager java.lang.NoClassDefFoundError: javax/transaction/TransactionManager
at com.ibm.mq.jms.MQConnection.(MQConnection.java:512)

I absolutely have no working experience with JMeter. Can anyone help!!!

Hi,

Trying to create JMS Sampler for sending messages to IBM Websphere MQ Topics. Try to resolve the below error by changing multiple values, jars, gone through the lot of blogs but could not resolved. Please can you help in this regard.
Response message: javax.naming.NamingException: javax.naming.NoInitialContextException: Cannot instantiate class: com.ibm.websphere.naming.WsnInitialContextFactory [Root exception is java.lang.ClassNotFoundException: com.ibm.websphere.naming.WsnInitialContextFactory]

I have installed all the specified jar files but still getting the below error. Can you please help

ERROR – jmeter.protocol.jms.sampler.JMSSampler: com/ibm/mq/jms/MQQueueConnectionFactory java.lang.NoClassDefFoundError: com/ibm/mq/jms/MQQueueConnectionFactory
at com.elega9t.jmeter.jms.InitialContextFactory$1.lookup(InitialContextFactory.java:51)
at javax.naming.InitialContext.lookup(Unknown Source)
at org.apache.jmeter.protocol.jms.sampler.JMSSampler.threadStarted(JMSSampler.java:329)
at org.apache.jmeter.threads.JMeterThread$ThreadListenerTraverser.addNode(JMeterThread.java:647)
at org.apache.jorphan.collections.HashTree.traverseInto(HashTree.java:996)
at org.apache.jorphan.collections.HashTree.traverse(HashTree.java:978)
at org.apache.jmeter.threads.JMeterThread.threadStarted(JMeterThread.java:616)
at org.apache.jmeter.threads.JMeterThread.initRun(JMeterThread.java:604)
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:237)
at java.lang.Thread.run(Unknown Source)

I am getting following error: javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial

please help me to resolve the same

Now getting this error:

Thread Name: Thread Group 1-1
Sample Start: 2016-11-22 14:04:40 IST
Load time: 0
Latency: 0
Size in bytes: 0
Headers size in bytes: 0
Body size in bytes: 0
Sample Count: 1
Error Count: 1
Response code:
Response message: javax.naming.NoInitialContextException: Cannot instantiate class: com.elega9t.jmeter.jms.testing.InitialContextFactory [Root exception is java.lang.ClassNotFoundException: com.elega9t.jmeter.jms.testing.InitialContextFactory]

Response headers:

SampleResult fields:
ContentType:
DataEncoding: null

First of all. Thanks a lot for the brillinat post. It is indeed useful for me. I was trying out with various tools for load testing MQ until i found this on internet. I am completely new for load testing MQ. Could you please help me out ? I am not sure what to configure if i have to send the COBOL format messages or XML format in the content. Please advise, Thanks in advance!

Hi Vathshen,

Can you let me if it is still not resolved. I need more details why you need xml input, is it http protocol?

Can you please help.! I have given all the details, i still see the error as below. Coudnt locate what is the issue.
Thread Name: Thread Group 1-1
Sample Start: 2017-03-01 21:47:07 IST
Load time: 0
Connect Time: 0
Latency: 0
Size in bytes: 0
Sent bytes:0
Headers size in bytes: 0
Body size in bytes: 0
Sample Count: 1
Error Count: 1
Data type (“text”|”bin”|””): text
Response code:
Response message: java.lang.NullPointerException

Response headers:

SampleResult fields:
ContentType:
DataEncoding: null

Hi Sandeep

Great Post. Just attempting for the first time to connect to IBM MQ. I have a similar error to what a few other people have had

Thread Name: Thread Group 1-1
Sample Start: 2017-03-07 09:10:50 PST
Load time: 0
Connect Time: 0
Latency: 0
Size in bytes: 0
Sent bytes:0
Headers size in bytes: 0
Body size in bytes: 0
Sample Count: 1
Error Count: 1
Data type (“text”|”bin”|””): text
Response code:
Response message: javax.naming.NoInitialContextException: Cannot instantiate class: com.elega9t.jmeter.jms.InitialContextFactory [Root exception is java.lang.ClassNotFoundException: com.elega9t.jmeter.jms.InitialContextFactory]
Response headers:
SampleResult fields:
ContentType:
DataEncoding: null

Which version of the MQ Jars files is required?
For further info, I am using Jmeter 3.1.

Thanks for the Reply Suganthi.
I had copied in the jmeter-jms-skip-jndi-0.0.1-sources.jar instead of jmeter-jms-skip-jndi-0.0.1.jar by mistake so I have moved on to a different error.
I have copied in all the other jars mentioned in this blog(as below) in to the JMETER lib/ext folder
com.ibm.mq.jar
org.springframework.beans.jar
org.springframework.jms.jar
javax.jms.jar
jmeter-jms-skip-jndi-0.0.1.jar
spring-core.jar
dbhcore.jar
com.ibm.dhcore.jar

But am still receiving the ERROR – jmeter.protocol.jms.sampler.JMSSampler: com/ibm/mq/jms/MQQueueConnectionFactory java.lang.NoClassDefFoundError: com/ibm/mq/jms/MQQueueConnectionFactory

Where am I going wrong? I am using Websphere 7.5 and Jmeter 3.1

Eventually resolved the issue. Added the following additional jar files and it worked.

com.ibm.mq.commonservices.jar
com.ibm.mq.headers.jar
com.ibm.mq.jmqi.jar
com.ibm.mq.mqjms.jar
connector.jar
javax.resource.jar

Thanks for such a detailed Blog. I have gone through all the steps. Placed Jar files and given all details. My request was success too. But Request is not available in queue.
Requirement : I need to post a message is IBM MQ and I have ETL job that reads the message.
Here while reading the Queue through ETL job, I am getting nothing. When Post message using Load runner, my ETL job is successfully picking it up. But for some reasons I am unable to use LR for testing. Please help me.

I have downloaded all the jars required also eliminated few error but now I’m stuck at this, kindly assist me to solve this error this post has been very helpful

Thread Name: JMS users 1-1
Sample Start: 2017-06-01 12:41:24 IST
Load time: 0
Connect Time: 0
Latency: 0
Size in bytes: 0
Sent bytes:0
Headers size in bytes: 0
Body size in bytes: 0
Sample Count: 1
Error Count: 1
Data type (“text”|”bin”|””): text
Response code:
Response message: java.lang.NullPointerException

Response headers:

SampleResult fields:
ContentType:
DataEncoding: null

I have downloaded all the jars required also eliminated few error but now I’m stuck at this,

Thread Name: JMS users 1-1
Sample Start: 2017-06-01 12:41:24 IST
Load time: 0
Connect Time: 0
Latency: 0
Size in bytes: 0
Sent bytes:0
Headers size in bytes: 0
Body size in bytes: 0
Sample Count: 1
Error Count: 1
Data type (“text”|”bin”|””): text
Response code:
Response message: java.lang.NullPointerException

kindly assist me to solve this error this post has been very helpful

I can send a request to the queue but now I’ve to send a text file through JMS kindly assist what need to be changed in the JMS request.

Hi Suganthi,
I am facing issue while sending Swift message through JMeter..i can able to send the message successfully but in the mqsi log i am getting parsing error becuase . When investigate and found that Jmeter is sending header along with message so in the flow message set filter out the jmeter request hence message is not able published. can you please suggest me how i can remove header from default setting of Jmeter or any other work around.

Hi,

I want to the Performance Testing for MSTR Reports. So I have recorded the script first and then Playback it .
But when I Playback the script I am getting 500 Internal Server Error. Snapshot attached for reference:
When I tried to troubleshoot it with MSTR Team they address me that when you run the Dashboard manually it is working fine the problem persist with Jmeter .
Could you please assist me to troubleshoot this error?

Thread Name: Thread Group 1-1
Sample Start: 2017-07-24 12:51:47 IST
Load time: 22
Connect Time: 0
Latency: 22
Size in bytes: 511
Headers size in bytes: 503
Body size in bytes: 8
Sample Count: 1
Error Count: 1
Response code: 500
Response message: Internal Server Error

Response headers:
HTTP/1.1 500 Internal Server Error
Server: Apache-Coyote/1.1
Set-Cookie: JSESSIONID=283AC9EC114450F4FF6524BF866D689E; Path=/MicroStrategy/; HttpOnly
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
X-MSTR: 1
X-MSTR-TaskFailureMsg: Your user session has been lost, and you have been automatically logged out. Please log in again.
X-MSTR-TaskErrorCode: -2147209051
Content-Type: text/html;charset=UTF-8
Content-Length: 8
Date: Mon, 24 Jul 2017 07:22:05 GMT
Connection: close

HTTPSampleResult fields:
ContentType: text/html;charset=UTF-8
DataEncoding: UTF-8

Nick/Suganthi- How did you Authenticate the Usename for MQ ? I am getting the errror message:: javax.naming.NamingException: MQJMS2013: invalid security authentication supplied for MQQueueManager. I need to enter the username : rksn4u in order to input the Message in Queue.

Hi Suganthi,

This is a really helpful post. I want to test out a different scenario where I first read from an MQ and then publish to a MQ. Do you have any suggestions or pointers.

Regards,
RAF

hiii
I am using Ibm mq with jmeter 3.2 and got error related to correlation ID.
2017-08-29 18:08:50,237 WARN o.a.j.p.j.s.Receiver: Received message with correlation id null. Discarding message …

No reply message received is shown .

can somebosy help me to resolve error “no reply message received ” and how to correlate request and response for ibm mq with jboss server.
Urgent Plz reply soon

this post was indeed very helpful. I followed all the steps but somehow got stuck at 1 point. It is asking me to create a consumer. Why is that so??

Please help out as it is urgent.

HI, can we send multiple messages per thread? I’m able to do JMS testing with multiple threads sending 1 message each, but I want to test with 1 thread sending multiple messages. Appreciate any help.

Hi Suganthi,
I am trying to use this jndi skip method. i have only one queue, request queue. I am getting following error. Please help me solve this error.

Note : 1.Used request queue
2.communication Style : Request Only

2017/09/18 15:08:44 ERROR – jmeter.protocol.jms.sampler.JMSSampler: JMSWMQ0018: Failed to connect to queue manager ‘XXXXXX’ with connection mode ‘Client’ and host name ‘XXXXXXX(1414)’. javax.naming.NamingException: JMSWMQ0018: Failed to connect to queue manager ‘XXXXXXX’ with connection mode ‘Client’ and host name ‘XXXXXXXX(1414)’.
at com.elega9t.jmeter.jms.InitialContextFactory$1.lookup(InitialContextFactory.java:77)
at javax.naming.InitialContext.lookup(InitialContext.java:417)
at org.apache.jmeter.protocol.jms.sampler.JMSSampler.threadStarted(JMSSampler.java:329)
at org.apache.jmeter.threads.JMeterThread$ThreadListenerTraverser.addNode(JMeterThread.java:659)
at org.apache.jorphan.collections.HashTree.traverseInto(HashTree.java:996)
at org.apache.jorphan.collections.HashTree.traverse(HashTree.java:978)
at org.apache.jmeter.threads.JMeterThread.threadStarted(JMeterThread.java:628)
at org.apache.jmeter.threads.JMeterThread.initRun(JMeterThread.java:616)
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:245)
at java.lang.Thread.run(Thread.java:748)

Thanks
Sophiya

Nick/Suganthi

I have the following problem, when I send a message, the response received is: “javax.naming.NamingException: JMSWMQ0018: Failed to connect to queue manager ‘QM_test’ with connection mode ‘Client’ and host name ‘localhost’.”

Guys,
This is a fantastic article. Only two chances you will suffer first when incorrect values/spelling are provided in JNDI properties.
Second is when there will be NoClassDefinitionFound Errors because initially provided list of jars is not sufficient. Try using maven so that you have all the jars in place.

Awesome, clear post for MQ testing. Appreciate your effort Suganthi.

I followed the complete post and fixed all the exceptions in my Jmeter Script.

finally im getting credentials issue, Error below,

2018-05-07 17:05:42,637 INFO o.a.j.t.JMeterThread: Thread started: Thread Group 1-1
2018-05-07 17:05:44,202 INFO o.s.j.c.CachingConnectionFactory: Established shared JMS Connection: com.ibm.mq.jms.MQQueueConnection@7c0fe2
2018-05-07 17:05:44,815 INFO o.a.j.p.j.s.Receiver: creating receiver without authorisation credentials. UseResMsgId=false
2018-05-07 17:05:45,300 INFO o.a.j.t.JMeterThread: Thread finished: Thread Group 1-1
2018-05-07 17:05:45,300 ERROR o.a.j.JMeter: Uncaught exception:
java.lang.NoSuchMethodError: com.ibm.mq.MQException.(Ljava/lang/String;Ljava/lang/String;II)V
at com.ibm.msg.client.wmq.common.internal.Reason.createException(Reason.java:206) ~[com.ibm.mqjms.jar:7.0.0.1 – k700-001-081204]

Using Jmeter 4.0, Placed all necessary JAR files and set all the JNDI Parameters.

Appreciate if someone help me to get rid of this!! thanks in advance.

How was the issue java.lang.NoClassDefFoundError: com/ibm/msg/client/commonservices/trace/Trace being solved. Please let me know

Hi Suganthi,
Thanks for this wonderful post. I was able to fix most of the jar but right now
I’ve placed all the jar files in \lib\ext folder.
com.ibm.dhbcore.jar
com.ibm.mq.commonservices.jar
com.ibm.mq.headers.jar
com.ibm.mq.jar
com.ibm.mq.jmqi.jar
com.ibm.mqjms.jar
connector.jar
javax.jms.jar
javax.resource.jar
spring-core-3.2.3.release.jar
org.springframework.beans.jar
org.springframework.jms-3.1.2.release.jar

I’m stuck with below error, can you please help on this?

2019-04-26 12:54:38,193 INFO o.s.j.c.CachingConnectionFactory: Established shared JMS Connection: com.ibm.mq.jms.MQQueueConnection@14215969
2019-04-26 12:54:38,306 INFO o.a.j.t.JMeterThread: Thread finished: Point-to-Point 1-1
2019-04-26 12:54:38,307 ERROR o.a.j.JMeter: Uncaught exception:
java.lang.AbstractMethodError: com.ibm.mq.jms.MQQueueSession.createProducer(Ljavax/jms/Destination;)Ljavax/jms/MessageProducer;
at org.springframework.jms.connection.CachingConnectionFactory$CachedSessionInvocationHandler.getCachedProducer(CachingConnectionFactory.java:364) ~[org.springframework.jms-3.1.2.release.jar:3.1.2.RELEASE]
at org.springframework.jms.connection.CachingConnectionFactory$CachedSessionInvocationHandler.invoke(CachingConnectionFactory.java:322) ~[org.springframework.jms-3.1.2.release.jar:3.1.2.RELEASE]
at com.sun.proxy.$Proxy21.createSender(Unknown Source) ~[?:?]
at javax.jms.QueueRequestor.(QueueRequestor.java:48) ~[geronimo-jms_1.1_spec-1.1.1.jar:1.1.1]
at org.apache.jmeter.protocol.jms.sampler.TemporaryQueueExecutor.(TemporaryQueueExecutor.java:49) ~[ApacheJMeter_jms.jar:3.3 r1808647]
at org.apache.jmeter.protocol.jms.sampler.JMSSampler.threadStarted(JMSSampler.java:372) ~[ApacheJMeter_jms.jar:3.3 r1808647]
at org.apache.jmeter.threads.JMeterThread$ThreadListenerTraverser.addNode(JMeterThread.java:683) ~[ApacheJMeter_core.jar:3.3 r1808647]
at org.apache.jorphan.collections.HashTree.traverseInto(HashTree.java:996) ~[jorphan.jar:3.3 r1808647]
at org.apache.jorphan.collections.HashTree.traverse(HashTree.java:978) ~[jorphan.jar:3.3 r1808647]
at org.apache.jmeter.threads.JMeterThread.threadStarted(JMeterThread.java:652) ~[ApacheJMeter_core.jar:3.3 r1808647]
at org.apache.jmeter.threads.JMeterThread.initRun(JMeterThread.java:640) ~[ApacheJMeter_core.jar:3.3 r1808647]
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:251) ~[ApacheJMeter_core.jar:3.3 r1808647]
at java.lang.Thread.run(Unknown Source) [?:1.8.0_131]
2019-04-26 12:54:38,311 INFO o.a.j.e.StandardJMeterEngine: Notifying test listeners of end of test
2019-04-26 12:54:38,312 INFO o.a.j.g.u.JMeterMenuBar: setRunning(false, *local*)

Hi All,

If channel auth is disabled, I’m able to test successfully, but when channel authentication is enabled, I’m not able to pass the authentication information. I tried different options (userName/password, securityPrincipal/securityCredentials), but it’s not working.

If anyone tested with authentication, please let me know.

Thanks
Murali

Leave a Reply

Your email address will not be published. Required fields are marked *