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

957 views
Skip to first unread message

Neel Desai

unread,
Nov 2, 2017, 4:47:02 PM11/2/17
to Jenkins Developers
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,

Daniel Beck

unread,
Nov 2, 2017, 4:50:14 PM11/2/17
to jenkin...@googlegroups.com

> On 2. Nov 2017, at 21:34, Neel Desai <neelde...@gmail.com> 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.

Reply all
Reply to author
Forward
0 new messages