2

我有一个在 2.8 版本的 jmeter 中可以正常工作(打开并运行)的脚本。我刚刚下载了 Jmeter 2.9,但无法打开此脚本。

我在日志文件中收到以下错误,我似乎不明白 DummySampler 的问题是什么,这似乎是日志中错误的根源。我检查了 2.9 版本更改日志页面http://jmeter.apache.org/changes.html并没有找到任何相关内容。

我是 Jmeter 和 Java 的新手,感谢任何帮助!

2013/08/05 17:12:29 INFO  - jmeter.save.SaveService: All converter versions present and correct 
2013/08/05 17:12:30 ERROR - jmeter.save.SaveService: Conversion error com.thoughtworks.xstream.converters.ConversionException: kg.apc.jmeter.samplers.DummySampler : kg.apc.jmeter.samplers.DummySampler
---- Debugging information ----
message             : kg.apc.jmeter.samplers.DummySampler
cause-exception     : com.thoughtworks.xstream.mapper.CannotResolveClassException
cause-message       : kg.apc.jmeter.samplers.DummySampler
class               : org.apache.jorphan.collections.ListedHashTree
required-type       : org.apache.jorphan.collections.ListedHashTree
converter-type      : org.apache.jmeter.save.converters.HashTreeConverter
path                : /jmeterTestPlan/hashTree/hashTree/hashTree[7]/hashTree[6]/kg.apc.jmeter.samplers.DummySampler
line number         : 416
------------------------------- : kg.apc.jmeter.samplers.DummySampler : kg.apc.jmeter.samplers.DummySampler
---- Debugging information ----
message             : kg.apc.jmeter.samplers.DummySampler
cause-exception     : com.thoughtworks.xstream.mapper.CannotResolveClassException
cause-message       : kg.apc.jmeter.samplers.DummySampler
class               : org.apache.jorphan.collections.ListedHashTree
required-type       : org.apache.jorphan.collections.ListedHashTree
converter-type      : org.apache.jmeter.save.converters.HashTreeConverter
path                : /jmeterTestPlan/hashTree/hashTree/hashTree[7]/hashTree[6]/kg.apc.jmeter.samplers.DummySampler
line number         : 416
-------------------------------
message             : kg.apc.jmeter.samplers.DummySampler : kg.apc.jmeter.samplers.DummySampler
---- Debugging information ----
message             : kg.apc.jmeter.samplers.DummySampler
cause-exception     : com.thoughtworks.xstream.mapper.CannotResolveClassException
cause-message       : kg.apc.jmeter.samplers.DummySampler
class               : org.apache.jorphan.collections.ListedHashTree
required-type       : org.apache.jorphan.collections.ListedHashTree
converter-type      : org.apache.jmeter.save.converters.HashTreeConverter
path                : /jmeterTestPlan/hashTree/hashTree/hashTree[7]/hashTree[6]/kg.apc.jmeter.samplers.DummySampler
line number         : 416
-------------------------------
cause-exception     : com.thoughtworks.xstream.converters.ConversionException
cause-message       : kg.apc.jmeter.samplers.DummySampler : kg.apc.jmeter.samplers.DummySampler
first-jmeter-class  : org.apache.jmeter.save.converters.HashTreeConverter.unmarshal(HashTreeConverter.java:65)
class               : org.apache.jmeter.save.ScriptWrapper
required-type       : org.apache.jorphan.collections.ListedHashTree
converter-type      : org.apache.jmeter.save.ScriptWrapperConverter
path                : /jmeterTestPlan/hashTree/hashTree/hashTree[7]/hashTree[6]/kg.apc.jmeter.samplers.DummySampler
line number         : 416
version             : 2.9 r1437961
------------------------------- 
2013/08/05 17:12:30 WARN  - jmeter.gui.action.Load: Unexpected error java.lang.Exception: Error in TestPlan - see log file
    at org.apache.jmeter.gui.action.Load.insertLoadedTree(Load.java:158)
    at org.apache.jmeter.gui.action.Load.loadProjectFile(Load.java:113)
    at org.apache.jmeter.gui.action.Load.doAction(Load.java:92)
    at org.apache.jmeter.gui.action.ActionRouter.performAction(ActionRouter.java:81)
    at org.apache.jmeter.gui.action.ActionRouter.access$000(ActionRouter.java:40)
    at org.apache.jmeter.gui.action.ActionRouter$1.run(ActionRouter.java:63)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:715)
    at java.awt.EventQueue.access$400(EventQueue.java:82)
    at java.awt.EventQueue$2.run(EventQueue.java:676)
    at java.awt.EventQueue$2.run(EventQueue.java:674)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:86)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:685)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
4

3 回答 3

6

您使用第三方插件 JMeter-plugins。

确保您在 lib/ext 中添加了所需的 jar,并在 lib 中添加了它们的依赖项

于 2013-08-06T07:17:22.807 回答
0

我有同样的情况,jmx不会加载。只有错误不同,我得到:java.lang.ArrayIndexOutOfBoundsException

通过安装 Java SE 1.7.0.67 已解决此问题

于 2014-10-30T15:41:43.877 回答
-2

您应该手动更改 JMX,因为格式不同。您可以阅读有关JMX 格式的信息。

于 2013-08-06T01:40:23.903 回答