Groovy Scripts not executing under Jmeter

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Groovy Scripts not executing under Jmeter

Raja-2
Hi

 

I am having problems running groovy scripts under Jmeter.  Can someone
advise if I need to enable/tweak something for groovy to execute.

 

Jmeter version = 5.2.1

Groovy = 2.4.16 / Groovy Scripting Engine 2.0

Jar = /lib/groovy-all-2.4.16.Jar

 

I have been following an online example so I know this script should work.

 

 

I have placed the following script under JSR223 Sampler:

 

import groovy.io.FileType

 

String folderPath = "data-management"

new File(folderPath).eachfile (FileType.FILES) { file ->

              /* Delete file if file name contains .dat */

              if (file.name.contains('.dat')) file.delete()

}

 

Sampler Result gives:

 

Response code:500

Response message:javax.script.ScriptException:
groovy.lang.MissingMethodException: No signature of method:
java.io.File.eachfile() is applicable for argument types:
(groovy.io.FileType, Script2$_run_closure1) values: [FILES,
Script2$_run_closure1@17b02a]

Possible solutions: eachFile(groovy.io.FileType, groovy.lang.Closure),
eachFile(groovy.lang.Closure), eachLine(int, groovy.lang.Closure),
eachLine(java.lang.String, groovy.lang.Closure),
eachLine(groovy.lang.Closure), isFile()

 

 

Extract from Logs:

 

2020-08-19 17:49:15,917 INFO o.a.j.t.JMeterThread: Thread started: tearDown
Thread Group 1-1

2020-08-19 17:49:15,951 ERROR o.a.j.p.j.s.JSR223Sampler: Problem in JSR223
script JSR223 Sampler, message: javax.script.ScriptException:
groovy.lang.MissingMethodException: No signature of method:
java.io.File.eachfile() is applicable for argument types:
(groovy.io.FileType, Script2$_run_closure1) values: [FILES,
Script2$_run_closure1@17b02a]

Possible solutions: eachFile(groovy.io.FileType, groovy.lang.Closure),
eachFile(groovy.lang.Closure), eachLine(int, groovy.lang.Closure),
eachLine(java.lang.String, groovy.lang.Closure),
eachLine(groovy.lang.Closure), isFile()

javax.script.ScriptException: groovy.lang.MissingMethodException: No
signature of method: java.io.File.eachfile() is applicable for argument
types: (groovy.io.FileType, Script2$_run_closure1) values: [FILES,
Script2$_run_closure1@17b02a]

Possible solutions: eachFile(groovy.io.FileType, groovy.lang.Closure),
eachFile(groovy.lang.Closure), eachLine(int, groovy.lang.Closure),
eachLine(java.lang.String, groovy.lang.Closure),
eachLine(groovy.lang.Closure), isFile()

              at
org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImp
l.java:324) ~[groovy-all-2.4.16.jar:2.4.16]

              at
org.codehaus.groovy.jsr223.GroovyCompiledScript.eval(GroovyCompiledScript.ja
va:72) ~[groovy-all-2.4.16.jar:2.4.16]

              at javax.script.CompiledScript.eval(CompiledScript.java:92)
~[?:1.8.0_241]

              at
org.apache.jmeter.util.JSR223TestElement.processFileOrScript(JSR223TestEleme
nt.java:223) ~[ApacheJMeter_core.jar:5.2.1]

              at
org.apache.jmeter.protocol.java.sampler.JSR223Sampler.sample(JSR223Sampler.j
ava:71) [ApacheJMeter_java.jar:5.2.1]

              at
org.apache.jmeter.threads.JMeterThread.doSampling(JMeterThread.java:627)
[ApacheJMeter_core.jar:5.2.1]

              at
org.apache.jmeter.threads.JMeterThread.executeSamplePackage(JMeterThread.jav
a:551) [ApacheJMeter_core.jar:5.2.1]

              at
org.apache.jmeter.threads.JMeterThread.processSampler(JMeterThread.java:490)
[ApacheJMeter_core.jar:5.2.1]

              at
org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:257)
[ApacheJMeter_core.jar:5.2.1]

              at java.lang.Thread.run(Thread.java:748) [?:1.8.0_241]

Caused by: groovy.lang.MissingMethodException: No signature of method:
java.io.File.eachfile() is applicable for argument types:
(groovy.io.FileType, Script2$_run_closure1) values: [FILES,
Script2$_run_closure1@17b02a]

Possible solutions: eachFile(groovy.io.FileType, groovy.lang.Closure),
eachFile(groovy.lang.Closure), eachLine(int, groovy.lang.Closure),
eachLine(java.lang.String, groovy.lang.Closure),
eachLine(groovy.lang.Closure), isFile()

              at
org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapt
er.java:71) ~[groovy-all-2.4.16.jar:2.4.16]

              at
org.codehaus.groovy.runtime.callsite.PojoMetaClassSite.call(PojoMetaClassSit
e.java:48) ~[groovy-all-2.4.16.jar:2.4.16]

              at
org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray
.java:47) ~[groovy-all-2.4.16.jar:2.4.16]

              at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.
java:116) ~[groovy-all-2.4.16.jar:2.4.16]

              at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.
java:136) ~[groovy-all-2.4.16.jar:2.4.16]

              at Script2.run(Script2.groovy:4) ~[?:?]

              at
org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImp
l.java:321) ~[groovy-all-2.4.16.jar:2.4.16]

              ... 9 more

2020-08-19 17:49:15,955 INFO o.a.j.t.JMeterThread: Thread is done: tearDown
Thread Group 1-1

2020-08-19 17:49:15,955 INFO o.a.j.t.JMeterThread: Thread finished: tearDown
Thread Group 1-1

 

Kind regards

Raja

Reply | Threaded
Open this post in threaded view
|

Re: Groovy Scripts not executing under Jmeter

Felix Schumacher

Am 19.08.20 um 18:53 schrieb Raja:

> Hi
>
>  
>
> I am having problems running groovy scripts under Jmeter.  Can someone
> advise if I need to enable/tweak something for groovy to execute.
>
>  
>
> Jmeter version = 5.2.1
>
> Groovy = 2.4.16 / Groovy Scripting Engine 2.0
>
> Jar = /lib/groovy-all-2.4.16.Jar
>
>  
>
> I have been following an online example so I know this script should work.
>
>  
>
>  
>
> I have placed the following script under JSR223 Sampler:
>
>  
>
> import groovy.io.FileType
>
>  
>
> String folderPath = "data-management"
>
> new File(folderPath).eachfile (FileType.FILES) { file ->
>
>               /* Delete file if file name contains .dat */
>
>               if (file.name.contains('.dat')) file.delete()
>
> }
>
>  
>
> Sampler Result gives:
>
>  
>
> Response code:500
>
> Response message:javax.script.ScriptException:
> groovy.lang.MissingMethodException: No signature of method:
> java.io.File.eachfile() is applicable for argument types:
This error message says, that Groovy is not finding a method named
"eachfile" (exactly like you have written in your code above)...
> (groovy.io.FileType, Script2$_run_closure1) values: [FILES,
> Script2$_run_closure1@17b02a]
>
> Possible solutions: eachFile(groovy.io.FileType, groovy.lang.Closure),
> eachFile(groovy.lang.Closure), eachLine(int, groovy.lang.Closure),
> eachLine(java.lang.String, groovy.lang.Closure),
> eachLine(groovy.lang.Closure), isFile()

but it tries to help you by letting you know, that there are methods
named "eachFile" (the 'F' is upper-case!).

Groovy like Java is case sensitive, so follow the example closely.

Regards

 Felix

>
>  
>
>  
>
> Extract from Logs:
>
>  
>
> 2020-08-19 17:49:15,917 INFO o.a.j.t.JMeterThread: Thread started: tearDown
> Thread Group 1-1
>
> 2020-08-19 17:49:15,951 ERROR o.a.j.p.j.s.JSR223Sampler: Problem in JSR223
> script JSR223 Sampler, message: javax.script.ScriptException:
> groovy.lang.MissingMethodException: No signature of method:
> java.io.File.eachfile() is applicable for argument types:
> (groovy.io.FileType, Script2$_run_closure1) values: [FILES,
> Script2$_run_closure1@17b02a]
>
> Possible solutions: eachFile(groovy.io.FileType, groovy.lang.Closure),
> eachFile(groovy.lang.Closure), eachLine(int, groovy.lang.Closure),
> eachLine(java.lang.String, groovy.lang.Closure),
> eachLine(groovy.lang.Closure), isFile()
>
> javax.script.ScriptException: groovy.lang.MissingMethodException: No
> signature of method: java.io.File.eachfile() is applicable for argument
> types: (groovy.io.FileType, Script2$_run_closure1) values: [FILES,
> Script2$_run_closure1@17b02a]
>
> Possible solutions: eachFile(groovy.io.FileType, groovy.lang.Closure),
> eachFile(groovy.lang.Closure), eachLine(int, groovy.lang.Closure),
> eachLine(java.lang.String, groovy.lang.Closure),
> eachLine(groovy.lang.Closure), isFile()
>
>               at
> org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImp
> l.java:324) ~[groovy-all-2.4.16.jar:2.4.16]
>
>               at
> org.codehaus.groovy.jsr223.GroovyCompiledScript.eval(GroovyCompiledScript.ja
> va:72) ~[groovy-all-2.4.16.jar:2.4.16]
>
>               at javax.script.CompiledScript.eval(CompiledScript.java:92)
> ~[?:1.8.0_241]
>
>               at
> org.apache.jmeter.util.JSR223TestElement.processFileOrScript(JSR223TestEleme
> nt.java:223) ~[ApacheJMeter_core.jar:5.2.1]
>
>               at
> org.apache.jmeter.protocol.java.sampler.JSR223Sampler.sample(JSR223Sampler.j
> ava:71) [ApacheJMeter_java.jar:5.2.1]
>
>               at
> org.apache.jmeter.threads.JMeterThread.doSampling(JMeterThread.java:627)
> [ApacheJMeter_core.jar:5.2.1]
>
>               at
> org.apache.jmeter.threads.JMeterThread.executeSamplePackage(JMeterThread.jav
> a:551) [ApacheJMeter_core.jar:5.2.1]
>
>               at
> org.apache.jmeter.threads.JMeterThread.processSampler(JMeterThread.java:490)
> [ApacheJMeter_core.jar:5.2.1]
>
>               at
> org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:257)
> [ApacheJMeter_core.jar:5.2.1]
>
>               at java.lang.Thread.run(Thread.java:748) [?:1.8.0_241]
>
> Caused by: groovy.lang.MissingMethodException: No signature of method:
> java.io.File.eachfile() is applicable for argument types:
> (groovy.io.FileType, Script2$_run_closure1) values: [FILES,
> Script2$_run_closure1@17b02a]
>
> Possible solutions: eachFile(groovy.io.FileType, groovy.lang.Closure),
> eachFile(groovy.lang.Closure), eachLine(int, groovy.lang.Closure),
> eachLine(java.lang.String, groovy.lang.Closure),
> eachLine(groovy.lang.Closure), isFile()
>
>               at
> org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapt
> er.java:71) ~[groovy-all-2.4.16.jar:2.4.16]
>
>               at
> org.codehaus.groovy.runtime.callsite.PojoMetaClassSite.call(PojoMetaClassSit
> e.java:48) ~[groovy-all-2.4.16.jar:2.4.16]
>
>               at
> org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray
> .java:47) ~[groovy-all-2.4.16.jar:2.4.16]
>
>               at
> org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.
> java:116) ~[groovy-all-2.4.16.jar:2.4.16]
>
>               at
> org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.
> java:136) ~[groovy-all-2.4.16.jar:2.4.16]
>
>               at Script2.run(Script2.groovy:4) ~[?:?]
>
>               at
> org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImp
> l.java:321) ~[groovy-all-2.4.16.jar:2.4.16]
>
>               ... 9 more
>
> 2020-08-19 17:49:15,955 INFO o.a.j.t.JMeterThread: Thread is done: tearDown
> Thread Group 1-1
>
> 2020-08-19 17:49:15,955 INFO o.a.j.t.JMeterThread: Thread finished: tearDown
> Thread Group 1-1
>
>  
>
> Kind regards
>
> Raja
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

RE: Groovy Scripts not executing under Jmeter

Raja-2
Thank you...school boy error

- forgot to update script on the directory I chose
- and yes, typo spotted 'F'

Thank you...need to double check harder

-----Original Message-----
From: Felix Schumacher <[hidden email]>
Sent: 19 August 2020 18:57
To: [hidden email]
Subject: Re: Groovy Scripts not executing under Jmeter


Am 19.08.20 um 18:53 schrieb Raja:

> Hi
>
>  
>
> I am having problems running groovy scripts under Jmeter.  Can someone
> advise if I need to enable/tweak something for groovy to execute.
>
>  
>
> Jmeter version = 5.2.1
>
> Groovy = 2.4.16 / Groovy Scripting Engine 2.0
>
> Jar = /lib/groovy-all-2.4.16.Jar
>
>  
>
> I have been following an online example so I know this script should work.
>
>  
>
>  
>
> I have placed the following script under JSR223 Sampler:
>
>  
>
> import groovy.io.FileType
>
>  
>
> String folderPath = "data-management"
>
> new File(folderPath).eachfile (FileType.FILES) { file ->
>
>               /* Delete file if file name contains .dat */
>
>               if (file.name.contains('.dat')) file.delete()
>
> }
>
>  
>
> Sampler Result gives:
>
>  
>
> Response code:500
>
> Response message:javax.script.ScriptException:
> groovy.lang.MissingMethodException: No signature of method:
> java.io.File.eachfile() is applicable for argument types:
This error message says, that Groovy is not finding a method named
"eachfile" (exactly like you have written in your code above)...
> (groovy.io.FileType, Script2$_run_closure1) values: [FILES,
> Script2$_run_closure1@17b02a]
>
> Possible solutions: eachFile(groovy.io.FileType, groovy.lang.Closure),
> eachFile(groovy.lang.Closure), eachLine(int, groovy.lang.Closure),
> eachLine(java.lang.String, groovy.lang.Closure),
> eachLine(groovy.lang.Closure), isFile()

but it tries to help you by letting you know, that there are methods named
"eachFile" (the 'F' is upper-case!).

Groovy like Java is case sensitive, so follow the example closely.

Regards

 Felix

>
>  
>
>  
>
> Extract from Logs:
>
>  
>
> 2020-08-19 17:49:15,917 INFO o.a.j.t.JMeterThread: Thread started:
> tearDown Thread Group 1-1
>
> 2020-08-19 17:49:15,951 ERROR o.a.j.p.j.s.JSR223Sampler: Problem in
> JSR223 script JSR223 Sampler, message: javax.script.ScriptException:
> groovy.lang.MissingMethodException: No signature of method:
> java.io.File.eachfile() is applicable for argument types:
> (groovy.io.FileType, Script2$_run_closure1) values: [FILES,
> Script2$_run_closure1@17b02a]
>
> Possible solutions: eachFile(groovy.io.FileType, groovy.lang.Closure),
> eachFile(groovy.lang.Closure), eachLine(int, groovy.lang.Closure),
> eachLine(java.lang.String, groovy.lang.Closure),
> eachLine(groovy.lang.Closure), isFile()
>
> javax.script.ScriptException: groovy.lang.MissingMethodException: No
> signature of method: java.io.File.eachfile() is applicable for
> argument
> types: (groovy.io.FileType, Script2$_run_closure1) values: [FILES,
> Script2$_run_closure1@17b02a]
>
> Possible solutions: eachFile(groovy.io.FileType, groovy.lang.Closure),
> eachFile(groovy.lang.Closure), eachLine(int, groovy.lang.Closure),
> eachLine(java.lang.String, groovy.lang.Closure),
> eachLine(groovy.lang.Closure), isFile()
>
>               at
> org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEng
> ineImp
> l.java:324) ~[groovy-all-2.4.16.jar:2.4.16]
>
>               at
> org.codehaus.groovy.jsr223.GroovyCompiledScript.eval(GroovyCompiledScr
> ipt.ja
> va:72) ~[groovy-all-2.4.16.jar:2.4.16]
>
>               at
> javax.script.CompiledScript.eval(CompiledScript.java:92)
> ~[?:1.8.0_241]
>
>               at
> org.apache.jmeter.util.JSR223TestElement.processFileOrScript(JSR223Tes
> tEleme
> nt.java:223) ~[ApacheJMeter_core.jar:5.2.1]
>
>               at
> org.apache.jmeter.protocol.java.sampler.JSR223Sampler.sample(JSR223Sam
> pler.j
> ava:71) [ApacheJMeter_java.jar:5.2.1]
>
>               at
> org.apache.jmeter.threads.JMeterThread.doSampling(JMeterThread.java:62
> 7)
> [ApacheJMeter_core.jar:5.2.1]
>
>               at
> org.apache.jmeter.threads.JMeterThread.executeSamplePackage(JMeterThre
> ad.jav
> a:551) [ApacheJMeter_core.jar:5.2.1]
>
>               at
> org.apache.jmeter.threads.JMeterThread.processSampler(JMeterThread.jav
> a:490)
> [ApacheJMeter_core.jar:5.2.1]
>
>               at
> org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:257)
> [ApacheJMeter_core.jar:5.2.1]
>
>               at java.lang.Thread.run(Thread.java:748) [?:1.8.0_241]
>
> Caused by: groovy.lang.MissingMethodException: No signature of method:
> java.io.File.eachfile() is applicable for argument types:
> (groovy.io.FileType, Script2$_run_closure1) values: [FILES,
> Script2$_run_closure1@17b02a]
>
> Possible solutions: eachFile(groovy.io.FileType, groovy.lang.Closure),
> eachFile(groovy.lang.Closure), eachLine(int, groovy.lang.Closure),
> eachLine(java.lang.String, groovy.lang.Closure),
> eachLine(groovy.lang.Closure), isFile()
>
>               at
> org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecod
> eAdapt
> er.java:71) ~[groovy-all-2.4.16.jar:2.4.16]
>
>               at
> org.codehaus.groovy.runtime.callsite.PojoMetaClassSite.call(PojoMetaCl
> assSit
> e.java:48) ~[groovy-all-2.4.16.jar:2.4.16]
>
>               at
> org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSit
> eArray
> .java:47) ~[groovy-all-2.4.16.jar:2.4.16]
>
>               at
>
org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.
> java:116) ~[groovy-all-2.4.16.jar:2.4.16]
>
>               at
>
org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.

> java:136) ~[groovy-all-2.4.16.jar:2.4.16]
>
>               at Script2.run(Script2.groovy:4) ~[?:?]
>
>               at
> org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEng
> ineImp
> l.java:321) ~[groovy-all-2.4.16.jar:2.4.16]
>
>               ... 9 more
>
> 2020-08-19 17:49:15,955 INFO o.a.j.t.JMeterThread: Thread is done:
> tearDown Thread Group 1-1
>
> 2020-08-19 17:49:15,955 INFO o.a.j.t.JMeterThread: Thread finished:
> tearDown Thread Group 1-1
>
>  
>
> Kind regards
>
> Raja
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Groovy Scripts not executing under Jmeter

Lal Mani Kashyap-2
Hi All,

I am trying test capacity test with a system (RAM 16 GB FREE)  While it has 30 GB physical ram from which location  I am running the script.
Server 1 configuration has  4 CPUs & 8 GB RAM and server 2 configuration has 8 CPUs & 16 GB RAM.

Receiving error : 
020-09-11 06:25:05,020 ERROR o.a.j.JMeter: Uncaught exception:
java.lang.OutOfMemoryError: Java heap space
2020-09-11 06:25:05,607 INFO o.a.j.t.JMeterThread: Thread finished: bzm - Concurrency Thread Group-ThreadStarter 1-435
2020-09-11 06:25:05,614 ERROR o.a.j.JMeter: Uncaught exception:

Although I have increased HEAP SIZE 
HEAP="-Xms256m -Xmx1024m"
Trying to extend more then we are not able to increase.


To test capacity testing I am using bzm - Concurrency Thread Group and configuration as 



Can anyone help us.

Thanks and Regards,
Lalmani

From: Raja <[hidden email]>
Sent: 19 August 2020 23:47
To: 'JMeter Users List' <[hidden email]>
Subject: RE: Groovy Scripts not executing under Jmeter
 
EXTERNAL: This message was sent from outside of Infogain. Please do not click links or open attachments unless you know the content is safe.

Thank you...school boy error

- forgot to update script on the directory I chose
- and yes, typo spotted 'F'

Thank you...need to double check harder

-----Original Message-----
From: Felix Schumacher <[hidden email]>
Sent: 19 August 2020 18:57
To: [hidden email]
Subject: Re: Groovy Scripts not executing under Jmeter


Am 19.08.20 um 18:53 schrieb Raja:
> Hi
>
>
>
> I am having problems running groovy scripts under Jmeter.  Can someone
> advise if I need to enable/tweak something for groovy to execute.
>
>
>
> Jmeter version = 5.2.1
>
> Groovy = 2.4.16 / Groovy Scripting Engine 2.0
>
> Jar = /lib/groovy-all-2.4.16.Jar
>
>
>
> I have been following an online example so I know this script should work.
>
>
>
>
>
> I have placed the following script under JSR223 Sampler:
>
>
>
> import groovy.io.FileType
>
>
>
> String folderPath = "data-management"
>
> new File(folderPath).eachfile (FileType.FILES) { file ->
>
>               /* Delete file if file name contains .dat */
>
>               if (file.name.contains('.dat')) file.delete()
>
> }
>
>
>
> Sampler Result gives:
>
>
>
> Response code:500
>
> Response message:javax.script.ScriptException:
> groovy.lang.MissingMethodException: No signature of method:
> java.io.File.eachfile() is applicable for argument types:
This error message says, that Groovy is not finding a method named
"eachfile" (exactly like you have written in your code above)...
> (groovy.io.FileType, Script2$_run_closure1) values: [FILES,
> Script2$_run_closure1@17b02a]
>
> Possible solutions: eachFile(groovy.io.FileType, groovy.lang.Closure),
> eachFile(groovy.lang.Closure), eachLine(int, groovy.lang.Closure),
> eachLine(java.lang.String, groovy.lang.Closure),
> eachLine(groovy.lang.Closure), isFile()

but it tries to help you by letting you know, that there are methods named
"eachFile" (the 'F' is upper-case!).

Groovy like Java is case sensitive, so follow the example closely.

Regards

 Felix

>
>
>
>
>
> Extract from Logs:
>
>
>
> 2020-08-19 17:49:15,917 INFO o.a.j.t.JMeterThread: Thread started:
> tearDown Thread Group 1-1
>
> 2020-08-19 17:49:15,951 ERROR o.a.j.p.j.s.JSR223Sampler: Problem in
> JSR223 script JSR223 Sampler, message: javax.script.ScriptException:
> groovy.lang.MissingMethodException: No signature of method:
> java.io.File.eachfile() is applicable for argument types:
> (groovy.io.FileType, Script2$_run_closure1) values: [FILES,
> Script2$_run_closure1@17b02a]
>
> Possible solutions: eachFile(groovy.io.FileType, groovy.lang.Closure),
> eachFile(groovy.lang.Closure), eachLine(int, groovy.lang.Closure),
> eachLine(java.lang.String, groovy.lang.Closure),
> eachLine(groovy.lang.Closure), isFile()
>
> javax.script.ScriptException: groovy.lang.MissingMethodException: No
> signature of method: java.io.File.eachfile() is applicable for
> argument
> types: (groovy.io.FileType, Script2$_run_closure1) values: [FILES,
> Script2$_run_closure1@17b02a]
>
> Possible solutions: eachFile(groovy.io.FileType, groovy.lang.Closure),
> eachFile(groovy.lang.Closure), eachLine(int, groovy.lang.Closure),
> eachLine(java.lang.String, groovy.lang.Closure),
> eachLine(groovy.lang.Closure), isFile()
>
>               at
> org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEng
> ineImp
> l.java:324) ~[groovy-all-2.4.16.jar:2.4.16]
>
>               at
> org.codehaus.groovy.jsr223.GroovyCompiledScript.eval(GroovyCompiledScr
> ipt.ja
> va:72) ~[groovy-all-2.4.16.jar:2.4.16]
>
>               at
> javax.script.CompiledScript.eval(CompiledScript.java:92)
> ~[?:1.8.0_241]
>
>               at
> org.apache.jmeter.util.JSR223TestElement.processFileOrScript(JSR223Tes
> tEleme
> nt.java:223) ~[ApacheJMeter_core.jar:5.2.1]
>
>               at
> org.apache.jmeter.protocol.java.sampler.JSR223Sampler.sample(JSR223Sam
> pler.j
> ava:71) [ApacheJMeter_java.jar:5.2.1]
>
>               at
> org.apache.jmeter.threads.JMeterThread.doSampling(JMeterThread.java:62
> 7)
> [ApacheJMeter_core.jar:5.2.1]
>
>               at
> org.apache.jmeter.threads.JMeterThread.executeSamplePackage(JMeterThre
> ad.jav
> a:551) [ApacheJMeter_core.jar:5.2.1]
>
>               at
> org.apache.jmeter.threads.JMeterThread.processSampler(JMeterThread.jav
> a:490)
> [ApacheJMeter_core.jar:5.2.1]
>
>               at
> org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:257)
> [ApacheJMeter_core.jar:5.2.1]
>
>               at java.lang.Thread.run(Thread.java:748) [?:1.8.0_241]
>
> Caused by: groovy.lang.MissingMethodException: No signature of method:
> java.io.File.eachfile() is applicable for argument types:
> (groovy.io.FileType, Script2$_run_closure1) values: [FILES,
> Script2$_run_closure1@17b02a]
>
> Possible solutions: eachFile(groovy.io.FileType, groovy.lang.Closure),
> eachFile(groovy.lang.Closure), eachLine(int, groovy.lang.Closure),
> eachLine(java.lang.String, groovy.lang.Closure),
> eachLine(groovy.lang.Closure), isFile()
>
>               at
> org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecod
> eAdapt
> er.java:71) ~[groovy-all-2.4.16.jar:2.4.16]
>
>               at
> org.codehaus.groovy.runtime.callsite.PojoMetaClassSite.call(PojoMetaCl
> assSit
> e.java:48) ~[groovy-all-2.4.16.jar:2.4.16]
>
>               at
> org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSit
> eArray
> .java:47) ~[groovy-all-2.4.16.jar:2.4.16]
>
>               at
>
org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.
> java:116) ~[groovy-all-2.4.16.jar:2.4.16]
>
>               at
>
org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.
> java:136) ~[groovy-all-2.4.16.jar:2.4.16]
>
>               at Script2.run(Script2.groovy:4) ~[?:?]
>
>               at
> org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEng
> ineImp
> l.java:321) ~[groovy-all-2.4.16.jar:2.4.16]
>
>               ... 9 more
>
> 2020-08-19 17:49:15,955 INFO o.a.j.t.JMeterThread: Thread is done:
> tearDown Thread Group 1-1
>
> 2020-08-19 17:49:15,955 INFO o.a.j.t.JMeterThread: Thread finished:
> tearDown Thread Group 1-1
>
>
>
> Kind regards
>
> Raja
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

The information in this email is confidential and may be legally privileged. It is intended solely for the addressee and access to it by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken based on it, is strictly prohibited and may be unlawful.

pmd
Reply | Threaded
Open this post in threaded view
|

Re: Groovy Scripts not executing under Jmeter

pmd
Hello,
Did you increase your Java Heap ? Otherwise JMeter sets 1g by default if recent version, less if older.
- Xms / -Xmx in jmeter file

Also avoid running in GUI mode.

PS: This component is a 3rd party plugin.

Regards

On Fri, Sep 11, 2020 at 1:14 PM Lal Mani Kashyap <[hidden email]> wrote:
Hi All,

I am trying test capacity test with a system (RAM 16 GB FREE)  While it has 30 GB physical ram from which location  I am running the script.
Server 1 configuration has  4 CPUs & 8 GB RAM and server 2 configuration has 8 CPUs & 16 GB RAM.

Receiving error : 
020-09-11 06:25:05,020 ERROR o.a.j.JMeter: Uncaught exception:
java.lang.OutOfMemoryError: Java heap space
2020-09-11 06:25:05,607 INFO o.a.j.t.JMeterThread: Thread finished: bzm - Concurrency Thread Group-ThreadStarter 1-435
2020-09-11 06:25:05,614 ERROR o.a.j.JMeter: Uncaught exception:

Although I have increased HEAP SIZE 
HEAP="-Xms256m -Xmx1024m"
Trying to extend more then we are not able to increase.


To test capacity testing I am using bzm - Concurrency Thread Group and configuration as 



Can anyone help us.

Thanks and Regards,
Lalmani

From: Raja <[hidden email]>
Sent: 19 August 2020 23:47
To: 'JMeter Users List' <[hidden email]>
Subject: RE: Groovy Scripts not executing under Jmeter
 
EXTERNAL: This message was sent from outside of Infogain. Please do not click links or open attachments unless you know the content is safe.

Thank you...school boy error

- forgot to update script on the directory I chose
- and yes, typo spotted 'F'

Thank you...need to double check harder

-----Original Message-----
From: Felix Schumacher <[hidden email]>
Sent: 19 August 2020 18:57
To: [hidden email]
Subject: Re: Groovy Scripts not executing under Jmeter


Am 19.08.20 um 18:53 schrieb Raja:
> Hi
>
>
>
> I am having problems running groovy scripts under Jmeter.  Can someone
> advise if I need to enable/tweak something for groovy to execute.
>
>
>
> Jmeter version = 5.2.1
>
> Groovy = 2.4.16 / Groovy Scripting Engine 2.0
>
> Jar = /lib/groovy-all-2.4.16.Jar
>
>
>
> I have been following an online example so I know this script should work.
>
>
>
>
>
> I have placed the following script under JSR223 Sampler:
>
>
>
> import groovy.io.FileType
>
>
>
> String folderPath = "data-management"
>
> new File(folderPath).eachfile (FileType.FILES) { file ->
>
>               /* Delete file if file name contains .dat */
>
>               if (file.name.contains('.dat')) file.delete()
>
> }
>
>
>
> Sampler Result gives:
>
>
>
> Response code:500
>
> Response message:javax.script.ScriptException:
> groovy.lang.MissingMethodException: No signature of method:
> java.io.File.eachfile() is applicable for argument types:
This error message says, that Groovy is not finding a method named
"eachfile" (exactly like you have written in your code above)...
> (groovy.io.FileType, Script2$_run_closure1) values: [FILES,
> Script2$_run_closure1@17b02a]
>
> Possible solutions: eachFile(groovy.io.FileType, groovy.lang.Closure),
> eachFile(groovy.lang.Closure), eachLine(int, groovy.lang.Closure),
> eachLine(java.lang.String, groovy.lang.Closure),
> eachLine(groovy.lang.Closure), isFile()

but it tries to help you by letting you know, that there are methods named
"eachFile" (the 'F' is upper-case!).

Groovy like Java is case sensitive, so follow the example closely.

Regards

 Felix

>
>
>
>
>
> Extract from Logs:
>
>
>
> 2020-08-19 17:49:15,917 INFO o.a.j.t.JMeterThread: Thread started:
> tearDown Thread Group 1-1
>
> 2020-08-19 17:49:15,951 ERROR o.a.j.p.j.s.JSR223Sampler: Problem in
> JSR223 script JSR223 Sampler, message: javax.script.ScriptException:
> groovy.lang.MissingMethodException: No signature of method:
> java.io.File.eachfile() is applicable for argument types:
> (groovy.io.FileType, Script2$_run_closure1) values: [FILES,
> Script2$_run_closure1@17b02a]
>
> Possible solutions: eachFile(groovy.io.FileType, groovy.lang.Closure),
> eachFile(groovy.lang.Closure), eachLine(int, groovy.lang.Closure),
> eachLine(java.lang.String, groovy.lang.Closure),
> eachLine(groovy.lang.Closure), isFile()
>
> javax.script.ScriptException: groovy.lang.MissingMethodException: No
> signature of method: java.io.File.eachfile() is applicable for
> argument
> types: (groovy.io.FileType, Script2$_run_closure1) values: [FILES,
> Script2$_run_closure1@17b02a]
>
> Possible solutions: eachFile(groovy.io.FileType, groovy.lang.Closure),
> eachFile(groovy.lang.Closure), eachLine(int, groovy.lang.Closure),
> eachLine(java.lang.String, groovy.lang.Closure),
> eachLine(groovy.lang.Closure), isFile()
>
>               at
> org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEng
> ineImp
> l.java:324) ~[groovy-all-2.4.16.jar:2.4.16]
>
>               at
> org.codehaus.groovy.jsr223.GroovyCompiledScript.eval(GroovyCompiledScr
> ipt.ja
> va:72) ~[groovy-all-2.4.16.jar:2.4.16]
>
>               at
> javax.script.CompiledScript.eval(CompiledScript.java:92)
> ~[?:1.8.0_241]
>
>               at
> org.apache.jmeter.util.JSR223TestElement.processFileOrScript(JSR223Tes
> tEleme
> nt.java:223) ~[ApacheJMeter_core.jar:5.2.1]
>
>               at
> org.apache.jmeter.protocol.java.sampler.JSR223Sampler.sample(JSR223Sam
> pler.j
> ava:71) [ApacheJMeter_java.jar:5.2.1]
>
>               at
> org.apache.jmeter.threads.JMeterThread.doSampling(JMeterThread.java:62
> 7)
> [ApacheJMeter_core.jar:5.2.1]
>
>               at
> org.apache.jmeter.threads.JMeterThread.executeSamplePackage(JMeterThre
> ad.jav
> a:551) [ApacheJMeter_core.jar:5.2.1]
>
>               at
> org.apache.jmeter.threads.JMeterThread.processSampler(JMeterThread.jav
> a:490)
> [ApacheJMeter_core.jar:5.2.1]
>
>               at
> org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:257)
> [ApacheJMeter_core.jar:5.2.1]
>
>               at java.lang.Thread.run(Thread.java:748) [?:1.8.0_241]
>
> Caused by: groovy.lang.MissingMethodException: No signature of method:
> java.io.File.eachfile() is applicable for argument types:
> (groovy.io.FileType, Script2$_run_closure1) values: [FILES,
> Script2$_run_closure1@17b02a]
>
> Possible solutions: eachFile(groovy.io.FileType, groovy.lang.Closure),
> eachFile(groovy.lang.Closure), eachLine(int, groovy.lang.Closure),
> eachLine(java.lang.String, groovy.lang.Closure),
> eachLine(groovy.lang.Closure), isFile()
>
>               at
> org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecod
> eAdapt
> er.java:71) ~[groovy-all-2.4.16.jar:2.4.16]
>
>               at
> org.codehaus.groovy.runtime.callsite.PojoMetaClassSite.call(PojoMetaCl
> assSit
> e.java:48) ~[groovy-all-2.4.16.jar:2.4.16]
>
>               at
> org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSit
> eArray
> .java:47) ~[groovy-all-2.4.16.jar:2.4.16]
>
>               at
>
org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.
> java:116) ~[groovy-all-2.4.16.jar:2.4.16]
>
>               at
>
org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.
> java:136) ~[groovy-all-2.4.16.jar:2.4.16]
>
>               at Script2.run(Script2.groovy:4) ~[?:?]
>
>               at
> org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEng
> ineImp
> l.java:321) ~[groovy-all-2.4.16.jar:2.4.16]
>
>               ... 9 more
>
> 2020-08-19 17:49:15,955 INFO o.a.j.t.JMeterThread: Thread is done:
> tearDown Thread Group 1-1
>
> 2020-08-19 17:49:15,955 INFO o.a.j.t.JMeterThread: Thread finished:
> tearDown Thread Group 1-1
>
>
>
> Kind regards
>
> Raja
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

The information in this email is confidential and may be legally privileged. It is intended solely for the addressee and access to it by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken based on it, is strictly prohibited and may be unlawful.



--
Cordialement.
Philippe Mouawad.


Reply | Threaded
Open this post in threaded view
|

Re: Groovy Scripts not executing under Jmeter

Lal Mani Kashyap-2
Hi I already set the heap size 1g and while running with the non gui mode. I am getting the same error.

Is there any thing to set in other places. I am facing the same with using ultimate thread for spike testing and concurrency thread for capacity testing.

Regards
Lalmani


From: Philippe Mouawad <[hidden email]>
Sent: Friday, September 11, 2020 4:59:54 PM
To: JMeter Users List <[hidden email]>
Subject: Re: Groovy Scripts not executing under Jmeter
 

EXTERNAL: This message was sent from outside of Infogain. Please do not click links or open attachments unless you know the content is safe.

Hello,
Did you increase your Java Heap ? Otherwise JMeter sets 1g by default if recent version, less if older.
- Xms / -Xmx in jmeter file

Also avoid running in GUI mode.

PS: This component is a 3rd party plugin.

Regards

On Fri, Sep 11, 2020 at 1:14 PM Lal Mani Kashyap <[hidden email]> wrote:
Hi All,

I am trying test capacity test with a system (RAM 16 GB FREE)  While it has 30 GB physical ram from which location  I am running the script.
Server 1 configuration has  4 CPUs & 8 GB RAM and server 2 configuration has 8 CPUs & 16 GB RAM.

Receiving error : 
020-09-11 06:25:05,020 ERROR o.a.j.JMeter: Uncaught exception:
java.lang.OutOfMemoryError: Java heap space
2020-09-11 06:25:05,607 INFO o.a.j.t.JMeterThread: Thread finished: bzm - Concurrency Thread Group-ThreadStarter 1-435
2020-09-11 06:25:05,614 ERROR o.a.j.JMeter: Uncaught exception:

Although I have increased HEAP SIZE 
HEAP="-Xms256m -Xmx1024m"
Trying to extend more then we are not able to increase.


To test capacity testing I am using bzm - Concurrency Thread Group and configuration as 



Can anyone help us.

Thanks and Regards,
Lalmani

From: Raja <[hidden email]>
Sent: 19 August 2020 23:47
To: 'JMeter Users List' <[hidden email]>
Subject: RE: Groovy Scripts not executing under Jmeter
 
EXTERNAL: This message was sent from outside of Infogain. Please do not click links or open attachments unless you know the content is safe.

Thank you...school boy error

- forgot to update script on the directory I chose
- and yes, typo spotted 'F'

Thank you...need to double check harder

-----Original Message-----
From: Felix Schumacher <[hidden email]>
Sent: 19 August 2020 18:57
To: [hidden email]
Subject: Re: Groovy Scripts not executing under Jmeter


Am 19.08.20 um 18:53 schrieb Raja:
> Hi
>
>
>
> I am having problems running groovy scripts under Jmeter.  Can someone
> advise if I need to enable/tweak something for groovy to execute.
>
>
>
> Jmeter version = 5.2.1
>
> Groovy = 2.4.16 / Groovy Scripting Engine 2.0
>
> Jar = /lib/groovy-all-2.4.16.Jar
>
>
>
> I have been following an online example so I know this script should work.
>
>
>
>
>
> I have placed the following script under JSR223 Sampler:
>
>
>
> import groovy.io.FileType
>
>
>
> String folderPath = "data-management"
>
> new File(folderPath).eachfile (FileType.FILES) { file ->
>
>               /* Delete file if file name contains .dat */
>
>               if (file.name.contains('.dat')) file.delete()
>
> }
>
>
>
> Sampler Result gives:
>
>
>
> Response code:500
>
> Response message:javax.script.ScriptException:
> groovy.lang.MissingMethodException: No signature of method:
> java.io.File.eachfile() is applicable for argument types:
This error message says, that Groovy is not finding a method named
"eachfile" (exactly like you have written in your code above)...
> (groovy.io.FileType, Script2$_run_closure1) values: [FILES,
> Script2$_run_closure1@17b02a]
>
> Possible solutions: eachFile(groovy.io.FileType, groovy.lang.Closure),
> eachFile(groovy.lang.Closure), eachLine(int, groovy.lang.Closure),
> eachLine(java.lang.String, groovy.lang.Closure),
> eachLine(groovy.lang.Closure), isFile()

but it tries to help you by letting you know, that there are methods named
"eachFile" (the 'F' is upper-case!).

Groovy like Java is case sensitive, so follow the example closely.

Regards

 Felix

>
>
>
>
>
> Extract from Logs:
>
>
>
> 2020-08-19 17:49:15,917 INFO o.a.j.t.JMeterThread: Thread started:
> tearDown Thread Group 1-1
>
> 2020-08-19 17:49:15,951 ERROR o.a.j.p.j.s.JSR223Sampler: Problem in
> JSR223 script JSR223 Sampler, message: javax.script.ScriptException:
> groovy.lang.MissingMethodException: No signature of method:
> java.io.File.eachfile() is applicable for argument types:
> (groovy.io.FileType, Script2$_run_closure1) values: [FILES,
> Script2$_run_closure1@17b02a]
>
> Possible solutions: eachFile(groovy.io.FileType, groovy.lang.Closure),
> eachFile(groovy.lang.Closure), eachLine(int, groovy.lang.Closure),
> eachLine(java.lang.String, groovy.lang.Closure),
> eachLine(groovy.lang.Closure), isFile()
>
> javax.script.ScriptException: groovy.lang.MissingMethodException: No
> signature of method: java.io.File.eachfile() is applicable for
> argument
> types: (groovy.io.FileType, Script2$_run_closure1) values: [FILES,
> Script2$_run_closure1@17b02a]
>
> Possible solutions: eachFile(groovy.io.FileType, groovy.lang.Closure),
> eachFile(groovy.lang.Closure), eachLine(int, groovy.lang.Closure),
> eachLine(java.lang.String, groovy.lang.Closure),
> eachLine(groovy.lang.Closure), isFile()
>
>               at
> org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEng
> ineImp
> l.java:324) ~[groovy-all-2.4.16.jar:2.4.16]
>
>               at
> org.codehaus.groovy.jsr223.GroovyCompiledScript.eval(GroovyCompiledScr
> ipt.ja
> va:72) ~[groovy-all-2.4.16.jar:2.4.16]
>
>               at
> javax.script.CompiledScript.eval(CompiledScript.java:92)
> ~[?:1.8.0_241]
>
>               at
> org.apache.jmeter.util.JSR223TestElement.processFileOrScript(JSR223Tes
> tEleme
> nt.java:223) ~[ApacheJMeter_core.jar:5.2.1]
>
>               at
> org.apache.jmeter.protocol.java.sampler.JSR223Sampler.sample(JSR223Sam
> pler.j
> ava:71) [ApacheJMeter_java.jar:5.2.1]
>
>               at
> org.apache.jmeter.threads.JMeterThread.doSampling(JMeterThread.java:62
> 7)
> [ApacheJMeter_core.jar:5.2.1]
>
>               at
> org.apache.jmeter.threads.JMeterThread.executeSamplePackage(JMeterThre
> ad.jav
> a:551) [ApacheJMeter_core.jar:5.2.1]
>
>               at
> org.apache.jmeter.threads.JMeterThread.processSampler(JMeterThread.jav
> a:490)
> [ApacheJMeter_core.jar:5.2.1]
>
>               at
> org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:257)
> [ApacheJMeter_core.jar:5.2.1]
>
>               at java.lang.Thread.run(Thread.java:748) [?:1.8.0_241]
>
> Caused by: groovy.lang.MissingMethodException: No signature of method:
> java.io.File.eachfile() is applicable for argument types:
> (groovy.io.FileType, Script2$_run_closure1) values: [FILES,
> Script2$_run_closure1@17b02a]
>
> Possible solutions: eachFile(groovy.io.FileType, groovy.lang.Closure),
> eachFile(groovy.lang.Closure), eachLine(int, groovy.lang.Closure),
> eachLine(java.lang.String, groovy.lang.Closure),
> eachLine(groovy.lang.Closure), isFile()
>
>               at
> org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecod
> eAdapt
> er.java:71) ~[groovy-all-2.4.16.jar:2.4.16]
>
>               at
> org.codehaus.groovy.runtime.callsite.PojoMetaClassSite.call(PojoMetaCl
> assSit
> e.java:48) ~[groovy-all-2.4.16.jar:2.4.16]
>
>               at
> org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSit
> eArray
> .java:47) ~[groovy-all-2.4.16.jar:2.4.16]
>
>               at
>
org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.
> java:116) ~[groovy-all-2.4.16.jar:2.4.16]
>
>               at
>
org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.
> java:136) ~[groovy-all-2.4.16.jar:2.4.16]
>
>               at Script2.run(Script2.groovy:4) ~[?:?]
>
>               at
> org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEng
> ineImp
> l.java:321) ~[groovy-all-2.4.16.jar:2.4.16]
>
>               ... 9 more
>
> 2020-08-19 17:49:15,955 INFO o.a.j.t.JMeterThread: Thread is done:
> tearDown Thread Group 1-1
>
> 2020-08-19 17:49:15,955 INFO o.a.j.t.JMeterThread: Thread finished:
> tearDown Thread Group 1-1
>
>
>
> Kind regards
>
> Raja
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

The information in this email is confidential and may be legally privileged. It is intended solely for the addressee and access to it by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken based on it, is strictly prohibited and may be unlawful.



--
Cordialement.
Philippe Mouawad.


pmd
Reply | Threaded
Open this post in threaded view
|

Re: Groovy Scripts not executing under Jmeter

pmd
As I wrote, you need to increase the heap, 1G might not be enough.
And check your script follows best practices:

Regards
On Fri, Sep 11, 2020 at 1:34 PM Lal Mani Kashyap <[hidden email]> wrote:
Hi I already set the heap size 1g and while running with the non gui mode. I am getting the same error.

Is there any thing to set in other places. I am facing the same with using ultimate thread for spike testing and concurrency thread for capacity testing.

Regards
Lalmani


From: Philippe Mouawad <[hidden email]>
Sent: Friday, September 11, 2020 4:59:54 PM
To: JMeter Users List <[hidden email]>
Subject: Re: Groovy Scripts not executing under Jmeter
 

EXTERNAL: This message was sent from outside of Infogain. Please do not click links or open attachments unless you know the content is safe.

Hello,
Did you increase your Java Heap ? Otherwise JMeter sets 1g by default if recent version, less if older.
- Xms / -Xmx in jmeter file

Also avoid running in GUI mode.

PS: This component is a 3rd party plugin.

Regards

On Fri, Sep 11, 2020 at 1:14 PM Lal Mani Kashyap <[hidden email]> wrote:
Hi All,

I am trying test capacity test with a system (RAM 16 GB FREE)  While it has 30 GB physical ram from which location  I am running the script.
Server 1 configuration has  4 CPUs & 8 GB RAM and server 2 configuration has 8 CPUs & 16 GB RAM.

Receiving error : 
020-09-11 06:25:05,020 ERROR o.a.j.JMeter: Uncaught exception:
java.lang.OutOfMemoryError: Java heap space
2020-09-11 06:25:05,607 INFO o.a.j.t.JMeterThread: Thread finished: bzm - Concurrency Thread Group-ThreadStarter 1-435
2020-09-11 06:25:05,614 ERROR o.a.j.JMeter: Uncaught exception:

Although I have increased HEAP SIZE 
HEAP="-Xms256m -Xmx1024m"
Trying to extend more then we are not able to increase.


To test capacity testing I am using bzm - Concurrency Thread Group and configuration as 



Can anyone help us.

Thanks and Regards,
Lalmani

From: Raja <[hidden email]>
Sent: 19 August 2020 23:47
To: 'JMeter Users List' <[hidden email]>
Subject: RE: Groovy Scripts not executing under Jmeter
 
EXTERNAL: This message was sent from outside of Infogain. Please do not click links or open attachments unless you know the content is safe.

Thank you...school boy error

- forgot to update script on the directory I chose
- and yes, typo spotted 'F'

Thank you...need to double check harder

-----Original Message-----
From: Felix Schumacher <[hidden email]>
Sent: 19 August 2020 18:57
To: [hidden email]
Subject: Re: Groovy Scripts not executing under Jmeter


Am 19.08.20 um 18:53 schrieb Raja:
> Hi
>
>
>
> I am having problems running groovy scripts under Jmeter.  Can someone
> advise if I need to enable/tweak something for groovy to execute.
>
>
>
> Jmeter version = 5.2.1
>
> Groovy = 2.4.16 / Groovy Scripting Engine 2.0
>
> Jar = /lib/groovy-all-2.4.16.Jar
>
>
>
> I have been following an online example so I know this script should work.
>
>
>
>
>
> I have placed the following script under JSR223 Sampler:
>
>
>
> import groovy.io.FileType
>
>
>
> String folderPath = "data-management"
>
> new File(folderPath).eachfile (FileType.FILES) { file ->
>
>               /* Delete file if file name contains .dat */
>
>               if (file.name.contains('.dat')) file.delete()
>
> }
>
>
>
> Sampler Result gives:
>
>
>
> Response code:500
>
> Response message:javax.script.ScriptException:
> groovy.lang.MissingMethodException: No signature of method:
> java.io.File.eachfile() is applicable for argument types:
This error message says, that Groovy is not finding a method named
"eachfile" (exactly like you have written in your code above)...
> (groovy.io.FileType, Script2$_run_closure1) values: [FILES,
> Script2$_run_closure1@17b02a]
>
> Possible solutions: eachFile(groovy.io.FileType, groovy.lang.Closure),
> eachFile(groovy.lang.Closure), eachLine(int, groovy.lang.Closure),
> eachLine(java.lang.String, groovy.lang.Closure),
> eachLine(groovy.lang.Closure), isFile()

but it tries to help you by letting you know, that there are methods named
"eachFile" (the 'F' is upper-case!).

Groovy like Java is case sensitive, so follow the example closely.

Regards

 Felix

>
>
>
>
>
> Extract from Logs:
>
>
>
> 2020-08-19 17:49:15,917 INFO o.a.j.t.JMeterThread: Thread started:
> tearDown Thread Group 1-1
>
> 2020-08-19 17:49:15,951 ERROR o.a.j.p.j.s.JSR223Sampler: Problem in
> JSR223 script JSR223 Sampler, message: javax.script.ScriptException:
> groovy.lang.MissingMethodException: No signature of method:
> java.io.File.eachfile() is applicable for argument types:
> (groovy.io.FileType, Script2$_run_closure1) values: [FILES,
> Script2$_run_closure1@17b02a]
>
> Possible solutions: eachFile(groovy.io.FileType, groovy.lang.Closure),
> eachFile(groovy.lang.Closure), eachLine(int, groovy.lang.Closure),
> eachLine(java.lang.String, groovy.lang.Closure),
> eachLine(groovy.lang.Closure), isFile()
>
> javax.script.ScriptException: groovy.lang.MissingMethodException: No
> signature of method: java.io.File.eachfile() is applicable for
> argument
> types: (groovy.io.FileType, Script2$_run_closure1) values: [FILES,
> Script2$_run_closure1@17b02a]
>
> Possible solutions: eachFile(groovy.io.FileType, groovy.lang.Closure),
> eachFile(groovy.lang.Closure), eachLine(int, groovy.lang.Closure),
> eachLine(java.lang.String, groovy.lang.Closure),
> eachLine(groovy.lang.Closure), isFile()
>
>               at
> org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEng
> ineImp
> l.java:324) ~[groovy-all-2.4.16.jar:2.4.16]
>
>               at
> org.codehaus.groovy.jsr223.GroovyCompiledScript.eval(GroovyCompiledScr
> ipt.ja
> va:72) ~[groovy-all-2.4.16.jar:2.4.16]
>
>               at
> javax.script.CompiledScript.eval(CompiledScript.java:92)
> ~[?:1.8.0_241]
>
>               at
> org.apache.jmeter.util.JSR223TestElement.processFileOrScript(JSR223Tes
> tEleme
> nt.java:223) ~[ApacheJMeter_core.jar:5.2.1]
>
>               at
> org.apache.jmeter.protocol.java.sampler.JSR223Sampler.sample(JSR223Sam
> pler.j
> ava:71) [ApacheJMeter_java.jar:5.2.1]
>
>               at
> org.apache.jmeter.threads.JMeterThread.doSampling(JMeterThread.java:62
> 7)
> [ApacheJMeter_core.jar:5.2.1]
>
>               at
> org.apache.jmeter.threads.JMeterThread.executeSamplePackage(JMeterThre
> ad.jav
> a:551) [ApacheJMeter_core.jar:5.2.1]
>
>               at
> org.apache.jmeter.threads.JMeterThread.processSampler(JMeterThread.jav
> a:490)
> [ApacheJMeter_core.jar:5.2.1]
>
>               at
> org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:257)
> [ApacheJMeter_core.jar:5.2.1]
>
>               at java.lang.Thread.run(Thread.java:748) [?:1.8.0_241]
>
> Caused by: groovy.lang.MissingMethodException: No signature of method:
> java.io.File.eachfile() is applicable for argument types:
> (groovy.io.FileType, Script2$_run_closure1) values: [FILES,
> Script2$_run_closure1@17b02a]
>
> Possible solutions: eachFile(groovy.io.FileType, groovy.lang.Closure),
> eachFile(groovy.lang.Closure), eachLine(int, groovy.lang.Closure),
> eachLine(java.lang.String, groovy.lang.Closure),
> eachLine(groovy.lang.Closure), isFile()
>
>               at
> org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecod
> eAdapt
> er.java:71) ~[groovy-all-2.4.16.jar:2.4.16]
>
>               at
> org.codehaus.groovy.runtime.callsite.PojoMetaClassSite.call(PojoMetaCl
> assSit
> e.java:48) ~[groovy-all-2.4.16.jar:2.4.16]
>
>               at
> org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSit
> eArray
> .java:47) ~[groovy-all-2.4.16.jar:2.4.16]
>
>               at
>
org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.
> java:116) ~[groovy-all-2.4.16.jar:2.4.16]
>
>               at
>
org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.
> java:136) ~[groovy-all-2.4.16.jar:2.4.16]
>
>               at Script2.run(Script2.groovy:4) ~[?:?]
>
>               at
> org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEng
> ineImp
> l.java:321) ~[groovy-all-2.4.16.jar:2.4.16]
>
>               ... 9 more
>
> 2020-08-19 17:49:15,955 INFO o.a.j.t.JMeterThread: Thread is done:
> tearDown Thread Group 1-1
>
> 2020-08-19 17:49:15,955 INFO o.a.j.t.JMeterThread: Thread finished:
> tearDown Thread Group 1-1
>
>
>
> Kind regards
>
> Raja
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

The information in this email is confidential and may be legally privileged. It is intended solely for the addressee and access to it by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken based on it, is strictly prohibited and may be unlawful.



--
Cordialement.
Philippe Mouawad.




--
Cordialement.
Philippe Mouawad.


Reply | Threaded
Open this post in threaded view
|

Re: Groovy Scripts not executing under Jmeter

Felix Schumacher
In reply to this post by Lal Mani Kashyap-2


Am 11. September 2020 13:13:55 MESZ schrieb Lal Mani Kashyap <[hidden email]>:

>Hi All,
>
>I am trying test capacity test with a system (RAM 16 GB FREE)  While it
>has 30 GB physical ram from which location  I am running the script.
>Server 1 configuration has  4 CPUs & 8 GB RAM and server 2
>configuration has 8 CPUs & 16 GB RAM.
>
>Receiving error :
>020-09-11 06:25:05,020 ERROR o.a.j.JMeter: Uncaught exception:
>java.lang.OutOfMemoryError: Java heap space
>2020-09-11 06:25:05,607 INFO o.a.j.t.JMeterThread: Thread finished: bzm
>- Concurrency Thread Group-ThreadStarter 1-435
>2020-09-11 06:25:05,614 ERROR o.a.j.JMeter: Uncaught exception:
>
>Although I have increased HEAP SIZE
>HEAP="-Xms256m -Xmx1024m"
>Trying to extend more then we are not able to increase.

Can you post the error message you get, when increasing the heap to a higher value?

Are you using a 64 bit jvm?

Felix

>
>
>To test capacity testing I am using bzm - Concurrency Thread Group and
>configuration as
>[cid:521b403b-6fdd-437e-99b2-a09500d42e6d]
>
>
>Can anyone help us.
>
>Thanks and Regards,
>Lalmani
>________________________________
>From: Raja <[hidden email]>
>Sent: 19 August 2020 23:47
>To: 'JMeter Users List' <[hidden email]>
>Subject: RE: Groovy Scripts not executing under Jmeter
>
>EXTERNAL: This message was sent from outside of Infogain. Please do not
>click links or open attachments unless you know the content is safe.
>
>Thank you...school boy error
>
>- forgot to update script on the directory I chose
>- and yes, typo spotted 'F'
>
>Thank you...need to double check harder
>
>-----Original Message-----
>From: Felix Schumacher <[hidden email]>
>Sent: 19 August 2020 18:57
>To: [hidden email]
>Subject: Re: Groovy Scripts not executing under Jmeter
>
>
>Am 19.08.20 um 18:53 schrieb Raja:
>> Hi
>>
>>
>>
>> I am having problems running groovy scripts under Jmeter.  Can
>someone
>> advise if I need to enable/tweak something for groovy to execute.
>>
>>
>>
>> Jmeter version = 5.2.1
>>
>> Groovy = 2.4.16 / Groovy Scripting Engine 2.0
>>
>> Jar = /lib/groovy-all-2.4.16.Jar
>>
>>
>>
>> I have been following an online example so I know this script should
>work.
>>
>>
>>
>>
>>
>> I have placed the following script under JSR223 Sampler:
>>
>>
>>
>> import groovy.io.FileType
>>
>>
>>
>> String folderPath = "data-management"
>>
>> new File(folderPath).eachfile (FileType.FILES) { file ->
>>
>>               /* Delete file if file name contains .dat */
>>
>>               if (file.name.contains('.dat')) file.delete()
>>
>> }
>>
>>
>>
>> Sampler Result gives:
>>
>>
>>
>> Response code:500
>>
>> Response message:javax.script.ScriptException:
>> groovy.lang.MissingMethodException: No signature of method:
>> java.io.File.eachfile() is applicable for argument types:
>This error message says, that Groovy is not finding a method named
>"eachfile" (exactly like you have written in your code above)...
>> (groovy.io.FileType, Script2$_run_closure1) values: [FILES,
>> Script2$_run_closure1@17b02a]
>>
>> Possible solutions: eachFile(groovy.io.FileType,
>groovy.lang.Closure),
>> eachFile(groovy.lang.Closure), eachLine(int, groovy.lang.Closure),
>> eachLine(java.lang.String, groovy.lang.Closure),
>> eachLine(groovy.lang.Closure), isFile()
>
>but it tries to help you by letting you know, that there are methods
>named
>"eachFile" (the 'F' is upper-case!).
>
>Groovy like Java is case sensitive, so follow the example closely.
>
>Regards
>
> Felix
>
>>
>>
>>
>>
>>
>> Extract from Logs:
>>
>>
>>
>> 2020-08-19 17:49:15,917 INFO o.a.j.t.JMeterThread: Thread started:
>> tearDown Thread Group 1-1
>>
>> 2020-08-19 17:49:15,951 ERROR o.a.j.p.j.s.JSR223Sampler: Problem in
>> JSR223 script JSR223 Sampler, message: javax.script.ScriptException:
>> groovy.lang.MissingMethodException: No signature of method:
>> java.io.File.eachfile() is applicable for argument types:
>> (groovy.io.FileType, Script2$_run_closure1) values: [FILES,
>> Script2$_run_closure1@17b02a]
>>
>> Possible solutions: eachFile(groovy.io.FileType,
>groovy.lang.Closure),
>> eachFile(groovy.lang.Closure), eachLine(int, groovy.lang.Closure),
>> eachLine(java.lang.String, groovy.lang.Closure),
>> eachLine(groovy.lang.Closure), isFile()
>>
>> javax.script.ScriptException: groovy.lang.MissingMethodException: No
>> signature of method: java.io.File.eachfile() is applicable for
>> argument
>> types: (groovy.io.FileType, Script2$_run_closure1) values: [FILES,
>> Script2$_run_closure1@17b02a]
>>
>> Possible solutions: eachFile(groovy.io.FileType,
>groovy.lang.Closure),
>> eachFile(groovy.lang.Closure), eachLine(int, groovy.lang.Closure),
>> eachLine(java.lang.String, groovy.lang.Closure),
>> eachLine(groovy.lang.Closure), isFile()
>>
>>               at
>>
>org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEng
>> ineImp
>> l.java:324) ~[groovy-all-2.4.16.jar:2.4.16]
>>
>>               at
>>
>org.codehaus.groovy.jsr223.GroovyCompiledScript.eval(GroovyCompiledScr
>> ipt.ja
>> va:72) ~[groovy-all-2.4.16.jar:2.4.16]
>>
>>               at
>> javax.script.CompiledScript.eval(CompiledScript.java:92)
>> ~[?:1.8.0_241]
>>
>>               at
>>
>org.apache.jmeter.util.JSR223TestElement.processFileOrScript(JSR223Tes
>> tEleme
>> nt.java:223) ~[ApacheJMeter_core.jar:5.2.1]
>>
>>               at
>>
>org.apache.jmeter.protocol.java.sampler.JSR223Sampler.sample(JSR223Sam
>> pler.j
>> ava:71) [ApacheJMeter_java.jar:5.2.1]
>>
>>               at
>>
>org.apache.jmeter.threads.JMeterThread.doSampling(JMeterThread.java:62
>> 7)
>> [ApacheJMeter_core.jar:5.2.1]
>>
>>               at
>>
>org.apache.jmeter.threads.JMeterThread.executeSamplePackage(JMeterThre
>> ad.jav
>> a:551) [ApacheJMeter_core.jar:5.2.1]
>>
>>               at
>>
>org.apache.jmeter.threads.JMeterThread.processSampler(JMeterThread.jav
>> a:490)
>> [ApacheJMeter_core.jar:5.2.1]
>>
>>               at
>> org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:257)
>> [ApacheJMeter_core.jar:5.2.1]
>>
>>               at java.lang.Thread.run(Thread.java:748) [?:1.8.0_241]
>>
>> Caused by: groovy.lang.MissingMethodException: No signature of
>method:
>> java.io.File.eachfile() is applicable for argument types:
>> (groovy.io.FileType, Script2$_run_closure1) values: [FILES,
>> Script2$_run_closure1@17b02a]
>>
>> Possible solutions: eachFile(groovy.io.FileType,
>groovy.lang.Closure),
>> eachFile(groovy.lang.Closure), eachLine(int, groovy.lang.Closure),
>> eachLine(java.lang.String, groovy.lang.Closure),
>> eachLine(groovy.lang.Closure), isFile()
>>
>>               at
>>
>org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecod
>> eAdapt
>> er.java:71) ~[groovy-all-2.4.16.jar:2.4.16]
>>
>>               at
>>
>org.codehaus.groovy.runtime.callsite.PojoMetaClassSite.call(PojoMetaCl
>> assSit
>> e.java:48) ~[groovy-all-2.4.16.jar:2.4.16]
>>
>>               at
>>
>org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSit
>> eArray
>> .java:47) ~[groovy-all-2.4.16.jar:2.4.16]
>>
>>               at
>>
>org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.
>> java:116) ~[groovy-all-2.4.16.jar:2.4.16]
>>
>>               at
>>
>org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.
>> java:136) ~[groovy-all-2.4.16.jar:2.4.16]
>>
>>               at Script2.run(Script2.groovy:4) ~[?:?]
>>
>>               at
>>
>org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEng
>> ineImp
>> l.java:321) ~[groovy-all-2.4.16.jar:2.4.16]
>>
>>               ... 9 more
>>
>> 2020-08-19 17:49:15,955 INFO o.a.j.t.JMeterThread: Thread is done:
>> tearDown Thread Group 1-1
>>
>> 2020-08-19 17:49:15,955 INFO o.a.j.t.JMeterThread: Thread finished:
>> tearDown Thread Group 1-1
>>
>>
>>
>> Kind regards
>>
>> Raja
>>
>>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [hidden email]
>For additional commands, e-mail: [hidden email]
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [hidden email]
>For additional commands, e-mail: [hidden email]
>
>
>The information in this email is confidential and may be legally
>privileged. It is intended solely for the addressee and access to it by
>anyone else is unauthorized. If you are not the intended recipient, any
>disclosure, copying, distribution or any action taken or omitted to be
>taken based on it, is strictly prohibited and may be unlawful.

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Groovy Scripts not executing under Jmeter

Mariusz W
In reply to this post by Lal Mani Kashyap-2
Hi,
If you have jsr223 sampler with groovy script this code may be problem and cause memory leak....we don't know it without knowing script.

Mariusz

On Fri, 11 Sep 2020 at 13:14, Lal Mani Kashyap <[hidden email]> wrote:
Hi All,

I am trying test capacity test with a system (RAM 16 GB FREE)  While it has 30 GB physical ram from which location  I am running the script.
Server 1 configuration has  4 CPUs & 8 GB RAM and server 2 configuration has 8 CPUs & 16 GB RAM.

Receiving error : 
020-09-11 06:25:05,020 ERROR o.a.j.JMeter: Uncaught exception:
java.lang.OutOfMemoryError: Java heap space
2020-09-11 06:25:05,607 INFO o.a.j.t.JMeterThread: Thread finished: bzm - Concurrency Thread Group-ThreadStarter 1-435
2020-09-11 06:25:05,614 ERROR o.a.j.JMeter: Uncaught exception:

Although I have increased HEAP SIZE 
HEAP="-Xms256m -Xmx1024m"
Trying to extend more then we are not able to increase.


To test capacity testing I am using bzm - Concurrency Thread Group and configuration as 



Can anyone help us.

Thanks and Regards,
Lalmani

From: Raja <[hidden email]>
Sent: 19 August 2020 23:47
To: 'JMeter Users List' <[hidden email]>
Subject: RE: Groovy Scripts not executing under Jmeter
 
EXTERNAL: This message was sent from outside of Infogain. Please do not click links or open attachments unless you know the content is safe.

Thank you...school boy error

- forgot to update script on the directory I chose
- and yes, typo spotted 'F'

Thank you...need to double check harder

-----Original Message-----
From: Felix Schumacher <[hidden email]>
Sent: 19 August 2020 18:57
To: [hidden email]
Subject: Re: Groovy Scripts not executing under Jmeter


Am 19.08.20 um 18:53 schrieb Raja:
> Hi
>
>
>
> I am having problems running groovy scripts under Jmeter.  Can someone
> advise if I need to enable/tweak something for groovy to execute.
>
>
>
> Jmeter version = 5.2.1
>
> Groovy = 2.4.16 / Groovy Scripting Engine 2.0
>
> Jar = /lib/groovy-all-2.4.16.Jar
>
>
>
> I have been following an online example so I know this script should work.
>
>
>
>
>
> I have placed the following script under JSR223 Sampler:
>
>
>
> import groovy.io.FileType
>
>
>
> String folderPath = "data-management"
>
> new File(folderPath).eachfile (FileType.FILES) { file ->
>
>               /* Delete file if file name contains .dat */
>
>               if (file.name.contains('.dat')) file.delete()
>
> }
>
>
>
> Sampler Result gives:
>
>
>
> Response code:500
>
> Response message:javax.script.ScriptException:
> groovy.lang.MissingMethodException: No signature of method:
> java.io.File.eachfile() is applicable for argument types:
This error message says, that Groovy is not finding a method named
"eachfile" (exactly like you have written in your code above)...
> (groovy.io.FileType, Script2$_run_closure1) values: [FILES,
> Script2$_run_closure1@17b02a]
>
> Possible solutions: eachFile(groovy.io.FileType, groovy.lang.Closure),
> eachFile(groovy.lang.Closure), eachLine(int, groovy.lang.Closure),
> eachLine(java.lang.String, groovy.lang.Closure),
> eachLine(groovy.lang.Closure), isFile()

but it tries to help you by letting you know, that there are methods named
"eachFile" (the 'F' is upper-case!).

Groovy like Java is case sensitive, so follow the example closely.

Regards

 Felix

>
>
>
>
>
> Extract from Logs:
>
>
>
> 2020-08-19 17:49:15,917 INFO o.a.j.t.JMeterThread: Thread started:
> tearDown Thread Group 1-1
>
> 2020-08-19 17:49:15,951 ERROR o.a.j.p.j.s.JSR223Sampler: Problem in
> JSR223 script JSR223 Sampler, message: javax.script.ScriptException:
> groovy.lang.MissingMethodException: No signature of method:
> java.io.File.eachfile() is applicable for argument types:
> (groovy.io.FileType, Script2$_run_closure1) values: [FILES,
> Script2$_run_closure1@17b02a]
>
> Possible solutions: eachFile(groovy.io.FileType, groovy.lang.Closure),
> eachFile(groovy.lang.Closure), eachLine(int, groovy.lang.Closure),
> eachLine(java.lang.String, groovy.lang.Closure),
> eachLine(groovy.lang.Closure), isFile()
>
> javax.script.ScriptException: groovy.lang.MissingMethodException: No
> signature of method: java.io.File.eachfile() is applicable for
> argument
> types: (groovy.io.FileType, Script2$_run_closure1) values: [FILES,
> Script2$_run_closure1@17b02a]
>
> Possible solutions: eachFile(groovy.io.FileType, groovy.lang.Closure),
> eachFile(groovy.lang.Closure), eachLine(int, groovy.lang.Closure),
> eachLine(java.lang.String, groovy.lang.Closure),
> eachLine(groovy.lang.Closure), isFile()
>
>               at
> org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEng
> ineImp
> l.java:324) ~[groovy-all-2.4.16.jar:2.4.16]
>
>               at
> org.codehaus.groovy.jsr223.GroovyCompiledScript.eval(GroovyCompiledScr
> ipt.ja
> va:72) ~[groovy-all-2.4.16.jar:2.4.16]
>
>               at
> javax.script.CompiledScript.eval(CompiledScript.java:92)
> ~[?:1.8.0_241]
>
>               at
> org.apache.jmeter.util.JSR223TestElement.processFileOrScript(JSR223Tes
> tEleme
> nt.java:223) ~[ApacheJMeter_core.jar:5.2.1]
>
>               at
> org.apache.jmeter.protocol.java.sampler.JSR223Sampler.sample(JSR223Sam
> pler.j
> ava:71) [ApacheJMeter_java.jar:5.2.1]
>
>               at
> org.apache.jmeter.threads.JMeterThread.doSampling(JMeterThread.java:62
> 7)
> [ApacheJMeter_core.jar:5.2.1]
>
>               at
> org.apache.jmeter.threads.JMeterThread.executeSamplePackage(JMeterThre
> ad.jav
> a:551) [ApacheJMeter_core.jar:5.2.1]
>
>               at
> org.apache.jmeter.threads.JMeterThread.processSampler(JMeterThread.jav
> a:490)
> [ApacheJMeter_core.jar:5.2.1]
>
>               at
> org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:257)
> [ApacheJMeter_core.jar:5.2.1]
>
>               at java.lang.Thread.run(Thread.java:748) [?:1.8.0_241]
>
> Caused by: groovy.lang.MissingMethodException: No signature of method:
> java.io.File.eachfile() is applicable for argument types:
> (groovy.io.FileType, Script2$_run_closure1) values: [FILES,
> Script2$_run_closure1@17b02a]
>
> Possible solutions: eachFile(groovy.io.FileType, groovy.lang.Closure),
> eachFile(groovy.lang.Closure), eachLine(int, groovy.lang.Closure),
> eachLine(java.lang.String, groovy.lang.Closure),
> eachLine(groovy.lang.Closure), isFile()
>
>               at
> org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecod
> eAdapt
> er.java:71) ~[groovy-all-2.4.16.jar:2.4.16]
>
>               at
> org.codehaus.groovy.runtime.callsite.PojoMetaClassSite.call(PojoMetaCl
> assSit
> e.java:48) ~[groovy-all-2.4.16.jar:2.4.16]
>
>               at
> org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSit
> eArray
> .java:47) ~[groovy-all-2.4.16.jar:2.4.16]
>
>               at
>
org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.
> java:116) ~[groovy-all-2.4.16.jar:2.4.16]
>
>               at
>
org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.
> java:136) ~[groovy-all-2.4.16.jar:2.4.16]
>
>               at Script2.run(Script2.groovy:4) ~[?:?]
>
>               at
> org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEng
> ineImp
> l.java:321) ~[groovy-all-2.4.16.jar:2.4.16]
>
>               ... 9 more
>
> 2020-08-19 17:49:15,955 INFO o.a.j.t.JMeterThread: Thread is done:
> tearDown Thread Group 1-1
>
> 2020-08-19 17:49:15,955 INFO o.a.j.t.JMeterThread: Thread finished:
> tearDown Thread Group 1-1
>
>
>
> Kind regards
>
> Raja
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

The information in this email is confidential and may be legally privileged. It is intended solely for the addressee and access to it by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken based on it, is strictly prohibited and may be unlawful.