Caught: groovy.lang.MissingPropertyException: No such property: executable for class: java.lang.Thread

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

Caught: groovy.lang.MissingPropertyException: No such property: executable for class: java.lang.Thread

Neel Desai
Hello,


I am running my performance testing in one of the slave node (linux machine). In build step I am using "Execute groovy script" which obviously running on Slave machine.

This line throws me an error: def buildRun = Thread.currentThread().executable

Error: Caught: groovy.lang.MissingPropertyException: No such property: executable for class: java.lang.Thread
groovy.lang.MissingPropertyException: No such property: executable for class: java.lang.Thread
	at hudson7323000363615321518.run(hudson7323000363615321518.groovy:90)
Build step 'Execute Groovy script' marked build as failure


I know I found online everyone is suggesting to use "Execute System Groovy script" but I can't use in this case as I don't want to run anything on master. Also this program uses buildRun object to get another file which on slave machine so if I use "Execute System Groovy Script" though it is giving me issue for finding this file as it is on slave machine. Can anyone suggest what should I do? Where I am doing wrong?


Thanks,

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/3e20bd21-a509-47fd-a952-eb878c5032ae%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Caught: groovy.lang.MissingPropertyException: No such property: executable for class: java.lang.Thread

Daniel Beck

> On 2. Nov 2017, at 21:34, Neel Desai <[hidden email]> wrote:
>
> Where I am doing wrong?

The standalone Groovy program you wrote knows absolutely nothing about Jenkins internals. 'executable' is specific to threads representing executors in Jenkins.

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/ACE4B445-35D1-4544-A825-2B929C53F7C7%40beckweb.net.
For more options, visit https://groups.google.com/d/optout.