【问题标题】:jmeter error on opening script打开脚本时出现jmeter错误
【发布时间】:2017-01-24 06:26:19
【问题描述】:

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

我一直在寻找答案,但我发现的唯一一件事与将测试从一台机器转移到另一台机器有关。这看起来只是简单的损坏。两个问题 - 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)

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

杰米

【问题讨论】:

  • 如果您将它从一台机器移动到另一台机器会出现什么问题?

标签: jmeter


【解决方案1】:

这是修复损坏的测试 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. &lt;tag.name&gt;&lt;/tag.name&gt; 中删除整个标签(或者如果您足够熟练,请尝试浏览子标签,找到错误并修复它)
  5. 用不同的名称保存您编辑的文件
  6. 加载到 jmeter
  7. 如果错误仍然存​​在,请从第 1 步开始重复(您会找到要删除的新标签)

【讨论】:

  • 如果您的插件版本与原始版本不同,并且它添加/删除了 jmeter 阻塞的标签,这也有效。
  • ~/jmeter.log下找到我的日志
【解决方案2】:

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

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

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

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

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

希望对您有所帮助。

【讨论】:

  • 虽然其他依赖项可以通过插件管理器自动解决,但此 RestSampler 仅在 jmeter-plugins-1.0.0.jar 中可用。谷歌它并从一些奇怪的网站下载它的作品。是的,它不在 jmeter-plugins.org 中
【解决方案3】:

按照以下步骤操作

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

  2. 重启 Jmeter

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

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

【讨论】:

  • 这确实有效。它下载了我缺少的插件。
  • 是的,这行得通,谢谢。只需再次打开 jmx 文件,插件管理检测到缺少的插件,您可以下载它们。太好了。
【解决方案4】:

您的文件似乎已损坏。

尝试用xml编辑器打开看看是否正确。

检查磁盘空间或磁盘问题。您在保存过程中发生过崩溃吗?

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

【讨论】:

  • 保存时一定有错误。当我以 XML 格式打开时,我可以看到缺少的标签。谢谢!
  • 很高兴我的帮助,所以这个答案对其他人有用,你应该接受它并点赞:)
【解决方案5】:

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

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

【讨论】:

    【解决方案6】:

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2021-03-21
      • 2014-11-03
      • 2019-12-29
      • 1970-01-01
      • 1970-01-01
      • 2015-07-24
      • 2011-06-13
      相关资源
      最近更新 更多