我正在使用Jmeter 2.11和Java 1.7。有趣的是我从另一个测试计划中复制粘贴了一部分代码,这个测试计划可能是使用较旧版本的Jmeter编写的。测试计划运行正常,但是当我甚至无法在GUI模式下打开测试计划时。我得到了这个例外。
我注意到原因 - 异常在我使用2.11时提到版本是2.7,可能是因为ResultsCollector部分是使用2.7编写的(我认为)但是之前这应该是失败的。为什么突然断裂?
我是否需要手动重写ResultsCollector以使其消失?还是有更明智的方法让它消失?
感谢。
2014/09/24 17:44:33 ERROR - jmeter.save.SaveService: Conversion error com.thoughtworks.xstream.converters.ConversionException: For input string: "
" : For input string: "
"
---- Debugging information ----
message : For input string: "
"
cause-exception : java.lang.NumberFormatException
cause-message : For input string: "
"
class : java.lang.Integer
required-type : java.lang.Integer
converter-type : com.thoughtworks.xstream.converters.SingleValueConverterWrapper
wrapped-converter : com.thoughtworks.xstream.converters.basic.IntConverter
path : /jmeterTestPlan/hashTree/hashTree/hashTree[3]/ResultCollector/objProp/value/assertionsResultsToSave
line number : 1087
class[1] : org.apache.jmeter.samplers.SampleSaveConfiguration
converter-type[1] : org.apache.jmeter.save.converters.SampleSaveConfigurationConverter
class[2] : org.apache.jmeter.testelement.property.ObjectProperty
converter-type[2] : com.thoughtworks.xstream.converters.reflection.ReflectionConverter
class[3] : org.apache.jmeter.reporters.ResultCollector
converter-type[3] : org.apache.jmeter.save.converters.TestElementConverter
class[4] : org.apache.jorphan.collections.ListedHashTree
converter-type[4] : org.apache.jmeter.save.converters.HashTreeConverter
------------------------------- : For input string: "
" : For input string: "
"
---- Debugging information ----
message : For input string: "
"
cause-exception : java.lang.NumberFormatException
cause-message : For input string: "
"
class : java.lang.Integer
required-type : java.lang.Integer
converter-type : com.thoughtworks.xstream.converters.SingleValueConverterWrapper
wrapped-converter : com.thoughtworks.xstream.converters.basic.IntConverter
path : /jmeterTestPlan/hashTree/hashTree/hashTree[3]/ResultCollector/objProp/value/assertionsResultsToSave
line number : 1087
class[1] : org.apache.jmeter.samplers.SampleSaveConfiguration
converter-type[1] : org.apache.jmeter.save.converters.SampleSaveConfigurationConverter
class[2] : org.apache.jmeter.testelement.property.ObjectProperty
converter-type[2] : com.thoughtworks.xstream.converters.reflection.ReflectionConverter
class[3] : org.apache.jmeter.reporters.ResultCollector
converter-type[3] : org.apache.jmeter.save.converters.TestElementConverter
class[4] : org.apache.jorphan.collections.ListedHashTree
converter-type[4] : org.apache.jmeter.save.converters.HashTreeConverter
-------------------------------
message : For input string: "
" : For input string: "
"
---- Debugging information ----
message : For input string: "
"
cause-exception : java.lang.NumberFormatException
cause-message : For input string: "
"
class : java.lang.Integer
required-type : java.lang.Integer
converter-type : com.thoughtworks.xstream.converters.SingleValueConverterWrapper
wrapped-converter : com.thoughtworks.xstream.converters.basic.IntConverter
path : /jmeterTestPlan/hashTree/hashTree/hashTree[3]/ResultCollector/objProp/value/assertionsResultsToSave
line number : 1087
class[1] : org.apache.jmeter.samplers.SampleSaveConfiguration
converter-type[1] : org.apache.jmeter.save.converters.SampleSaveConfigurationConverter
class[2] : org.apache.jmeter.testelement.property.ObjectProperty
converter-type[2] : com.thoughtworks.xstream.converters.reflection.ReflectionConverter
class[3] : org.apache.jmeter.reporters.ResultCollector
converter-type[3] : org.apache.jmeter.save.converters.TestElementConverter
class[4] : org.apache.jorphan.collections.ListedHashTree
converter-type[4] : org.apache.jmeter.save.converters.HashTreeConverter
-------------------------------
cause-exception : com.thoughtworks.xstream.converters.ConversionException
cause-message : For input string: "
" : For input string: "
"
first-jmeter-class : org.apache.jmeter.save.converters.SampleSaveConfigurationConverter.unmarshal(SampleSaveConfigurationConverter.java:161)
class : org.apache.jmeter.save.ScriptWrapper
required-type : java.lang.Integer
converter-type : org.apache.jmeter.save.ScriptWrapperConverter
path : /jmeterTestPlan/hashTree/hashTree/hashTree[3]/ResultCollector/objProp/value/assertionsResultsToSave
line number : 1087
version : 2.7 r1342410
-------------------------------
2014/09/24 17:44:33 ERROR - jmeter.JMeter: Error in NonGUIDriver java.lang.NullPointerException
at org.apache.jmeter.gui.tree.JMeterTreeModel.addSubTree(JMeterTreeModel.java:93)
at org.apache.jmeter.JMeter.runNonGui(JMeter.java:747)
at org.apache.jmeter.JMeter.startNonGui(JMeter.java:725)
at org.apache.jmeter.JMeter.start(JMeter.java:386)
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:606)
at org.apache.jmeter.NewDriver.main(NewDriver.java:216)
at com.lazerycode.jmeter.testrunner.TestManager.executeSingleTest(TestManager.java:106)
at com.lazerycode.jmeter.testrunner.TestManager.executeTests(TestManager.java:75)
at com.lazerycode.jmeter.JMeterMojo.execute(JMeterMojo.java:41)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:133)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:108)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:76)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:116)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:361)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:213)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:157)
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:606)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)