• Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Blocker Blocker
    • jdk-tool-plugin
    • Jenkins version 2.121, Jenkins JDK system version : JDK8.

      On the Job level, we configure the Job to use JDK 7 (install automatically), Jenkins system environment is using JDK 8.

      Our application is JDK7 based.

      But when Build, give error 

      "jenkins unsupported major.minor version 52.0"

      When changing it to JDK, the build doesn't complain. But our app is JDk7 based.

      Please fix so we could still Build JDK7 app, on Jenkins version 2.121

          [JENKINS-51242] Jenkins doesn't take configured JDK

          Oleg Nenashev added a comment -

          dnusbaumsorry for the mess. Not sure why I assigned it to myself. Likely clicked on a wrong ticket

          Oleg Nenashev added a comment - dnusbaum sorry for the mess. Not sure why I assigned it to myself. Likely clicked on a wrong ticket

          Devin Nusbaum added a comment -

          softbless What kind of Jenkins job are you seeing this error with (e.g., a FreeStyle Project, a Pipeline, a Maven Project, etc.)? Can you post the full stack trace of the error?

          Devin Nusbaum added a comment - softbless What kind of Jenkins job are you seeing this error with (e.g., a FreeStyle Project, a Pipeline, a Maven Project, etc.)? Can you post the full stack trace of the error?

          hi dnusbaum

          It's a freestyle project.

          below is the console output :

          Started by user admin
          Building in workspace /opt/jenkins/apps/jenkins/jenkins_home/workspace/pkc-lkpp
           > /opt/jenkins/git/bin/git rev-parse --is-inside-work-tree # timeout=10
          Fetching changes from the remote Git repository
           > /opt/jenkins/git/bin/git config remote.origin.url http://code.softbless.com/shine/pkc-lkpp.git # timeout=10
          Fetching upstream changes from http://code.softbless.com/shine/pkc-lkpp.git
           > /opt/jenkins/git/bin/git --version # timeout=10
          using GIT_ASKPASS to set credentials 
           > /opt/jenkins/git/bin/git fetch --tags --progress http://code.softbless.com/shine/pkc-lkpp.git +refs/heads/*:refs/remotes/origin/*
           > /opt/jenkins/git/bin/git rev-parse refs/remotes/origin/master^{commit} # timeout=10
           > /opt/jenkins/git/bin/git rev-parse refs/remotes/origin/origin/master^{commit} # timeout=10
          Checking out Revision 4a7ee3cdcb324c65c40f0b6fc73518e263236090 (refs/remotes/origin/master)
           > /opt/jenkins/git/bin/git config core.sparsecheckout # timeout=10
           > /opt/jenkins/git/bin/git checkout -f 4a7ee3cdcb324c65c40f0b6fc73518e263236090
          Commit message: "Show Latar Belakang View Content only if it's not empty"
           > /opt/jenkins/git/bin/git rev-list --no-walk 4a7ee3cdcb324c65c40f0b6fc73518e263236090 # timeout=10
          [pkc-lkpp] $ /opt/jenkins/apps/jenkins/jenkins_home/tools/hudson.tasks.Ant_AntInstallation/ant1.10.3/bin/ant -file liferay-plugins-sdk-6.2 clean
          Exception in thread "main" java.lang.UnsupportedClassVersionError: org/apache/tools/ant/launch/Launcher : Unsupported major.minor version 52.0
          	at java.lang.ClassLoader.defineClass1(Native Method)
          	at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
          	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
          	at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
          	at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
          	at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
          	at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
          	at java.security.AccessController.doPrivileged(Native Method)
          	at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
          	at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
          	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
          	at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
          	at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:482)
          Build step 'Invoke Ant' marked build as failure
          Finished: FAILURE
          

          Softbless Solutions added a comment - hi dnusbaum It's a freestyle project. below is the console output : Started by user admin Building in workspace /opt/jenkins/apps/jenkins/jenkins_home/workspace/pkc-lkpp > /opt/jenkins/git/bin/git rev-parse --is-inside-work-tree # timeout=10 Fetching changes from the remote Git repository > /opt/jenkins/git/bin/git config remote.origin.url http: //code.softbless.com/shine/pkc-lkpp.git # timeout=10 Fetching upstream changes from http: //code.softbless.com/shine/pkc-lkpp.git > /opt/jenkins/git/bin/git --version # timeout=10 using GIT_ASKPASS to set credentials > /opt/jenkins/git/bin/git fetch --tags --progress http: //code.softbless.com/shine/pkc-lkpp.git +refs/heads/*:refs/remotes/origin/* > /opt/jenkins/git/bin/git rev-parse refs/remotes/origin/master^{commit} # timeout=10 > /opt/jenkins/git/bin/git rev-parse refs/remotes/origin/origin/master^{commit} # timeout=10 Checking out Revision 4a7ee3cdcb324c65c40f0b6fc73518e263236090 (refs/remotes/origin/master) > /opt/jenkins/git/bin/git config core.sparsecheckout # timeout=10 > /opt/jenkins/git/bin/git checkout -f 4a7ee3cdcb324c65c40f0b6fc73518e263236090 Commit message: "Show Latar Belakang View Content only if it's not empty" > /opt/jenkins/git/bin/git rev-list --no-walk 4a7ee3cdcb324c65c40f0b6fc73518e263236090 # timeout=10 [pkc-lkpp] $ /opt/jenkins/apps/jenkins/jenkins_home/tools/hudson.tasks.Ant_AntInstallation/ant1.10.3/bin/ant -file liferay-plugins-sdk-6.2 clean Exception in thread "main" java.lang.UnsupportedClassVersionError: org/apache/tools/ant/launch/Launcher : Unsupported major.minor version 52.0 at java.lang. ClassLoader .defineClass1(Native Method) at java.lang. ClassLoader .defineClass( ClassLoader .java:800) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) at java.net.URLClassLoader.defineClass(URLClassLoader.java:449) at java.net.URLClassLoader.access$100(URLClassLoader.java:71) at java.net.URLClassLoader$1.run(URLClassLoader.java:361) at java.net.URLClassLoader$1.run(URLClassLoader.java:355) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:354) at java.lang. ClassLoader .loadClass( ClassLoader .java:425) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) at java.lang. ClassLoader .loadClass( ClassLoader .java:358) at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:482) Build step 'Invoke Ant' marked build as failure Finished: FAILURE

          Devin Nusbaum added a comment - - edited

          I think this error is coming from Ant. I'm not sure how ant decides which version of Java to use at runtime, maybe JAVA_HOME points to the wrong version of Java on one of your build agents?

          Maybe caused by the ant update in https://github.com/jenkinsci/jenkins/commit/24a1852fc2c9a74c59a25c3e0ed022e315894344 in Jenkins 2.105? What version of Jenkins were you using previously?

          Devin Nusbaum added a comment - - edited I think this error is coming from Ant. I'm not sure how ant decides which version of Java to use at runtime, maybe JAVA_HOME points to the wrong version of Java on one of your build agents? Maybe caused by the ant update in https://github.com/jenkinsci/jenkins/commit/24a1852fc2c9a74c59a25c3e0ed022e315894344 in Jenkins 2.105? What version of Jenkins were you using previously?

          uday reddy added a comment -

          Hi

          i am using the jenkins in 2.23 version , working fine, but when i upgraded to latest jenkins 2.121 version i am facing issue with java7 projects.

          scenario happened

          actually, there was a suggestion to upgrade the plugin upgrades from the manage jenkins, so its asked me to restart, when i restarted the jenkins, plugins got updated but most of the jenkins data is not compatible with older jenkins, so we  upgraded to latest version of jenkins 2.121 , when we upgraded, master jenkins running on java8  and even it expecting slave machine to run on java8 forcefully,

           

          when i configuring the jenkins profile with java7 its throwing the same error.

          first error

           

          Second error

           

           

          uday reddy added a comment - Hi i am using the jenkins in 2.23 version , working fine, but when i upgraded to latest jenkins 2.121 version i am facing issue with java7 projects. scenario happened actually, there was a suggestion to upgrade the plugin upgrades from the manage jenkins, so its asked me to restart, when i restarted the jenkins, plugins got updated but most of the jenkins data is not compatible with older jenkins, so we  upgraded to latest version of jenkins 2.121 , when we upgraded, master jenkins running on java8  and even it expecting slave machine to run on java8 forcefully,   when i configuring the jenkins profile with java7 its throwing the same error. first error   Second error    

          Devin Nusbaum added a comment -

          we  upgraded to latest version of jenkins 2.121 , when we upgraded, master jenkins running on java8  and even it expecting slave machine to run on java8 forcefully,

          Jenkins 2.60 and newer requires Java 8 to run Jenkins itself, and 2.75 and newer requires Java 8 for agent machines as well. Are your agent machines running Java 8?

          Devin Nusbaum added a comment - we  upgraded to latest version of jenkins 2.121 , when we upgraded, master jenkins running on java8  and even it expecting slave machine to run on java8 forcefully, Jenkins 2.60 and newer requires Java 8 to run Jenkins itself, and 2.75 and newer requires Java 8 for agent machines as well. Are your agent machines running Java 8?

          uday reddy added a comment - - edited

          yes, slave machine are forcefully running on java8,  i tried to launch slave machines with java7 but master expecting to run slave machine  on java 8 only.

          slave machines are not supporting to java7

           

          while running java7 Projects, it failing to execute the java7 commands

          uday reddy added a comment - - edited yes, slave machine are forcefully running on java8,  i tried to launch slave machines with java7 but master expecting to run slave machine  on java 8 only. slave machines are not supporting to java7   while running java7 Projects, it failing to execute the java7 commands

          looks like the problems seems to be also with agent.jar and slave.jar 

          when mvn tries to run with these jars it fails.
          Established TCP socket on 33600
          Copied maven32-agent.jar
          Copied maven32-interceptor.jar
          Copied maven3-interceptor-commons.jar
          [jdk7 job] $ /data/jenkins_node/tools/hudson.model.JDK/jdk7/bin/java -cp /data/jenkins_node/maven32-agent.jar:/data/jenkins_node/tools/hudson.tasks.Maven_MavenInstallation/Maven_3.2.2/boot/plexus-classworlds-2.5.1.jar:/data/jenkins_node/tools/hudson.tasks.Maven_MavenInstallation/Maven_3.2.2/conf/logging jenkins.maven3.agent.Maven32Main /data/jenkins_node/tools/hudson.tasks.Maven_MavenInstallation/Maven_3.2.2 /data/jenkins_node/slave.jar /data/jenkins_node/maven32-interceptor.jar /data/jenkins_node/maven3-interceptor-commons.jar 33600
          Exception in thread "main" java.lang.UnsupportedClassVersionError: hudson/remoting/Launcher : Unsupported major.minor version 52.0
          at java.lang.ClassLoader.defineClass1(Native Method)
          at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
          at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
          at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
          at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
          at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
          at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
          at java.security.AccessController.doPrivileged(Native Method)
          at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
          at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClassFromSelf(ClassRealm.java:389)
          at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:42)
          at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:259)
          at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:235)
          at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:227)
          at jenkins.maven3.agent.Maven32Main.main(Maven32Main.java:143)
          at jenkins.maven3.agent.Maven32Main.main(Maven32Main.java:74)
          ERROR: Failed to parse POMs
          java.io.EOFException: unexpected stream termination
          at hudson.remoting.ChannelBuilder.negotiate(ChannelBuilder.java:411)
          at hudson.remoting.ChannelBuilder.build(ChannelBuilder.java:356)
          at hudson.slaves.Channels.forProcess(Channels.java:115)
          at hudson.maven.AbstractMavenProcessFactory.newProcess(AbstractMavenProcessFactory.java:294)
          at hudson.maven.ProcessCache.get(ProcessCache.java:236)
          at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:804)
          at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:504)
          at hudson.model.Run.execute(Run.java:1815)
          at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:543)
          at hudson.model.ResourceController.execute(ResourceController.java:97)
          at hudson.model.Executor.run(Executor.java:429)
          Finished: FAILURE

           

          [root@jenkins1 jenkins_node]# ./exec.sh agent.jar

          Exception in thread "main" java.lang.UnsupportedClassVersionError: hudson/remoting/Launcher : Unsupported major.minor version 52.0

          at java.lang.ClassLoader.defineClass1(Native Method)

          at java.lang.ClassLoader.defineClass(ClassLoader.java:800)

          at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)

          at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)

          at java.net.URLClassLoader.access$100(URLClassLoader.java:71)

          at java.net.URLClassLoader$1.run(URLClassLoader.java:361)

          at java.net.URLClassLoader$1.run(URLClassLoader.java:355)

          at java.security.AccessController.doPrivileged(Native Method)

          at java.net.URLClassLoader.findClass(URLClassLoader.java:354)

          at java.lang.ClassLoader.loadClass(ClassLoader.java:425)

          at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)

          at java.lang.ClassLoader.loadClass(ClassLoader.java:358)

          at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:482)

          [root@jenkins1 jenkins_node]# ./exec.sh slave.jar

          Exception in thread "main" java.lang.UnsupportedClassVersionError: hudson/remoting/Launcher : Unsupported major.minor version 52.0

          at java.lang.ClassLoader.defineClass1(Native Method)

          at java.lang.ClassLoader.defineClass(ClassLoader.java:800)

          at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)

          at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)

          at java.net.URLClassLoader.access$100(URLClassLoader.java:71)

          at java.net.URLClassLoader$1.run(URLClassLoader.java:361)

          at java.net.URLClassLoader$1.run(URLClassLoader.java:355)

          at java.security.AccessController.doPrivileged(Native Method)

          at java.net.URLClassLoader.findClass(URLClassLoader.java:354)

          at java.lang.ClassLoader.loadClass(ClassLoader.java:425)

          at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)

          at java.lang.ClassLoader.loadClass(ClassLoader.java:358)

          at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:482)

          Luiz Goncalves added a comment - looks like the problems seems to be also with agent.jar and slave.jar  when mvn tries to run with these jars it fails. Established TCP socket on 33600 Copied maven32-agent.jar Copied maven32-interceptor.jar Copied maven3-interceptor-commons.jar [jdk7 job] $ /data/jenkins_node/tools/hudson.model.JDK/jdk7/bin/java -cp /data/jenkins_node/maven32-agent.jar:/data/jenkins_node/tools/hudson.tasks.Maven_MavenInstallation/Maven_3.2.2/boot/plexus-classworlds-2.5.1.jar:/data/jenkins_node/tools/hudson.tasks.Maven_MavenInstallation/Maven_3.2.2/conf/logging jenkins.maven3.agent.Maven32Main /data/jenkins_node/tools/hudson.tasks.Maven_MavenInstallation/Maven_3.2.2 /data/jenkins_node/slave.jar /data/jenkins_node/maven32-interceptor.jar /data/jenkins_node/maven3-interceptor-commons.jar 33600 Exception in thread "main" java.lang.UnsupportedClassVersionError: hudson/remoting/Launcher : Unsupported major.minor version 52.0 at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:800) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) at java.net.URLClassLoader.defineClass(URLClassLoader.java:449) at java.net.URLClassLoader.access$100(URLClassLoader.java:71) at java.net.URLClassLoader$1.run(URLClassLoader.java:361) at java.net.URLClassLoader$1.run(URLClassLoader.java:355) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:354) at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClassFromSelf(ClassRealm.java:389) at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:42) at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:259) at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:235) at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:227) at jenkins.maven3.agent.Maven32Main.main(Maven32Main.java:143) at jenkins.maven3.agent.Maven32Main.main(Maven32Main.java:74) ERROR: Failed to parse POMs java.io.EOFException: unexpected stream termination at hudson.remoting.ChannelBuilder.negotiate(ChannelBuilder.java:411) at hudson.remoting.ChannelBuilder.build(ChannelBuilder.java:356) at hudson.slaves.Channels.forProcess(Channels.java:115) at hudson.maven.AbstractMavenProcessFactory.newProcess(AbstractMavenProcessFactory.java:294) at hudson.maven.ProcessCache.get(ProcessCache.java:236) at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:804) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:504) at hudson.model.Run.execute(Run.java:1815) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:543) at hudson.model.ResourceController.execute(ResourceController.java:97) at hudson.model.Executor.run(Executor.java:429) Finished: FAILURE   [root@jenkins1 jenkins_node] # ./exec.sh agent.jar Exception in thread "main" java.lang.UnsupportedClassVersionError: hudson/remoting/Launcher : Unsupported major.minor version 52.0 at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:800) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) at java.net.URLClassLoader.defineClass(URLClassLoader.java:449) at java.net.URLClassLoader.access$100(URLClassLoader.java:71) at java.net.URLClassLoader$1.run(URLClassLoader.java:361) at java.net.URLClassLoader$1.run(URLClassLoader.java:355) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:354) at java.lang.ClassLoader.loadClass(ClassLoader.java:425) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) at java.lang.ClassLoader.loadClass(ClassLoader.java:358) at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:482) [root@jenkins1 jenkins_node] # ./exec.sh slave.jar Exception in thread "main" java.lang.UnsupportedClassVersionError: hudson/remoting/Launcher : Unsupported major.minor version 52.0 at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:800) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) at java.net.URLClassLoader.defineClass(URLClassLoader.java:449) at java.net.URLClassLoader.access$100(URLClassLoader.java:71) at java.net.URLClassLoader$1.run(URLClassLoader.java:361) at java.net.URLClassLoader$1.run(URLClassLoader.java:355) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:354) at java.lang.ClassLoader.loadClass(ClassLoader.java:425) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) at java.lang.ClassLoader.loadClass(ClassLoader.java:358) at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:482)

          Mark Waite added a comment -

          Jenkins no longer supports JDK 8. This won't be fixed.

          Mark Waite added a comment - Jenkins no longer supports JDK 8. This won't be fixed.

            dnusbaum Devin Nusbaum
            softbless Softbless Solutions
            Votes:
            2 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: