我在macbook pro上使用jmeter 2.11。
当我尝试打开由我的同事创建的.jmx文件时,Jmeter在UI中抛出一个异常,说“#34; Empty TestPlan” - 参见日志文件" 它的开场很适合他。
jmeter.log
2014/07/14 16:56:18 INFO - jmeter.gui.action.Load: Loading file: /Users/mycompany/Documents/workspace/http-server/src/main/loadtests/test-plan-big-data.jmx
2014/07/14 16:56:18 INFO - jmeter.services.FileServer: Set new base='/Users/mycompany/Documents/workspace/http-server/src/main/loadtests'
2014/07/14 16:56:18 ERROR - jmeter.save.SaveService: Conversion error com.thoughtworks.xstream.converters.ConversionException: -1 : -1
---- Debugging information ----
message : -1
cause-exception : java.lang.ArrayIndexOutOfBoundsException
cause-message : -1
class : org.apache.jmeter.testelement.property.DoubleProperty
required-type : org.apache.jmeter.testelement.property.DoubleProperty
converter-type : com.thoughtworks.xstream.converters.reflection.ReflectionConverter
path : /jmeterTestPlan/hashTree/hashTree/hashTree/ConstantThroughputTimer/doubleProp/name
line number : 10151
class[1] : org.apache.jmeter.timers.ConstantThroughputTimer
converter-type[1] : org.apache.jmeter.save.converters.TestElementConverter
class[2] : org.apache.jorphan.collections.ListedHashTree
converter-type[2] : org.apache.jmeter.save.converters.HashTreeConverter
------------------------------- : -1 : -1
---- Debugging information ----
message : -1
cause-exception : java.lang.ArrayIndexOutOfBoundsException
cause-message : -1
class : org.apache.jmeter.testelement.property.DoubleProperty
required-type : org.apache.jmeter.testelement.property.DoubleProperty
converter-type : com.thoughtworks.xstream.converters.reflection.ReflectionConverter
path : /jmeterTestPlan/hashTree/hashTree/hashTree/ConstantThroughputTimer/doubleProp/name
line number : 10151
class[1] : org.apache.jmeter.timers.ConstantThroughputTimer
converter-type[1] : org.apache.jmeter.save.converters.TestElementConverter
class[2] : org.apache.jorphan.collections.ListedHashTree
converter-type[2] : org.apache.jmeter.save.converters.HashTreeConverter
-------------------------------
message : -1 : -1
---- Debugging information ----
message : -1
cause-exception : java.lang.ArrayIndexOutOfBoundsException
cause-message : -1
class : org.apache.jmeter.testelement.property.DoubleProperty
required-type : org.apache.jmeter.testelement.property.DoubleProperty
converter-type : com.thoughtworks.xstream.converters.reflection.ReflectionConverter
path : /jmeterTestPlan/hashTree/hashTree/hashTree/ConstantThroughputTimer/doubleProp/name
line number : 10151
class[1] : org.apache.jmeter.timers.ConstantThroughputTimer
converter-type[1] : org.apache.jmeter.save.converters.TestElementConverter
class[2] : org.apache.jorphan.collections.ListedHashTree
converter-type[2] : org.apache.jmeter.save.converters.HashTreeConverter
-------------------------------
cause-exception : com.thoughtworks.xstream.converters.ConversionException
cause-message : -1 : -1
first-jmeter-class : org.apache.jmeter.save.converters.TestElementConverter.unmarshal(TestElementConverter.java:107)
class : org.apache.jmeter.save.ScriptWrapper
required-type : org.apache.jmeter.testelement.property.DoubleProperty
converter-type : org.apache.jmeter.save.ScriptWrapperConverter
path : /jmeterTestPlan/hashTree/hashTree/hashTree/ConstantThroughputTimer/doubleProp/name
line number : 10151
version : 2.11 r1554548
-------------------------------
2014/07/14 16:56:18 WARN - jmeter.gui.action.Load: Unexpected error org.apache.jmeter.exceptions.IllegalUserActionException: Empty TestPlan - see log file
at org.apache.jmeter.gui.action.Load.insertLoadedTree(Load.java:174)
at org.apache.jmeter.gui.action.Load.loadProjectFile(Load.java:136)
at org.apache.jmeter.gui.action.Load.loadProjectFile(Load.java:105)
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:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:744)
at java.awt.EventQueue.access$400(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:697)
at java.awt.EventQueue$3.run(EventQueue.java:691)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:714)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
答案 0 :(得分:4)
您和您的同事的java --version
命令输出是什么?
根据JMeter 2.11: Top 5 Features and Updates指南,JMeter 2.11要求Java 6在使用此Java SDK版本构建时运行。
我建议从Oracle切换到Java 6 SDK,如果您的PC / OS是64位,请使用64位版本的Java SDK,看看它是否能解决您的问题。
有一个Bug 56080看起来很像你得到的错误的原因,所以切换到Java 6可能会为你解决它。
答案 1 :(得分:1)
我遇到了同样的问题。我的同事使用Jmeter 2.12创建了一个测试计划。我有Jmeter 2.10。在升级到Jmeter 2.12之后,我克服了这个问题,它的工作正常。