What is "slave Java"

239 views
Skip to first unread message

Michael Giroux

unread,
Nov 18, 2016, 9:46:35 AM11/18/16
to Jenkins Users
We are running Jenkins 2.19.2 with JDK 1.8.
We have maven projects configured to run in older JDKs, and we get the following message:
ERROR: ================================================================================
ERROR: Invalid project setup: hudson/maven/AbstractMavenProcessFactory$ConfigureOriginalJDK : Unsupported major.minor version 51.0
ERROR: [JENKINS-18403][JENKINS-28294] JDK 'JDK 1.6' not supported to run Maven projects.
ERROR: Maven projects have to be launched with a Java version greater or equal to the minimum version required by the master.
ERROR: Use the Maven JDK Toolchains (plugin) to build your maven project with an older JDK.
ERROR: Retrying with slave Java and setting compile/test properties to point to /opt/ci/java/x64/jdk1.6.
ERROR: ================================================================================

The build runs successfully.

We do NOT have a slave named "Java" configured.  I am unable to find any documentation that describes what is really going on here.

Could someone either explain, or point me to documentation that explains what is really happening here?  Specifically what does
"Retrying with slave Java ..." mean since we do not have a slave named "Java".

Michael

Daniel Beck

unread,
Nov 18, 2016, 10:46:22 AM11/18/16
to jenkins...@googlegroups.com

> On 18.11.2016, at 15:46, Michael Giroux <mlgi...@gmail.com> wrote:
>
> Could someone either explain, or point me to documentation that explains what is really happening here? Specifically what does
> "Retrying with slave Java ..." mean since we do not have a slave named "Java".

This refers to the Java runtime used to run the slave (now called build agent) process.

Michael Giroux

unread,
Nov 18, 2016, 12:46:48 PM11/18/16
to Jenkins Users, m...@beckweb.net
Thanks Daniel.  But I'm still not clear on what is going on under the covers.  The job is NOT configured to run on a slave, but the message indicates that the build was retried on a slave.  Is there a default slave that runs on the Jenkins host to support this retry?

Mark Bidewell

unread,
Nov 18, 2016, 2:48:56 PM11/18/16
to Jenkins Users, m...@beckweb.net
In short, Jenkins after a certain point Uses Java 1.7+.  It appears you are using the Maven project type.  This project type injects Jenkins behaviors into the Maven build.  These behaviors must run with Java 1.7+.  The error you are getting is to to Jenkins attempting to use its behaviors with Java 1.6.  In this case the behavior is to run Maven using the JDK on which Jenkins itself is running then set Maven properties for Java to point @ JDK 1.6.

Does that help?

Michael Giroux

unread,
Nov 19, 2016, 12:32:33 AM11/19/16
to Jenkins Users, m...@beckweb.net
> Does that help?
Just barely.

Yes it is a Maven project.  It is clear from the execution that the build ultimately succeeds.  We are aware of the JDK compatibility issue.  We spent a couple of months updating maven projects to configure toolchains in the poms.  After investing significant effort to build projects in JDK 1.8 using toolchains to configure the JDK needed to compile/test, we were surprised that jobs that had not been updated still run successfully.  This raises a few questions:
1. If the builds will work without being updated, what was the point of upgrading projects to use toolchains?
2. has Jenkins taken steps to solve the issue by running these jobs in a slave?
3. If jenkins has addressed the issue, what is the point of the error message?  It seems to be unnecessary.
4. Is there a performance issue, or other reason that would justify us continuing the effort to update the remaining (1000+) projects to build w/ JDK 1.8 using toolchains to configure the JDK needed to compile/test the project?

If Jenkins is handling the issue, it seems the error message is unnecessary.

Daniel Beck

unread,
Nov 19, 2016, 10:38:05 AM11/19/16
to Jenkins Users

> On 18.11.2016, at 18:46, Michael Giroux <mlgi...@gmail.com> wrote:
>
> Thanks Daniel. But I'm still not clear on what is going on under the covers. The job is NOT configured to run on a slave, but the message indicates that the build was retried on a slave. Is there a default slave that runs on the Jenkins host to support this retry?

No. Probably just a badly worded message and the assumption based on best practices that builds should run on slaves.

Same behavior change though -- the configured JDK cannot build the project, so Jenkins will try to use the JRE/JDK that runs Jenkins itself.

> 1. If the builds will work without being updated, what was the point of upgrading projects to use toolchains?

You're building using a newer JRE. Builds may fail even though they should succeed in your desired configuration, and vice-versa.

> 2. has Jenkins taken steps to solve the issue by running these jobs in a slave?

No, see above.

> 3. If jenkins has addressed the issue, what is the point of the error message? It seems to be unnecessary.

To inform you that possibly undesired magic is happening.

> 4. Is there a performance issue, or other reason that would justify us continuing the effort to update the remaining (1000+) projects to build w/ JDK 1.8 using toolchains to configure the JDK needed to compile/test the project?

See above. The project isn't actually built using the JDK you want building the project.

Michael Giroux

unread,
Nov 19, 2016, 12:35:56 PM11/19/16
to Jenkins Users, m...@beckweb.net
Thanks for taking the time to answer each of the questions.

We are running Jenkins in JDK 1.8.  The poorly worded error message thought makes a lot of sense.  Reading the error message again, I am concluding that the build was retried using the default JDK (the one running Jenkins).  As such, we ended up building a JDK 1.6 project with JDK 1.8.  The build runs because JDK 1.8 can produce byte code for older versions.

Is this the correct group to suggest an improvement to the error message?  The message should make it clear that the build is being run by the default JRE.

This has been very helpful.  Thank you very much.

Michael

Daniel Beck

unread,
Nov 19, 2016, 1:31:18 PM11/19/16
to jenkins...@googlegroups.com

> On 19.11.2016, at 18:35, Michael Giroux <mlgi...@gmail.com> wrote:
>
> Is this the correct group to suggest an improvement to the error message? The message should make it clear that the build is being run by the default JRE.

https://wiki.jenkins-ci.org/display/JENKINS/How+to+report+an+issue

Reply all
Reply to author
Forward
0 new messages