jmeter 3.3 CSV示例抛出stackoverflow异常

时间:2017-09-24 13:42:44

标签: jmeter stack-overflow

我下载了JMeter 3.3并在示例文件夹中打开了示例CSVSample.jmx并执行,我得到以下Stackoverflow异常 测试计划: 1

017-09-24 16:38:09,452 ERROR o.a.j.JMeter: Uncaught exception: 
java.lang.StackOverflowError: null
    at jdk.internal.dynalink.support.AbstractCallSiteDescriptor.hashCode(AbstractCallSiteDescriptor.java:142) ~[nashorn.jar:?]
    at java.util.concurrent.ConcurrentHashMap.putVal(Unknown Source) ~[?:1.8.0_144]
    at java.util.concurrent.ConcurrentHashMap.putIfAbsent(Unknown Source) ~[?:1.8.0_144]
    at jdk.nashorn.internal.runtime.linker.NashornCallSiteDescriptor.get(NashornCallSiteDescriptor.java:167) ~[nashorn.jar:?]
    at jdk.nashorn.internal.runtime.linker.NashornCallSiteDescriptor.get(NashornCallSiteDescriptor.java:158) ~[nashorn.jar:?]
    at jdk.nashorn.internal.runtime.linker.LinkerCallSite.newLinkerCallSite(LinkerCallSite.java:114) ~[nashorn.jar:?]
    at jdk.nashorn.internal.runtime.linker.Bootstrap.bootstrap(Bootstrap.java:208) ~[nashorn.jar:?]
    at jdk.nashorn.internal.runtime.linker.Bootstrap.createDynamicInvoker(Bootstrap.java:371) ~[nashorn.jar:?]
    at jdk.nashorn.internal.runtime.linker.Bootstrap.createDynamicInvoker(Bootstrap.java:345) ~[nashorn.jar:?]
    at jdk.nashorn.internal.runtime.linker.InvokeByName.<init>(InvokeByName.java:86) ~[nashorn.jar:?]
    at jdk.nashorn.internal.runtime.linker.InvokeByName.<init>(InvokeByName.java:73) ~[nashorn.jar:?]
    at jdk.nashorn.internal.objects.Global.<init>(Global.java:96) ~[nashorn.jar:?]
    at jdk.nashorn.internal.runtime.Context.newGlobal(Context.java:1111) ~[nashorn.jar:?]
    at jdk.nashorn.api.scripting.NashornScriptEngine$2.run(NashornScriptEngine.java:350) ~[nashorn.jar:?]
    at jdk.nashorn.api.scripting.NashornScriptEngine$2.run(NashornScriptEngine.java:346) ~[nashorn.jar:?]
    at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_144]
    at jdk.nashorn.api.scripting.NashornScriptEngine.createNashornGlobal(NashornScriptEngine.java:346) ~[nashorn.jar:?]
    at jdk.nashorn.api.scripting.NashornScriptEngine.createGlobalMirror(NashornScriptEngine.java:340) ~[nashorn.jar:?]
    at jdk.nashorn.api.scripting.NashornScriptEngine.createBindings(NashornScriptEngine.java:170) ~[nashorn.jar:?]
    at org.apache.jmeter.control.IfController$NashornJsEngine.evaluate(IfController.java:123) ~[ApacheJMeter_core.jar:3.3 r1808647]
    at org.apache.jmeter.control.IfController.evaluateCondition(IfController.java:185) ~[ApacheJMeter_core.jar:3.3 r1808647]
    at org.apache.jmeter.control.IfController.next(IfController.java:239) ~[ApacheJMeter_core.jar:3.3 r1808647]
    at org.apache.jmeter.control.GenericController.nextIsAController(GenericController.java:219) ~[ApacheJMeter_core.jar:3.3 r1808647]
    at org.apache.jmeter.control.GenericController.next(GenericController.java:173) ~[ApacheJMeter_core.jar:3.3 r1808647]
    at org.apache.jmeter.control.WhileController.next(WhileController.java:106) ~[ApacheJMeter_core.jar:3.3 r1808647]
    at org.apache.jmeter.control.WhileController.nextIsNull(WhileController.java:82) ~[ApacheJMeter_core.jar:3.3 r1808647]
    at org.apache.jmeter.control.GenericController.next(GenericController.java:168) ~[ApacheJMeter_core.jar:3.3 r1808647]
    at org.apache.jmeter.control.WhileController.next(WhileController.java:106) ~[ApacheJMeter_core.jar:3.3 r1808647]
    at org.apache.jmeter.control.GenericController.nextIsAController(GenericController.java:222) ~[ApacheJMeter_core.jar:3.3 r1808647]
    at org.apache.jmeter.control.GenericController.next(GenericController.java:173) ~[ApacheJMeter_core.jar:3.3 r1808647]
    at org.apache.jmeter.control.WhileController.next(WhileController.java:106) ~[ApacheJMeter_core.jar:3.3 r1808647]
    at 

1 个答案:

答案 0 :(得分:3)

这是因为While Controller条件使用了已删除的函数 __ jexl

  

$ {__ jexl(&#34; $ {ACTION}&#34;!=&#34;&#34;)}

应该是:

  

$ {__jexl3(&#34; $ {ACTION}&#34;!=&#34;&#34;)}

今天用jmeter代码修复: