Import in Groovy-script fails

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Import in Groovy-script fails

Hardy Koebe

Hello,

 

I want to utilize a groovy script for running our unit test libraries in parallel. Therefore I’m using the groovyx.gpars.ParallelEnhancer lib:

 

import groovyx.gpars.ParallelEnhancer

 

When running this script via the Groovy-plugin (v. 2.0) or in the script console of Jenkins, I get the following error message:

org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:

Script1.groovy: 1: unable to resolve class groovyx.gpars.ParallelEnhancer

@ line 1, column 1.

   import groovyx.gpars.ParallelEnhancer

   ^

 

The environment variable GROOVY_HOME is set correctly. I can’t find any additional options in the Jenkins configuration to setup an additional class path or any other configuration. On my local PC, the script runs without problems with the same groovy minor version (v. 2.4). Am I missing a configuration? I have no more ideas what I can try to run my script.

 


Kind regards / Mit freundlichen Grüßen

Hardy Koebe
externer Mitarbeiter, external employee of
Ferchau Engineering GmbH
Phone:  +49 3641 52793-70
Mail:      jena(at)ferchau.com

im Auftrag von, on behalf of

Laser Imaging Systems GmbH
Friedrich-Hund-Str. 3, D-07745 Jena, Germany
Phone: +49 3641 8761920
Fax:     +49 3641 8761900
Mail:     [hidden email]

Sitz der Gesellschaft: Jena
Handelsregister / Registered No: AG Jena HRB 205768
Geschäftsführung / Managing Directors: Dr. Werner Eschke, Arik Gordon

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" 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-users/B72789CA02EBE34A84137E59D4E4B6DD8D6D08BE%40excg2010dg-lis1.orbotech.org.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Import in Groovy-script fails

Dirk Heinrichs-3
From: [hidden email] [mailto:[hidden email]] On Behalf Of Hardy Koebe

> The environment variable GROOVY_HOME is set correctly. I can’t find any additional options
> in the Jenkins configuration to setup an additional class path or any other configuration. On
> my local PC, the script runs without problems with the same groovy minor version (v. 2.4).
> Am I missing a configuration? I have no more ideas what I can try to run my script.

The Groovy Script Console is equivalent to Execute System Groovy Script step in a job. Those scripts run directly in your Jenkins master JVM. What you probably want here is a simple "Execute Groovy script" (without the "System") step in a job.

HTH...

        Dirk
--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mailto:[hidden email].
To view this discussion on the web visit https://urldefense.proofpoint.com/v2/url?u=https-3A__groups.google.com_d_msgid_jenkinsci-2Dusers_B72789CA02EBE34A84137E59D4E4B6DD8D6D08BE-2540excg2010dg-2Dlis1.orbotech.org-3Futm-5Fmedium-3Demail-26utm-5Fsource-3Dfooter&d=DwMFaQ&c=ZgVRmm3mf2P1-XDAyDsu4A&r=TsKycyisPP_6FVCeETRooIdY_8hdAsXoxwbvHso_TaI&m=zSx67R_YwLKPG8Ja9-mwfbKIsZni3tJli8DLpBNWZbs&s=zU-RomVLGeFwKpw_xh5I_g9cVxpg0t6h3YMGUYiSqa0&e=.
For more options, visit https://urldefense.proofpoint.com/v2/url?u=https-3A__groups.google.com_d_optout&d=DwMFaQ&c=ZgVRmm3mf2P1-XDAyDsu4A&r=TsKycyisPP_6FVCeETRooIdY_8hdAsXoxwbvHso_TaI&m=zSx67R_YwLKPG8Ja9-mwfbKIsZni3tJli8DLpBNWZbs&s=h2_dLNptcOKxnHVvm1Gl_HjdsVrn50vYCQw14Xpe8BM&e=.

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" 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-users/SN6PR15MB24169B2C583A66D731C4A8C3AA930%40SN6PR15MB2416.namprd15.prod.outlook.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

RE: Import in Groovy-script fails

Hardy Koebe
When I use "Execute groovy script" build step, I get another error:

[GROOVY WARNING] Groovy executable is NULL, please check your Groovy configuration, trying fallback 'groovy' instead.
The system cannot find the file specified

So, there seems to be another problem with the configuration of the Groovy script plugin. But I wasn't able to figure out, where to configure the plugin. There's nothing to see in the Jenkins configuration. Any suggestions?

Kind regards / Mit freundlichen Grüßen

Hardy Koebe | Software
Laser Imaging Systems GmbH
Phone: +49 3641 8761920 | Mail: [hidden email]



-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Dirk Heinrichs
Sent: Dienstag, 15. Mai 2018 13:49
To: [hidden email]
Subject: [EXTERNALLY SPOOFED] Re: Import in Groovy-script fails

From: [hidden email] [mailto:[hidden email]] On Behalf Of Hardy Koebe

> The environment variable GROOVY_HOME is set correctly. I can’t find
> any additional options in the Jenkins configuration to setup an
> additional class path or any other configuration. On my local PC, the script runs without problems with the same groovy minor version (v. 2.4).
> Am I missing a configuration? I have no more ideas what I can try to run my script.

The Groovy Script Console is equivalent to Execute System Groovy Script step in a job. Those scripts run directly in your Jenkins master JVM. What you probably want here is a simple "Execute Groovy script" (without the "System") step in a job.

HTH...

        Dirk
--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mailto:[hidden email].
To view this discussion on the web visit https://urldefense.proofpoint.com/v2/url?u=https-3A__groups.google.com_d_msgid_jenkinsci-2Dusers_B72789CA02EBE34A84137E59D4E4B6DD8D6D08BE-2540excg2010dg-2Dlis1.orbotech.org-3Futm-5Fmedium-3Demail-26utm-5Fsource-3Dfooter&d=DwMFaQ&c=ZgVRmm3mf2P1-XDAyDsu4A&r=TsKycyisPP_6FVCeETRooIdY_8hdAsXoxwbvHso_TaI&m=zSx67R_YwLKPG8Ja9-mwfbKIsZni3tJli8DLpBNWZbs&s=zU-RomVLGeFwKpw_xh5I_g9cVxpg0t6h3YMGUYiSqa0&e=.
For more options, visit https://urldefense.proofpoint.com/v2/url?u=https-3A__groups.google.com_d_optout&d=DwMFaQ&c=ZgVRmm3mf2P1-XDAyDsu4A&r=TsKycyisPP_6FVCeETRooIdY_8hdAsXoxwbvHso_TaI&m=zSx67R_YwLKPG8Ja9-mwfbKIsZni3tJli8DLpBNWZbs&s=h2_dLNptcOKxnHVvm1Gl_HjdsVrn50vYCQw14Xpe8BM&e=.

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" 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-users/SN6PR15MB24169B2C583A66D731C4A8C3AA930%40SN6PR15MB2416.namprd15.prod.outlook.com.
For more options, visit https://groups.google.com/d/optout.


====================================================================================================
This email was sent to you from AUTOMATED SYSTEMS or NON-ORBOTECH ORIGINS.
If you consider this to be a Suspicious email or a Phishing attempt, please contact [hidden email].
====================================================================================================

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" 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-users/B72789CA02EBE34A84137E59D4E4B6DD8D6DD761%40excg2010dg-lis2.orbotech.org.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Import in Groovy-script fails

Dirk Heinrichs-3
From: [hidden email] [mailto:[hidden email]] On Behalf Of Hardy Koebe

> When I use "Execute groovy script" build step, I get another error:
>
> [GROOVY WARNING] Groovy executable is NULL, please check your Groovy configuration, trying fallback 'groovy' instead.
> The system cannot find the file specified

In your Jenkins configuration (Manage Jenkins -> Global Tool Configuration), you need to setup at least one Groovy installation, which you can then select in your Execute Groovy step.

Bye...

        Dirk
--
You received this message because you are subscribed to the Google Groups "Jenkins Users" 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://urldefense.proofpoint.com/v2/url?u=https-3A__groups.google.com_d_msgid_jenkinsci-2Dusers_B72789CA02EBE34A84137E59D4E4B6DD8D6DD761-2540excg2010dg-2Dlis2.orbotech.org&d=DwIFaQ&c=ZgVRmm3mf2P1-XDAyDsu4A&r=TsKycyisPP_6FVCeETRooIdY_8hdAsXoxwbvHso_TaI&m=9mmBr6Ma_Wnv5sf3GYDDU9zcDylvb7rT12C4pXFWcts&s=4jy7avobp3Kw1_DPAHvlnBYJ6bjUi55h_8bomc_ycDU&e=.
For more options, visit https://urldefense.proofpoint.com/v2/url?u=https-3A__groups.google.com_d_optout&d=DwIFaQ&c=ZgVRmm3mf2P1-XDAyDsu4A&r=TsKycyisPP_6FVCeETRooIdY_8hdAsXoxwbvHso_TaI&m=9mmBr6Ma_Wnv5sf3GYDDU9zcDylvb7rT12C4pXFWcts&s=7ZdKIwXnjWY9IVRwPS3ly9BmofwR53h9KHiIssv23Ss&e=.

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" 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-users/SN6PR15MB2416A5EBB1E886341596EBD3AA930%40SN6PR15MB2416.namprd15.prod.outlook.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

RE: Import in Groovy-script fails

Hardy Koebe
Now I tried to configure the Groovy plugin.
I've set the path to the groovy installation. Now, when I run my groovy script with the "Execute Groovy script" build step, I get the following error:

error: dynamic library D:\_Jenkins_LTS_\tools\hudson.model.JDK\Java_8u66\jre\bin\client\jvm.dll exists but could not be loaded!
This may be caused e.g. by trying to use a 32-bit executable to load a 64-bit jvm (or vice versa)
error (win code 193): (null)
error: dynamic library D:\_Jenkins_LTS_\tools\hudson.model.JDK\Java_8u66\jre\bin\server\jvm.dll exists but could not be loaded!
This may be caused e.g. by trying to use a 32-bit executable to load a 64-bit jvm (or vice versa)
error (win code 193): (null)
error: could not find client or server jvm under D:\_Jenkins_LTS_\tools\hudson.model.JDK\Java_8u66
 please check that it is a valid jdk / jre containing the desired type of jvm

This seems to be a problem with the "bitness" of different processes. I get the same error, when I run the groovy command via a "Command line" build step. But I have no idea, how to solve this... Can anyone give advice?


When running as "Execut system Groovy script", I still get the failing import-message.


Kind regards / Mit freundlichen Grüßen

Hardy Koebe | Software
Laser Imaging Systems GmbH
Phone: +49 3641 8761920 | Mail: [hidden email]



-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Dirk Heinrichs
Sent: Dienstag, 15. Mai 2018 15:02
To: [hidden email]
Subject: [EXTERNALLY SPOOFED] Re: Import in Groovy-script fails

From: [hidden email] [mailto:[hidden email]] On Behalf Of Hardy Koebe

> When I use "Execute groovy script" build step, I get another error:
>
> [GROOVY WARNING] Groovy executable is NULL, please check your Groovy configuration, trying fallback 'groovy' instead.
> The system cannot find the file specified

In your Jenkins configuration (Manage Jenkins -> Global Tool Configuration), you need to setup at least one Groovy installation, which you can then select in your Execute Groovy step.

Bye...

        Dirk
--
You received this message because you are subscribed to the Google Groups "Jenkins Users" 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://urldefense.proofpoint.com/v2/url?u=https-3A__groups.google.com_d_msgid_jenkinsci-2Dusers_B72789CA02EBE34A84137E59D4E4B6DD8D6DD761-2540excg2010dg-2Dlis2.orbotech.org&d=DwIFaQ&c=ZgVRmm3mf2P1-XDAyDsu4A&r=TsKycyisPP_6FVCeETRooIdY_8hdAsXoxwbvHso_TaI&m=9mmBr6Ma_Wnv5sf3GYDDU9zcDylvb7rT12C4pXFWcts&s=4jy7avobp3Kw1_DPAHvlnBYJ6bjUi55h_8bomc_ycDU&e=.
For more options, visit https://urldefense.proofpoint.com/v2/url?u=https-3A__groups.google.com_d_optout&d=DwIFaQ&c=ZgVRmm3mf2P1-XDAyDsu4A&r=TsKycyisPP_6FVCeETRooIdY_8hdAsXoxwbvHso_TaI&m=9mmBr6Ma_Wnv5sf3GYDDU9zcDylvb7rT12C4pXFWcts&s=7ZdKIwXnjWY9IVRwPS3ly9BmofwR53h9KHiIssv23Ss&e=.

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" 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-users/SN6PR15MB2416A5EBB1E886341596EBD3AA930%40SN6PR15MB2416.namprd15.prod.outlook.com.
For more options, visit https://groups.google.com/d/optout.


====================================================================================================
This email was sent to you from AUTOMATED SYSTEMS or NON-ORBOTECH ORIGINS.
If you consider this to be a Suspicious email or a Phishing attempt, please contact [hidden email].
====================================================================================================

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" 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-users/B72789CA02EBE34A84137E59D4E4B6DD8D6E4E77%40excg2010dg-lis2.orbotech.org.
For more options, visit https://groups.google.com/d/optout.