Bug 56198 - JMSSampler : NullPointerException is thrown when JNDI underlying implementation of JMS provider does not comply with Context.getEnvironment contract
Summary: JMSSampler : NullPointerException is thrown when JNDI underlying implementati...
Status: RESOLVED FIXED
Alias: None
Product: JMeter
Classification: Unclassified
Component: Main (show other bugs)
Version: 2.6
Hardware: All All
: P2 minor (vote)
Target Milestone: ---
Assignee: JMeter issues mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-27 22:55 UTC by Jayesh Guru
Modified: 2014-02-28 23:08 UTC (History)
1 user (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jayesh Guru 2014-02-27 22:55:58 UTC
Enabled Debug Log Level 
log_level.jmeter=DEBUG
log_level.jmeter.protocol.jms.sampler.JMSSampler=DEBUG

2014/02/24 09:56:27 DEBUG - jmeter.protocol.jms.sampler.JMSSampler: Empty JNDI properties 
2014/02/24 09:56:27 DEBUG - jmeter.protocol.jms.sampler.JMSSampler: Initial Context Properties 
2014/02/24 09:56:27 ERROR - jmeter.protocol.jms.sampler.JMSSampler:  java.lang.NullPointerException
	at org.apache.jmeter.protocol.jms.sampler.JMSSampler.printEnvironment(JMSSampler.java:435)
	at org.apache.jmeter.protocol.jms.sampler.JMSSampler.getInitialContext(JMSSampler.java:426)
	at org.apache.jmeter.protocol.jms.sampler.JMSSampler.threadStarted(JMSSampler.java:319)
	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:744)

2014/02/24 09:56:27 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:179)
	at org.apache.jmeter.protocol.jms.sampler.JMSSampler.sample(JMSSampler.java:140)
	at org.apache.jmeter.threads.JMeterThread.process_sampler(JMeterThread.java:429)
	at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:257)
	at java.lang.Thread.run(Thread.java:744)
Comment 1 Jayesh Guru 2014-02-28 16:05:02 UTC
Getting NullPointerException while trying to run JMS Point to Point for my application. I have put all MQ jars in lib directory and also required Discovery Jars for application.
Comment 2 Philippe Mouawad 2014-02-28 23:07:53 UTC
Date: Fri Feb 28 22:53:29 2014
New Revision: 1573105

URL: http://svn.apache.org/r1573105
Log:
Bug 56198 - JMSSampler : NullPointerException is thrown when log level is DEBUG and JNDI underlying implementation of JMS provider does not comply with Context.getEnvironment contract
Bugzilla Id: 56198

Modified:
    jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/sampler/JMSSampler.java
    jmeter/trunk/xdocs/changes.xml

Date: Fri Feb 28 23:06:52 2014
New Revision: 1573108

URL: http://svn.apache.org/r1573108
Log:
Bug 56198 - JMSSampler : NullPointerException is thrown when JNDI underlying implementation of JMS provider does not comply with Context.getEnvironment contract
Apply check on every call of Context.getEnvironment
Bugzilla Id: 56198

Modified:
    jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/Utils.java
    jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/sampler/JMSSampler.java
    jmeter/trunk/xdocs/changes.xml