我设置了一个 Jenkins 作业来运行使用 JMeter GUI 构建的 Jmeter 测试,但构建总是失败,报告 NonGUIDriver java.lang.NullPointerException。
这是 JMeter.log 文件中显示的内容:
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)