Reader
Reader

Reputation: 1

Jmeter JSR223 PostProcessor

2024-01-29 18:27:32,906 ERROR o.a.j.e.JSR223PostProcessor: Problem in JSR223 script, JSR223 PostProcessor javax.script.ScriptException: java.lang.ArrayIndexOutOfBoundsException: 1 at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:320) ~[groovy-jsr223-3.0.7.jar:3.0.7] at org.codehaus.groovy.jsr223.GroovyCompiledScript.eval(GroovyCompiledScript.java:71) ~[groovy-jsr223-3.0.7.jar:3.0.7] at javax.script.CompiledScript.eval(Unknown Source) ~[?:1.8.0_202] at org.apache.jmeter.util.JSR223TestElement.processFileOrScript(JSR223TestElement.java:217) ~[ApacheJMeter_core.jar:5.4.3] at org.apache.jmeter.extractor.JSR223PostProcessor.process(JSR223PostProcessor.java:45) [ApacheJMeter_components.jar:5.4.3] at org.apache.jmeter.threads.JMeterThread.runPostProcessors(JMeterThread.java:955) [ApacheJMeter_core.jar:?] at org.apache.jmeter.threads.JMeterThread.executeSamplePackage(JMeterThread.java:573) [ApacheJMeter_core.jar:?] at org.apache.jmeter.threads.JMeterThread.processSampler(JMeterThread.java:489) [ApacheJMeter_core.jar:?] at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:256) [ApacheJMeter_core.jar:?] at java.lang.Thread.run(Unknown Source) [?:1.8.0_202] Caused by: java.lang.ArrayIndexOutOfBoundsException: 1 at org.codehaus.groovy.runtime.BytecodeInterface8.objectArrayGet(BytecodeInterface8.java:362) ~[groovy-3.0.7.jar:3.0.7] at Script17.run(Script17.groovy:4) ~[?:?] at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:317) ~[groovy-jsr223-3.0.7.jar:3.0.7] ... 9 more

I'm trying to run a script that works just fine on a coworker's pc,but on mine I have this error in the console of Jmeter, and I cannot understand what seems to be the problem. Can anybody help? Thank you

Upvotes: 0

Views: 321

Answers (1)

Dmitri T
Dmitri T

Reputation: 168157

ArrayIndexOutOfBoundsException happens when you try to access an element of an array which doesn't exist.

enter image description here

So you need to check what object you're passing to the Groovy script, where it comes from and what are the values on your and your "coworker" machines. It might be the case your JMeter installation doesn't have external data file or something like this.

If you're reading the object from a JMeter Variable you can view its value using Debug Sampler and View Results Tree listener combination.

Upvotes: 0

Related Questions