Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-43495

Debian packages depend on Java 7 even though Jenkins requires Java 8

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • packaging
    • None

      Jenkins 2.54 started requiring Java 8 [1], but the 2.54 package in the Jenkins-provided Debian package repository [2] still depends on openjdk-7-jre-headless. This means that on distros that do not provide Java 8 the package will successfully update but fail to start.

      [1] https://jenkins.io/blog/2017/04/10/jenkins-has-upgraded-to-java-8/
      [2] https://pkg.jenkins.io/debian

        1. jenkins.err.log
          5.18 MB
          Dave Miller
        2. jenkins.wrapper.log
          160 kB
          Dave Miller

          [JENKINS-43495] Debian packages depend on Java 7 even though Jenkins requires Java 8

          nervo nervo added a comment -

          Fyi, i have succeed in running jenkins 2.54 on debian jessie by using openjdk-8-jre-headless from backports, and update-alternatives to config java 8.

          But this is clearly not a clean situation

          nervo nervo added a comment - Fyi, i have succeed in running jenkins 2.54 on debian jessie by using openjdk-8-jre-headless from backports, and update-alternatives to config java 8. But this is clearly not a clean situation

          Sascha Szott added a comment - - edited

          In case you are trying to start Jenkins 2.54 with OpenJDK 7 the Jetty servlet container is complaining about an java.lang.UnsupportedClassVersionError

          WARNING: Failed startup of context w.@6cedb374{/,file:/var/cache/jenkins/war/,STARTING}{/var/cache/jenkins/war}
          java.lang.reflect.InvocationTargetException
                  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                  at java.lang.reflect.Method.invoke(Method.java:606)
                  at org.eclipse.jetty.webapp.IterativeDescriptorProcessor.visit(IterativeDescriptorProcessor.java:85)
                  at org.eclipse.jetty.webapp.IterativeDescriptorProcessor.process(IterativeDescriptorProcessor.java:72)
                  at org.eclipse.jetty.webapp.MetaData.resolve(MetaData.java:408)
                  at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1340)
                  at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:741)
                  at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:505)
                  at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
                  at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132)
                  at org.eclipse.jetty.server.Server.start(Server.java:387)
                  at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114)
                  at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61)
                  at org.eclipse.jetty.server.Server.doStart(Server.java:354)
                  at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
                  at winstone.Launcher.<init>(Launcher.java:152)
                  at winstone.Launcher.main(Launcher.java:352)
                  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                  at java.lang.reflect.Method.invoke(Method.java:606)
                  at Main._main(Main.java:264)
                  at Main.main(Main.java:112)
          Caused by: java.lang.UnsupportedClassVersionError: jenkins/util/SystemProperties : Unsupported major.minor version 52.0
                  at java.lang.ClassLoader.defineClass1(Native Method)
                  at java.lang.ClassLoader.defineClass(ClassLoader.java:803)
                  at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
                  at java.net.URLClassLoader.defineClass(URLClassLoader.java:442)
                  at java.net.URLClassLoader.access$100(URLClassLoader.java:64)
                  at java.net.URLClassLoader$1.run(URLClassLoader.java:354)
                  at java.net.URLClassLoader$1.run(URLClassLoader.java:348)
                  at java.security.AccessController.doPrivileged(Native Method)
                  at java.net.URLClassLoader.findClass(URLClassLoader.java:347)
                  at org.eclipse.jetty.webapp.WebAppClassLoader.findClass(WebAppClassLoader.java:510)
                  at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:441)
                  at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:403)
                  at org.eclipse.jetty.server.handler.ContextHandler.loadClass(ContextHandler.java:1583)
                  at org.eclipse.jetty.webapp.StandardDescriptorProcessor.visitListener(StandardDescriptorProcessor.java:1956)
                  ... 25 more
          

           

          Sascha Szott added a comment - - edited In case you are trying to start Jenkins 2.54 with OpenJDK 7 the Jetty servlet container is complaining about an  java.lang.UnsupportedClassVersionError WARNING: Failed startup of context w.@6cedb374{/,file:/var/cache/jenkins/war/,STARTING}{/var/cache/jenkins/war} java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.eclipse.jetty.webapp.IterativeDescriptorProcessor.visit(IterativeDescriptorProcessor.java:85) at org.eclipse.jetty.webapp.IterativeDescriptorProcessor.process(IterativeDescriptorProcessor.java:72) at org.eclipse.jetty.webapp.MetaData.resolve(MetaData.java:408) at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1340) at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:741) at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:505) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68) at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132) at org.eclipse.jetty.server.Server.start(Server.java:387) at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114) at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61) at org.eclipse.jetty.server.Server.doStart(Server.java:354) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68) at winstone.Launcher.<init>(Launcher.java:152) at winstone.Launcher.main(Launcher.java:352) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at Main._main(Main.java:264) at Main.main(Main.java:112) Caused by: java.lang.UnsupportedClassVersionError: jenkins/util/SystemProperties : Unsupported major.minor version 52.0 at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:803) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) at java.net.URLClassLoader.defineClass(URLClassLoader.java:442) at java.net.URLClassLoader.access$100(URLClassLoader.java:64) at java.net.URLClassLoader$1.run(URLClassLoader.java:354) at java.net.URLClassLoader$1.run(URLClassLoader.java:348) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:347) at org.eclipse.jetty.webapp.WebAppClassLoader.findClass(WebAppClassLoader.java:510) at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:441) at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:403) at org.eclipse.jetty.server.handler.ContextHandler.loadClass(ContextHandler.java:1583) at org.eclipse.jetty.webapp.StandardDescriptorProcessor.visitListener(StandardDescriptorProcessor.java:1956) ... 25 more  

          Sascha Szott added a comment - - edited

          the Depends section in the deb package's control file should be updated to

          Depends: daemon, adduser, procps, psmisc, net-tools, default-jre-headless (>= 2:1.8) | java8-runtime-headless
          

          Sascha Szott added a comment - - edited the Depends section in the deb package's control file should be updated to Depends: daemon, adduser, procps, psmisc, net-tools, default-jre-headless (>= 2:1.8) | java8-runtime-headless

          Unassigning to let anyone work on it if she/he can do that more diligently than me.

          Repository is https://github.com/jenkinsci/packaging FWIW (I had a quick look yesterday, and many packagings need updating, not only debian).

          Baptiste Mathus added a comment - Unassigning to let anyone work on it if she/he can do that more diligently than me. Repository is https://github.com/jenkinsci/packaging FWIW (I had a quick look yesterday, and many packagings need updating, not only debian).

          Oleg Nenashev added a comment -

          Oleg Nenashev added a comment - https://github.com/jenkinsci/packaging/pull/95

          T Herzke added a comment - - edited

          Could you please unpublish the 2.54 release from the debian repository until this is resolved?

          To not let more people run into this problem unnecessarily.

          T Herzke added a comment - - edited Could you please unpublish the 2.54 release from the debian repository until this is resolved? To not let more people run into this problem unnecessarily.

          Oleg Nenashev added a comment -

          CC rtyler. The plan is to have a new release on Sunday anyway

          Oleg Nenashev added a comment - CC rtyler . The plan is to have a new release on Sunday anyway

          Code changed in jenkins
          User: Oleg Nenashev
          Path:
          deb/build/debian/control
          http://jenkins-ci.org/commit/packaging/70ac244a0f102365fdc60bba0eae429fc4be8eca
          Log:
          JENKINS-43495 - Updated Java dependency to Java 8

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: deb/build/debian/control http://jenkins-ci.org/commit/packaging/70ac244a0f102365fdc60bba0eae429fc4be8eca Log: JENKINS-43495 - Updated Java dependency to Java 8

          Code changed in jenkins
          User: Sam Van Oort
          Path:
          deb/build/debian/control
          http://jenkins-ci.org/commit/packaging/38cd5d982737a91d92125b377e32babd9d713d8f
          Log:
          Merge pull request #95 from oleg-nenashev/JENKINS-43495

          JENKINS-43495 - Updated Java dependency to Java 8

          Compare: https://github.com/jenkinsci/packaging/compare/eb7579d4d394...38cd5d982737

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Sam Van Oort Path: deb/build/debian/control http://jenkins-ci.org/commit/packaging/38cd5d982737a91d92125b377e32babd9d713d8f Log: Merge pull request #95 from oleg-nenashev/ JENKINS-43495 JENKINS-43495 - Updated Java dependency to Java 8 Compare: https://github.com/jenkinsci/packaging/compare/eb7579d4d394...38cd5d982737

          T Herzke added a comment -

          sftp pkg.jenkins-ci.org

          rm jenkins_2.54_all.deb

          would be a matter of minutes.

          More people updating jenkins on debian between now and sunday, scratching their heads, wondering what broke their jenkins, means a lot more wasted time.

           

          T Herzke added a comment - sftp pkg.jenkins-ci.org rm jenkins_2.54_all.deb would be a matter of minutes. More people updating jenkins on debian between now and sunday, scratching their heads, wondering what broke their jenkins, means a lot more wasted time.  

          Simon Walker added a comment -

          Also note that package managers will likely update to 2.54, because they know they can't go any further due to the dependency change, potentially leaving more systems broken even after a new version is released.

          Simon Walker added a comment - Also note that package managers will likely update to 2.54, because they know they can't go any further due to the dependency change, potentially leaving more systems broken even after a new version is released.

          Oleg Nenashev added a comment -

          I have verified the fix in 2.55 package, it requires Java 8 now.
          Regarding the 2.54 package, I suggest creating an INFRA ticket if you want it to be depublished.

          Oleg Nenashev added a comment - I have verified the fix in 2.55 package, it requires Java 8 now. Regarding the 2.54 package, I suggest creating an INFRA ticket if you want it to be depublished.

          Dave Miller added a comment -

          When I try to install the new version 2.55, I get the same 503 "Service Unavailable" error that I received when trying to install version 2.54.  The server where Jenkins is installed has Java 8 on it.  I have to revert back to 2.53 to get Jenkins to work.  Am I missing something here?

          Dave Miller added a comment - When I try to install the new version 2.55, I get the same 503 "Service Unavailable" error that I received when trying to install version 2.54.  The server where Jenkins is installed has Java 8 on it.  I have to revert back to 2.53 to get Jenkins to work.  Am I missing something here?

          Oleg Nenashev added a comment -

          millda4 Please provide Jenkins system logs with info about startup. If there is no logs, Jenkins likely does not get started at all. In such case it would be great if you run the service start script with "-ex" in order to get a startup trace.

          Oleg Nenashev added a comment - millda4 Please provide Jenkins system logs with info about startup. If there is no logs, Jenkins likely does not get started at all. In such case it would be great if you run the service start script with "-ex" in order to get a startup trace.

          Oleg Nenashev added a comment -

          millda4 You provided Windows logs to the issue reported to Debian packaging... Maybe you want to comment in JENKINS-43499, which is still open

          Oleg Nenashev added a comment - millda4 You provided Windows logs to the issue reported to Debian packaging... Maybe you want to comment in JENKINS-43499 , which is still open

          Dave Miller added a comment -

          I have attached the jenkins.wrapper.log and jenkins.err.log files.  Jenkins was installed by somebody else who is no longer with our company, so I "inherited" the setup.  It was installed as a service that gets automatically started every time that server is rebooted.  I know that server does have Java 8 on it.

           

          C:\>java -version
          java version "1.8.0_74"
          Java(TM) SE Runtime Environment (build 1.8.0_74-b02)
          Java HotSpot(TM) 64-Bit Server VM (build 25.74-b02, mixed mode)

           

          If different logs are needed, please let me know.

          Dave Miller added a comment - I have attached the jenkins.wrapper.log and jenkins.err.log files.  Jenkins was installed by somebody else who is no longer with our company, so I "inherited" the setup.  It was installed as a service that gets automatically started every time that server is rebooted.  I know that server does have Java 8 on it.   C:\>java -version java version "1.8.0_74" Java(TM) SE Runtime Environment (build 1.8.0_74-b02) Java HotSpot(TM) 64-Bit Server VM (build 25.74-b02, mixed mode)   If different logs are needed, please let me know.

          Oleg Nenashev added a comment -

          millda4, Please continue the discussion in the Ticket for Windows and provide the info you have there. You definitely have wrong Java version on the master: "Caused by: java.lang.UnsupportedClassVersionError: jenkins/util/SystemProperties : Unsupported major.minor version 52.0" in your log.

          Oleg Nenashev added a comment - millda4 , Please continue the discussion in the Ticket for Windows and provide the info you have there. You definitely have wrong Java version on the master: "Caused by: java.lang.UnsupportedClassVersionError: jenkins/util/SystemProperties : Unsupported major.minor version 52.0" in your log.

          Dave Miller added a comment -

          Please excuse the dumb question, but what and where is the "Ticket for Windows"?  I don't post messages here very often, so I don't know my way around.  Is it a separate forum?

          Dave Miller added a comment - Please excuse the dumb question, but what and where is the "Ticket for Windows"?  I don't post messages here very often, so I don't know my way around.  Is it a separate forum?

          Oleg Nenashev added a comment -

          I have referenced JENKINS-43499 above.

          This site is not a forum, it is a bugtracker. And this particular bug is for Debian, not for Windows.

          Oleg Nenashev added a comment - I have referenced JENKINS-43499 above. This site is not a forum, it is a bugtracker. And this particular bug is for Debian, not for Windows.

          Jeroen Bogers added a comment - - edited

          Please remove Jenkins 2.54 from apt/pkg.jenkins-ci.org. All Ubuntu 14.04 users will run into this issue as there is no Java 8 available for 14.04 by default so this will be the version these users will be stuck on (unless they install Java 8 via the proper PPA). They will be wondering why Jenkins is broken and why apt is refusing to update.

          See also JENKINS-43629

          Jeroen Bogers added a comment - - edited Please remove Jenkins 2.54 from apt/pkg.jenkins-ci.org. All Ubuntu 14.04 users will run into this issue as there is no Java 8 available for 14.04 by default so this will be the version these users will be stuck on (unless they install Java 8 via the proper PPA). They will be wondering why Jenkins is broken and why apt is refusing to update. See also JENKINS-43629

          Oleg Nenashev added a comment -

          jbogers As I have written above, you should create an INFRA ticket for it. This issue is not "just delete it", so it requires involvement of the INFRA team

          Oleg Nenashev added a comment - jbogers As I have written above, you should create an INFRA ticket for it. This issue is not "just delete it", so it requires involvement of the INFRA team

          Jeroen Bogers added a comment -

          Created INFRA-1167 to handle the removal.

          Jeroen Bogers added a comment - Created INFRA-1167 to handle the removal.

          Oleg Nenashev added a comment -

          Thanks!

          Oleg Nenashev added a comment - Thanks!

          Code changed in jenkins
          User: Sam Van Oort
          Path:
          deb/build/debian/control
          http://jenkins-ci.org/commit/packaging/887711072814b0033e490d7cda031ef64ba87c94
          Log:
          Revert "JENKINS-43495 - Updated Java dependency to Java 8"

          This reverts commit 70ac244a0f102365fdc60bba0eae429fc4be8eca.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Sam Van Oort Path: deb/build/debian/control http://jenkins-ci.org/commit/packaging/887711072814b0033e490d7cda031ef64ba87c94 Log: Revert " JENKINS-43495 - Updated Java dependency to Java 8" This reverts commit 70ac244a0f102365fdc60bba0eae429fc4be8eca.

          Kevin Lyda added a comment -

          Just in case millda4 is a former coworker dealing with a machine I installed, the solution is as follows on an Ubuntu 14.04 machine (all as root):

           

          add-apt-repository ppa:openjdk-r/ppa
          apt-get update
          apt-get install openjdk-8-jre openjdk-8-jre-headless openjdk-8-jdk
          apt-get remove --purge openjdk-7-jre openjdk-7-jre-headless openjdk-7-jdk
          apt-get dist-upgrade
          

          And that should update jenkins to the latest released version.

           

          Kevin Lyda added a comment - Just in case millda4 is a former coworker dealing with a machine I installed, the solution is as follows on an Ubuntu 14.04 machine (all as root):   add-apt-repository ppa:openjdk-r/ppa apt-get update apt-get install openjdk-8-jre openjdk-8-jre-headless openjdk-8-jdk apt-get remove --purge openjdk-7-jre openjdk-7-jre-headless openjdk-7-jdk apt-get dist-upgrade And that should update jenkins to the latest released version.  

            oleg_nenashev Oleg Nenashev
            mkarlsson Marcus Karlsson
            Votes:
            6 Vote for this issue
            Watchers:
            13 Start watching this issue

              Created:
              Updated:
              Resolved: