When using the Maven JMeter Plugin to try and send web service requests, I ran into the following exception:
Error in NonGUIDriver java.lang.NullPointerException
My jmeter.log presented the following:
2011/04/27 14:20:46 ERROR - jmeter.save.SaveService: Conversion error com.thoughtworks.xstream.converters.ConversionException: org/apache/soap/SOAPException : org/apache/sp/SOAPException
---- Debugging information ----
message : org/apache/soap/SOAPException
cause-exception : java.lang.NoClassDefFoundError
cause-message : org/apache/soap/SOAPException
first-jmeter-class : org.apache.jmeter.save.converters.TestElementConverter.unmarshal(TestElementConverter.java:108)
class : org.apache.jmeter.save.ScriptWrapper
required-type : org.apache.jmeter.protocol.http.sampler.WebServiceSampler
path : /jmeterTestPlan/hashTree/hashTree/hashTree[2]/WebServiceSampler
line number : 741
-------------------------------
2011/04/27 14:20:46 ERROR - jmeter.JMeter: java.lang.NullPointerException
at org.apache.jmeter.gui.tree.JMeterTreeModel.addSubTree(JMeterTreeModel.java:91)
at org.apache.jmeter.JMeter.run(JMeter.java:728)
at org.apache.jmeter.JMeter.startNonGui(JMeter.java:706)
...
The solution was to add a dependency on soap:soap:2.3 to my plugin definition:
<plugin>
<groupId>org.apache.jmeter</groupId>
<artifactId>maven-jmeter-plugin</artifactId>
<version>1.0</version>
<configuration>
<reportDir>${reportDir}</reportDir>
</configuration>
<dependencies>
<dependency>
<groupId>soap</groupId>
<artifactId>soap</artifactId>
<version>2.3</version>
</dependency>
</dependencies>
</plugin>
After adding the dependency, the tests ran fine:
Starting the test @ Wed Apr 27 14:42:57 EDT 2011 (1303929777586)
Tidying up ... @ Wed Apr 27 14:42:59 EDT 2011 (1303929779839)
... end of run
No comments:
Post a Comment