I was getting null pointer exceptions when executing remote server tests from the command line: java.lang.NullPointerException at org.apache.jmeter.engine.ConvertListeners.addNode (ConvertListeners.java:53) at org.apache.jorphan.collections.HashTree.traverseInto (HashTree.java:978) at org.apache.jorphan.collections.HashTree.traverse(HashTree.java:962) at org.apache.jmeter.engine.ClientJMeterEngine.run (ClientJMeterEngine.java:120) at java.lang.Thread.run(Thread.java:534) Upon tracing it through I discovered that the same HashTree created on line 453 of JMeter.java was being accessed by two different ClientJMeterEngine threads. I added synchronization around the tree in the run method of the ClientJMeterEngine and this seemed to resolve the issues: public void run() { log.info("running clientengine run method"); testListeners = new SearchByClass(TestListener.class); HashTree tree = getTestTree(); //synchronized here to resolve NPE issue synchronized (tree) { tree.traverse(testListeners); } sampleListeners = new ConvertListeners(); // TODO this is a temporary fix - see bug 23487 try { //synchronized here to resolve NPE issue synchronized (tree) { tree.traverse(sampleListeners); } } catch (IndexOutOfBoundsException e) { log.warn("Error replacing sample listeners", e); }
What command-line options did you use? What was the setting of remote_hosts in jmeter.properties - how many hosts were there?
Added synchronisation to both accesses in SVN r567668/r567669 See also bug 23487, which this should also fix.
Additional testing shows this is now fixed
*** Bug 28028 has been marked as a duplicate of this bug. ***
*** Bug 35164 has been marked as a duplicate of this bug. ***
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/1745