ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

groovy script failed in Krel_reconfigura-jobs

asked 2017-07-21 10:24:55 -0500

Bo Li gravatar image


I was trying to setup a buildfarm for my group. I have ran import_upstream successfully. Then next I triggered "Krel_reconfigure-jobs". It took a lot of time to finish configuring tons of jobs. After this, the job failed when it ran the generated groovy files, complaining unable to resolve imports. The tail of the log is pasted as below.

I was also thinking about write a tutorial about some of the problems I met configuring the buildfarm ( ). Maybe after I succeed setup the buildfarm I can fiinsh this.

18:06:17 Configuration for jobs: Ksrc_uX__zeroconf_avahi_suite__ubuntu_xenial__source, Kbin_uX64__zeroconf_avahi_suite__ubuntu_xenial_amd64__binary
18:06:17 Configuration for jobs: Ksrc_dJ__zeroconf_avahi_suite__debian_jessie__source, Kbin_dJ64__zeroconf_avahi_suite__debian_jessie_amd64__binary
18:06:21 Writing groovy script '/tmp/reconfigure_jobs/reconfigure_jobs.groovy' to reconfigure 4 views and 5704 jobs
18:06:22 + echo # END SECTION
18:06:22 # END SECTION
18:06:23 ERROR: Build step failed with exception
18:06:23 org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
18:06:23 Script1.groovy: 12: unable to resolve class org.apache.xml.serialize.OutputFormat
18:06:23  @ line 12, column 1.
18:06:23    import org.apache.xml.serialize.OutputFormat
18:06:23    ^
18:06:23 Script1.groovy: 13: unable to resolve class org.apache.xml.serialize.XMLSerializer
18:06:23  @ line 13, column 1.
18:06:23    import org.apache.xml.serialize.XMLSerializer
18:06:23    ^
18:06:23 Script1.groovy: 1: unable to resolve class difflib.DiffUtils
18:06:23  @ line 1, column 1.
18:06:23    import difflib.DiffUtils
18:06:23    ^
18:06:23 3 errors
18:06:23    at org.codehaus.groovy.control.ErrorCollector.failIfErrors(
18:06:23    at org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(
18:06:23    at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(
18:06:23    at org.codehaus.groovy.control.CompilationUnit.compile(
18:06:23    at groovy.lang.GroovyClassLoader.doParseClass(
18:06:23    at groovy.lang.GroovyClassLoader.parseClass(
18:06:23    at groovy.lang.GroovyShell.parseClass(
18:06:23    at groovy.lang.GroovyShell.parse(
18:06:23    at groovy.lang.GroovyShell.parse(
18:06:23    at groovy.lang.GroovyShell.parse(
18:06:23    at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SecureGroovyScript.evaluate(
18:06:23    at
18:06:23    at hudson.plugins.groovy.SystemGroovy.perform(
18:06:23    at hudson.tasks.BuildStepMonitor$1.perform(
18:06:23    at hudson.model.AbstractBuild$AbstractBuildExecution.perform(
18:06:23    at hudson.model.Build$
18:06:23    at hudson.model.Build$BuildExecution.doRun(
18:06:23    at hudson.model.AbstractBuild$
18:06:23    at hudson.model.Run.execute(
18:06 ...
edit retag flag offensive close merge delete


Sending e-mails to:
ERROR: Could not connect to SMTP host: localhost, port: 25

please fix this also: disable notification emails for both maintainers and committers in all your *.yaml files in your fork of ros_buildfarm_config ..

gvdhoorn gravatar image gvdhoorn  ( 2017-07-21 11:16:34 -0500 )edit

.. and make sure to update the email addresses listed under the notification_emails keys.

gvdhoorn gravatar image gvdhoorn  ( 2017-07-21 11:17:33 -0500 )edit

@gvdhoorn Yes, thanks for the remind.

Bo Li gravatar image Bo Li  ( 2017-07-22 08:16:55 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2017-07-21 11:37:28 -0500

Dirk Thomas gravatar image

updated 2017-07-21 11:38:58 -0500

According to the error messages you are missing some Java packages. Until recently the buildfarm downloaded e.g. diffutils on demand. But as of the Jenkins Groovy plugin provides that library already.

Your instructions mention that you are using an older version of Jenkins and therefore likely older plugins. You might want to try using the same version as on the ROS buildfarm (currently Jenkins 2.46.2 and Groovy 2.0).

Please also note that there is an active effort to update the buildfarm_deployment to use Xenial instead of Trusty. That upgrade will also move us from Java 7 to Java 8 which will allow us to upgrade to a newer Jenkins version which requires Java 8.

edit flag offensive delete link more


Thanks for the reply. Switched to Jenkins 2.46.2 and the Groovy plugin is 2.0 but still get the same error. Is there a way to check why Groovy plugin is not downloading the libraries? I checked /var/lib/jenkins/plugins/groovy/WEB-INF/lib and see commons-exec-1.2.jar groovy.jar.

Bo Li gravatar image Bo Li  ( 2017-07-22 08:19:23 -0500 )edit

The above issue is solved by following buildfarm_deployment/issues/147 and also downloading apache-xml-xerces.jar. Thanks again for the hint. Then after approving some scripts I reached another error "com.thoughtworks.xstream.mapper.CannotResolveClassException: hudson.plugins.view.dashboard.Dashboa

Bo Li gravatar image Bo Li  ( 2017-07-23 05:40:39 -0500 )edit

The full error is updated to the end of the tutorial gist. Just wanna seek help again:)

Bo Li gravatar image Bo Li  ( 2017-07-23 09:06:28 -0500 )edit

OK, finally got it worked. Thanks for the answer. The later error requires the dashboard view plugin.

Bo Li gravatar image Bo Li  ( 2017-07-23 18:13:38 -0500 )edit

If you provision the machines manually please make sure to include all the plugins and configurations from the buildfarm_deployment repo (in this case ).

Dirk Thomas gravatar image Dirk Thomas  ( 2017-07-24 11:04:41 -0500 )edit

Question Tools

1 follower


Asked: 2017-07-21 10:24:55 -0500

Seen: 261 times

Last updated: Jul 21 '17