Jenkins setup: 2.504.2
Hello Community,
We recently upgraded our Jenkins instance from 2.462.1 to 2.504. Below are the configuration of Jenkins controller and agent.
Java version used on both - Java 17 (java-17-openjdk-17.0.15.0.6-2.el8.x86_64)
Apache Maven version - 3.6.3, 3.8.6, 3.9.9
Controller and Agent is connected via remoting.jar utility
Our development uses different versions of JDK including 8,11,17 and 21.
Testing:
- Using JDK 11 –
I tested one of my smoke test which uses a Maven Project on Jenkins using JDK 11 and it encounter an issue related with Java incompatibility issue.
Exception in thread “main” java.lang.UnsupportedClassVersionError: hudson/remoting/Launcher has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 55.0 - I tested the same smoke test using Freestyle job with JDK11 and the build is successful as well.
- using JDK 17 and JDK 21
There are no any issues while using the JDK 17 and 21 for application build.
Questions:
- Is there any workaround or solution for the presenting issues on Testing #1 ?
- Is this a known issue with the current version of Jenkins? Is it a must condition to build the project with Java 17 or higher? I do not see any documentation stating that so far. Any links to blog or documentation will help.
- Is this only applicable to the projects that are Maven project ? Does it apply to the Freestyle and Multibranch project as well ?
Any suggestions to this is greatly appreciated.
Thanks,
Bipin G.