Reputation: 2676
I have a Jenkins job set up to run a Jmeter test that was built using the JMeter GUI, but the build always fails, reporting a NonGUIDriver java.lang.NullPointerException.
This is what's shown in the JMeter.log file:
2013/07/22 10:28:16 ERROR - jmeter.save.SaveService: Conversion error com.thoughtworks.xstream.converters.ConversionException: HTTPSamplerProxy : HTTPSamplerProxy : HTTPSamplerProxy : HTTPSamplerProxy
---- Debugging information ----
message : HTTPSamplerProxy : HTTPSamplerProxy
cause-exception : com.thoughtworks.xstream.mapper.CannotResolveClassException
cause-message : HTTPSamplerProxy : HTTPSamplerProxy
class : org.apache.jorphan.collections.ListedHashTree
required-type : org.apache.jorphan.collections.ListedHashTree
path : /jmeterTestPlan/hashTree/hashTree/hashTree/hashTree[3]/HTTPSamplerProxy
line number : 91
------------------------------- : HTTPSamplerProxy : HTTPSamplerProxy : HTTPSamplerProxy : HTTPSamplerProxy
---- Debugging information ----
message : HTTPSamplerProxy : HTTPSamplerProxy
cause-exception : com.thoughtworks.xstream.mapper.CannotResolveClassException
cause-message : HTTPSamplerProxy : HTTPSamplerProxy
class : org.apache.jorphan.collections.ListedHashTree
required-type : org.apache.jorphan.collections.ListedHashTree
path : /jmeterTestPlan/hashTree/hashTree/hashTree/hashTree[3]/HTTPSamplerProxy
line number : 91
-------------------------------
message : HTTPSamplerProxy : HTTPSamplerProxy : HTTPSamplerProxy : HTTPSamplerProxy
---- Debugging information ----
message : HTTPSamplerProxy : HTTPSamplerProxy
cause-exception : com.thoughtworks.xstream.mapper.CannotResolveClassException
cause-message : HTTPSamplerProxy : HTTPSamplerProxy
class : org.apache.jorphan.collections.ListedHashTree
required-type : org.apache.jorphan.collections.ListedHashTree
path : /jmeterTestPlan/hashTree/hashTree/hashTree/hashTree[3]/HTTPSamplerProxy
line number : 91
-------------------------------
cause-exception : com.thoughtworks.xstream.converters.ConversionException
cause-message : HTTPSamplerProxy : HTTPSamplerProxy : HTTPSamplerProxy : HTTPSamplerProxy
first-jmeter-class : org.apache.jmeter.save.converters.HashTreeConverter.unmarshal(HashTreeConverter.java:81)
class : org.apache.jmeter.save.ScriptWrapper
required-type : org.apache.jorphan.collections.ListedHashTree
path : /jmeterTestPlan/hashTree/hashTree/hashTree/hashTree[3]/HTTPSamplerProxy
line number : 91
-------------------------------
2013/07/22 10:28:16 ERROR - jmeter.JMeter: java.lang.NullPointerException
at org.apache.jmeter.gui.tree.JMeterTreeModel.addSubTree(JMeterTreeModel.java:91)
at org.apache.jmeter.JMeter.runNonGui(JMeter.java:724)
at org.apache.jmeter.JMeter.startNonGui(JMeter.java:702)
at org.apache.jmeter.JMeter.start(JMeter.java:353)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.apache.jmeter.NewDriver.main(NewDriver.java:207)
Upvotes: 1
Views: 11548
Reputation: 21
I had the same issue running jmeter 4.0 under jmeter-maven-plugin 2.9.0. Running mvn clean before running the test fixed the problem.
Upvotes: 0
Reputation: 63
In my case, deleting <ResultCollector>
from the JMX fixed the problem. JMX created in jmeter 3.1, running JMX under jmeter 2.11.
Upvotes: 0
Reputation: 21
I had the same issue. the problem was the version of the Jmeter on the remote server was 2.6 and the one with which the .jmx file was created was 2.8. So i installed a lower version and recreated the .jmx file moved to the remote server and all was fine 😀
Upvotes: 2
Reputation: 2676
After far too much hunting about, I found this thread in github.
Essentially, to make the project build successfully, all I had to do was search-and-replace the HTTPSamplerProxy
with HTTPSampler
in the .jmx test file, and the jenkins project now builds without a hitch. Joy!
Upvotes: 3