一个使用了很久的Jmeter脚本,运行时Jmeter的UI界面上点击绿色按钮后,完全无反应,只有log报错,如下:
2017/06/28 14:29:23 ERROR - jmeter.gui.action.ActionRouter: Error processing org.apache.jmeter.gui.action.Start@1b7c473a java.lang.ArrayIndexOutOfBoundsException: 0
at org.apache.jmeter.gui.action.Start.startEngine(Start.java:193)
at org.apache.jmeter.gui.action.Start.startEngine(Start.java:174)
at org.apache.jmeter.gui.action.Start.startEngine(Start.java:164)
at org.apache.jmeter.gui.action.Start.doAction(Start.java:108)
at org.apache.jmeter.gui.action.ActionRouter.performAction(ActionRouter.java:80)
at org.apache.jmeter.gui.action.ActionRouter.access$000(ActionRouter.java:40)
at org.apache.jmeter.gui.action.ActionRouter$1.run(ActionRouter.java:62)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$500(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
经过google,bing等多方面查询无果,看到日志中貌似有什么范围超限了,以为是Jmeter工具有内存缓存什么的,或者对这个jmeter脚本有缓存记录。最后只能把脚本部分内容复制并重新创建了一个脚本,运行后发现一切正常。
赶紧翻看原来的脚本,发现了一个特别蛋疼的事情,不知道什么时候手误,把【测试计划】给注释了。
去掉注释状态后,脚本运行正常。
从网上查找的结果看,还真没有对 【jmeter.gui.action.Start@1b7c473a java.lang.ArrayIndexOutOfBoundsException: 0】做出解释的帖子,因此写下此帖子,
也给可能手误的朋友们解惑。