9

好的 - 我还没有把这个测试从一台机器移到另一台机器上。这个测试是在我今天试图打开它的地方创建并保存的。昨天 - 我做了一些更改并保存了它。现在,我打开并收到错误 - 请参阅日志文件。

我一直在寻找答案,但我发现的唯一一件事与将测试从一台机器移动到另一台机器有关。这看起来只是简单的损坏。两个问题 - 1. 任何人以前见过这个并知道是什么原因造成的吗?2.我搞砸了吗?我必须完全重做这个测试吗?

不确定这在这种情况下是否重要,但是:
Windows 7 Jmeter 2.9

这是日志信息:

2013/02/21 14:54:53 INFO  - jmeter.gui.action.Load: Loading file: C:\Users\jcraig\Desktop\Tools\jmeter\apache-jmeter-2.9\apache-jmeter-2.9\bin\MC_multi_thread.jmx 
2013/02/21 14:54:53 INFO  - jmeter.services.FileServer: Set new base='C:\Users\jcraig\Desktop\Tools\jmeter\apache-jmeter-2.9\apache-jmeter-2.9\bin' 
2013/02/21 14:54:53 INFO  - jmeter.services.FileServer: Set new base='C:\Users\jcraig\Desktop\Tools\jmeter\apache-jmeter-2.9\apache-jmeter-2.9\bin' 
2013/02/21 14:55:40 INFO  - jmeter.gui.action.Load: Loading file: C:\Users\jcraig\Desktop\Tools\jmeter\apache-jmeter-2.9\apache-jmeter-2.9\bin\MC_Multi_Thread02.jmx 
2013/02/21 14:55:40 INFO  - jmeter.services.FileServer: Set new base='C:\Users\jcraig\Desktop\Tools\jmeter\apache-jmeter-2.9\apache-jmeter-2.9\bin' 
2013/02/21 14:55:40 ERROR - jmeter.save.SaveService: Conversion error com.thoughtworks.xstream.converters.ConversionException:  : no more data available - expected end tags </stringProp></HTTPSamplerProxy></hashTree></hashTree></hashTree></hashTree></jmeterTestPlan> to close start tag <stringProp> from line 7281 and start tag <HTTPSamplerProxy> from line 7257 and start tag <hashTree> from line 6253 and start tag <hashTree> from line 6191 and start tag <hashTree> from line 13 and start tag <hashTree> from line 3 and start tag <jmeterTestPlan> from line 2, parser stopped on TEXT seen ...</stringProp>\n            <stringProp... @7282:24 :  : no more data available - expected end tags </stringProp></HTTPSamplerProxy></hashTree></hashTree></hashTree></hashTree></jmeterTestPlan> to close start tag <stringProp> from line 7281 and start tag <HTTPSamplerProxy> from line 7257 and start tag <hashTree> from line 6253 and start tag <hashTree> from line 6191 and start tag <hashTree> from line 13 and start tag <hashTree> from line 3 and start tag <jmeterTestPlan> from line 2, parser stopped on TEXT seen ...</stringProp>\n            <stringProp... @7282:24
---- Debugging information ----
message             :  : no more data available - expected end tags </stringProp></HTTPSamplerProxy></hashTree></hashTree></hashTree></hashTree></jmeterTestPlan> to close start tag <stringProp> from line 7281 and start tag <HTTPSamplerProxy> from line 7257 and start tag <hashTree> from line 6253 and start tag <hashTree> from line 6191 and start tag <hashTree> from line 13 and start tag <hashTree> from line 3 and start tag <jmeterTestPlan> from line 2, parser stopped on TEXT seen ...</stringProp>\n            <stringProp... @7282:24
cause-exception     : com.thoughtworks.xstream.io.StreamException
cause-message       :  : no more data available - expected end tags </stringProp></HTTPSamplerProxy></hashTree></hashTree></hashTree></hashTree></jmeterTestPlan> to close start tag <stringProp> from line 7281 and start tag <HTTPSamplerProxy> from line 7257 and start tag <hashTree> from line 6253 and start tag <hashTree> from line 6191 and start tag <hashTree> from line 13 and start tag <hashTree> from line 3 and start tag <jmeterTestPlan> from line 2, parser stopped on TEXT seen ...</stringProp>\n            <stringProp... @7282:24
class               : org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy
required-type       : org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy
converter-type      : org.apache.jmeter.protocol.http.sampler.HTTPSamplerBaseConverter
path                : /jmeterTestPlan/hashTree/hashTree/hashTree[5]/hashTree[4]/HTTPSamplerProxy[16]
line number         : 7282
class[1]            : org.apache.jorphan.collections.ListedHashTree
converter-type[1]   : org.apache.jmeter.save.converters.HashTreeConverter
------------------------------- :  : no more data available - expected end tags </stringProp></HTTPSamplerProxy></hashTree></hashTree></hashTree></hashTree></jmeterTestPlan> to close start tag <stringProp> from line 7281 and start tag <HTTPSamplerProxy> from line 7257 and start tag <hashTree> from line 6253 and start tag <hashTree> from line 6191 and start tag <hashTree> from line 13 and start tag <hashTree> from line 3 and start tag <jmeterTestPlan> from line 2, parser stopped on TEXT seen ...</stringProp>\n            <stringProp... @7282:24 :  : no more data available - expected end tags </stringProp></HTTPSamplerProxy></hashTree></hashTree></hashTree></hashTree></jmeterTestPlan> to close start tag <stringProp> from line 7281 and start tag <HTTPSamplerProxy> from line 7257 and start tag <hashTree> from line 6253 and start tag <hashTree> from line 6191 and start tag <hashTree> from line 13 and start tag <hashTree> from line 3 and start tag <jmeterTestPlan> from line 2, parser stopped on TEXT seen ...</stringProp>\n            <stringProp... @7282:24
---- Debugging information ----
message             :  : no more data available - expected end tags </stringProp></HTTPSamplerProxy></hashTree></hashTree></hashTree></hashTree></jmeterTestPlan> to close start tag <stringProp> from line 7281 and start tag <HTTPSamplerProxy> from line 7257 and start tag <hashTree> from line 6253 and start tag <hashTree> from line 6191 and start tag <hashTree> from line 13 and start tag <hashTree> from line 3 and start tag <jmeterTestPlan> from line 2, parser stopped on TEXT seen ...</stringProp>\n            <stringProp... @7282:24
cause-exception     : com.thoughtworks.xstream.io.StreamException
cause-message       :  : no more data available - expected end tags </stringProp></HTTPSamplerProxy></hashTree></hashTree></hashTree></hashTree></jmeterTestPlan> to close start tag <stringProp> from line 7281 and start tag <HTTPSamplerProxy> from line 7257 and start tag <hashTree> from line 6253 and start tag <hashTree> from line 6191 and start tag <hashTree> from line 13 and start tag <hashTree> from line 3 and start tag <jmeterTestPlan> from line 2, parser stopped on TEXT seen ...</stringProp>\n            <stringProp... @7282:24
class               : org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy
required-type       : org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy
converter-type      : org.apache.jmeter.protocol.http.sampler.HTTPSamplerBaseConverter
path                : /jmeterTestPlan/hashTree/hashTree/hashTree[5]/hashTree[4]/HTTPSamplerProxy[16]
line number         : 7282
class[1]            : org.apache.jorphan.collections.ListedHashTree
converter-type[1]   : org.apache.jmeter.save.converters.HashTreeConverter
-------------------------------
message             :  : no more data available - expected end tags </stringProp></HTTPSamplerProxy></hashTree></hashTree></hashTree></hashTree></jmeterTestPlan> to close start tag <stringProp> from line 7281 and start tag <HTTPSamplerProxy> from line 7257 and start tag <hashTree> from line 6253 and start tag <hashTree> from line 6191 and start tag <hashTree> from line 13 and start tag <hashTree> from line 3 and start tag <jmeterTestPlan> from line 2, parser stopped on TEXT seen ...</stringProp>\n            <stringProp... @7282:24 :  : no more data available - expected end tags </stringProp></HTTPSamplerProxy></hashTree></hashTree></hashTree></hashTree></jmeterTestPlan> to close start tag <stringProp> from line 7281 and start tag <HTTPSamplerProxy> from line 7257 and start tag <hashTree> from line 6253 and start tag <hashTree> from line 6191 and start tag <hashTree> from line 13 and start tag <hashTree> from line 3 and start tag <jmeterTestPlan> from line 2, parser stopped on TEXT seen ...</stringProp>\n            <stringProp... @7282:24
---- Debugging information ----
message             :  : no more data available - expected end tags </stringProp></HTTPSamplerProxy></hashTree></hashTree></hashTree></hashTree></jmeterTestPlan> to close start tag <stringProp> from line 7281 and start tag <HTTPSamplerProxy> from line 7257 and start tag <hashTree> from line 6253 and start tag <hashTree> from line 6191 and start tag <hashTree> from line 13 and start tag <hashTree> from line 3 and start tag <jmeterTestPlan> from line 2, parser stopped on TEXT seen ...</stringProp>\n            <stringProp... @7282:24
cause-exception     : com.thoughtworks.xstream.io.StreamException
cause-message       :  : no more data available - expected end tags </stringProp></HTTPSamplerProxy></hashTree></hashTree></hashTree></hashTree></jmeterTestPlan> to close start tag <stringProp> from line 7281 and start tag <HTTPSamplerProxy> from line 7257 and start tag <hashTree> from line 6253 and start tag <hashTree> from line 6191 and start tag <hashTree> from line 13 and start tag <hashTree> from line 3 and start tag <jmeterTestPlan> from line 2, parser stopped on TEXT seen ...</stringProp>\n            <stringProp... @7282:24
class               : org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy
required-type       : org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy
converter-type      : org.apache.jmeter.protocol.http.sampler.HTTPSamplerBaseConverter
path                : /jmeterTestPlan/hashTree/hashTree/hashTree[5]/hashTree[4]/HTTPSamplerProxy[16]
line number         : 7282
class[1]            : org.apache.jorphan.collections.ListedHashTree
converter-type[1]   : org.apache.jmeter.save.converters.HashTreeConverter
-------------------------------
cause-exception     : com.thoughtworks.xstream.converters.ConversionException
cause-message       :  : no more data available - expected end tags </stringProp></HTTPSamplerProxy></hashTree></hashTree></hashTree></hashTree></jmeterTestPlan> to close start tag <stringProp> from line 7281 and start tag <HTTPSamplerProxy> from line 7257 and start tag <hashTree> from line 6253 and start tag <hashTree> from line 6191 and start tag <hashTree> from line 13 and start tag <hashTree> from line 3 and start tag <jmeterTestPlan> from line 2, parser stopped on TEXT seen ...</stringProp>\n            <stringProp... @7282:24 :  : no more data available - expected end tags </stringProp></HTTPSamplerProxy></hashTree></hashTree></hashTree></hashTree></jmeterTestPlan> to close start tag <stringProp> from line 7281 and start tag <HTTPSamplerProxy> from line 7257 and start tag <hashTree> from line 6253 and start tag <hashTree> from line 6191 and start tag <hashTree> from line 13 and start tag <hashTree> from line 3 and start tag <jmeterTestPlan> from line 2, parser stopped on TEXT seen ...</stringProp>\n            <stringProp... @7282:24
first-jmeter-class  : org.apache.jmeter.save.converters.HashTreeConverter.unmarshal(HashTreeConverter.java:65)
class               : org.apache.jmeter.save.ScriptWrapper
required-type       : org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy
converter-type      : org.apache.jmeter.save.ScriptWrapperConverter
path                : /jmeterTestPlan/hashTree/hashTree/hashTree[5]/hashTree[4]/HTTPSamplerProxy[16]
line number         : 7282
version             : 2.9 r1437961
------------------------------- 
2013/02/21 14:55:40 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.LoadRecentProject.doAction(LoadRecentProject.java:68)
    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:251)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:705)
    at java.awt.EventQueue.access$000(EventQueue.java:101)
    at java.awt.EventQueue$3.run(EventQueue.java:666)
    at java.awt.EventQueue$3.run(EventQueue.java:664)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:675)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:211)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

感谢您提供有关此的任何信息!

杰米

4

6 回答 6

4

这是一种修复损坏的测试 jmx 文件的快速方法。

  1. 转到您的 jmeter 目录并打开 jmeter.log 文件
  2. 最新的行表示 jmeter 记录的最后一个错误,您必须找到这样的块:

    ---- 调试信息 ---- 消息:com.atlantbh.jmeter.plugins.rest.RestSampler 原因异常:com.thoughtworks.xstream.mapper.CannotResolveClassException 原因消息:com.atlantbh.jmeter.plugins.rest。 RestSampler 类:org.apache.jorphan.collections.ListedHashTree 所需类型:org.apache.jorphan.collections.ListedHashTree 转换器类型:org.apache.jmeter.save.converters.HashTreeConverter 路径:/jmeterTestPlan/hashTree/hashTree/hashTree [3]/hashTree[3]/com.atlantbh.jmeter.plugins.rest.RestSampler 行号:950

  3. 使用文本编辑器打开您的 jmx 损坏文件并找到损坏的代码行(在上面的示例中损坏的行是 950)

  4. <tag.name>从to删除整个标签</tag.name>(或者如果您足够熟练,请尝试浏览子标签,找到错误并修复它)
  5. 用不同的名称保存您编辑的文件
  6. 加载到 jmeter
  7. 如果错误仍然存​​在,请从第 1 步开始重复(您会找到要删除的新标签)
于 2013-11-06T22:11:44.287 回答
3

按着这些次序

  1. 转到以下链接 https://jmeter-plugins.org/downloads/all/ 并将插件管理器添加到您的 Jmeter

  2. 重启Jmeter

  3. 通过单击“选项->插件管理器”添加所需的插件
  4. 重启Jmeter

我认为它可以解决您的问题

于 2017-01-23T22:26:19.003 回答
3

我们在尝试使用 JMeter 2.13 打开测试时遇到了类似的问题。通过添加一些 JMeter 插件解决了这个问题。

在我们的例子中,我们需要在 lib/ext 文件夹中添加“JMeterPlugins-Standard”jar,以便在测试中使用kg.apc.jmeter.vizualizers.ResponseTimesOverTimeGui(或)。kg.apc.jmeter.vizualizers.CorrectedResultCollector

我们还需要jmeter-plugins-1.0.0在 lib/junit 文件夹中添加 jar 以供com.atlantbh.jmeter.plugins.rest.gui.RestGui(或com.atlantbh.jmeter.plugins.rest.RestSampler)使用。

在这种情况下,您需要在测试中查找第 7282 行以查看缺少的内容并为其添加相关插件。

由于某种原因,这些 jar 文件不包含在默认的 jmeter 下载中。

希望有帮助。

于 2016-01-05T15:30:36.590 回答
1

您的文件似乎已损坏。

尝试在 xml 编辑器中打开它,看看它是否正确。

检查磁盘空间或磁盘问题。你在存档的时候有没有崩溃?

您可以尝试手动添加标签结尾以取回其中的一部分,也许您需要删除最后一个 xml 节点。

于 2013-02-21T22:39:36.550 回答
0

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

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

于 2014-10-30T15:44:59.690 回答
0

请检查您的 .jmx 文件,可能有一些代码被删除......我遇到了同样的问题......但是在查看我的 .jmx 文件后,我看到我的团队成员删除了一些代码......

于 2016-05-09T07:36:40.773 回答