Import in Groovy-script fails

62 views
Skip to first unread message

Hardy Koebe

unread,
May 15, 2018, 4:24:51 AM5/15/18
to jenkins...@googlegroups.com

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:     Hardy...@orbotech.com

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

Dirk Heinrichs

unread,
May 15, 2018, 7:49:27 AM5/15/18
to jenkins...@googlegroups.com
From: jenkins...@googlegroups.com [mailto:jenkins...@googlegroups.com] 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:jenkinsci-use...@googlegroups.com.
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=.

Hardy Koebe

unread,
May 15, 2018, 8:42:23 AM5/15/18
to jenkins...@googlegroups.com
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: Hardy...@orbotech.com
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
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 Cybe...@orbotech.com.
====================================================================================================

Dirk Heinrichs

unread,
May 15, 2018, 9:02:18 AM5/15/18
to jenkins...@googlegroups.com
From: jenkins...@googlegroups.com [mailto:jenkins...@googlegroups.com] 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 jenkinsci-use...@googlegroups.com.
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=.

Hardy Koebe

unread,
May 17, 2018, 4:33:27 AM5/17/18
to jenkins...@googlegroups.com
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: Hardy...@orbotech.com



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

To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/SN6PR15MB2416A5EBB1E886341596EBD3AA930%40SN6PR15MB2416.namprd15.prod.outlook.com.
Reply all
Reply to author
Forward
0 new messages