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

Java 9 compatibility: Can't start Jenkins

    Details

    • Similar Issues:

      Description

      After update Jenkins (via apt-get update && apt-get upgrade -y)

      Jenkins can't start

      on WWW I have errror:

      
      hudson.util.HudsonFailedToLoad: java.lang.NoClassDefFoundError: Could not initialize class javax.crypto.JceSecurity
      	at hudson.WebAppMain$3.run(WebAppMain.java:241)
      Caused by: java.lang.NoClassDefFoundError: Could not initialize class javax.crypto.JceSecurity
      	at javax.crypto.Mac.getInstance(java.base@9-ea/Mac.java:184)
      	at jenkins.security.HMACConfidentialKey.createMac(HMACConfidentialKey.java:111)
      	at jenkins.security.HMACConfidentialKey.mac(HMACConfidentialKey.java:69)
      	at jenkins.security.HMACConfidentialKey.mac(HMACConfidentialKey.java:85)
      	at jenkins.security.ApiTokenProperty$DescriptorImpl.newInstance(ApiTokenProperty.java:178)
      	at jenkins.security.ApiTokenProperty$DescriptorImpl.newInstance(ApiTokenProperty.java:163)
      	at hudson.model.User.load(User.java:196)
      	at hudson.model.User.<init>(User.java:148)
      	at hudson.model.User.getOrCreate(User.java:456)
      	at hudson.model.User.getById(User.java:527)
      	at hudson.security.HudsonPrivateSecurityRealm.createAccount(HudsonPrivateSecurityRealm.java:398)
      	at jenkins.install.SetupWizard.init(SetupWizard.java:106)
      	at jenkins.install.InstallState$3.initializeState(InstallState.java:105)
      	at jenkins.model.Jenkins.setInstallState(Jenkins.java:970)
      	at jenkins.install.InstallUtil.proceedToNextStateFrom(InstallUtil.java:94)
      	at jenkins.model.Jenkins.<init>(Jenkins.java:887)
      	at hudson.model.Hudson.<init>(Hudson.java:85)
      	at hudson.model.Hudson.<init>(Hudson.java:81)
      	at hudson.WebAppMain$3.run(WebAppMain.java:227)
      

      Log : http://pastebin.com/JLvpF6Jm

        Attachments

          Activity

          Hide
          oleg_nenashev Oleg Nenashev added a comment -

          Forwarding to the core queue (CC Daniel Beck). Likely it's somehow related to BouncyCastle upgrade, but I'm not sure. Also CC Alvaro Lobato

          Show
          oleg_nenashev Oleg Nenashev added a comment - Forwarding to the core queue (CC Daniel Beck ). Likely it's somehow related to BouncyCastle upgrade, but I'm not sure. Also CC Alvaro Lobato
          Hide
          danielbeck Daniel Beck added a comment -

          Uh

          java.base@9-ea

          Is this Java 9? I don't think we particularly care yet…

          Also, if it is, this is a terrible bug report, not mentioning use of a pre-release software platform.

          Show
          danielbeck Daniel Beck added a comment - Uh java.base@9-ea Is this Java 9? I don't think we particularly care yet… Also, if it is, this is a terrible bug report, not mentioning use of a pre-release software platform.
          Hide
          oleg_nenashev Oleg Nenashev added a comment -

          If it's Java 9, we do not support it.
          "EA" means early access

          Show
          oleg_nenashev Oleg Nenashev added a comment - If it's Java 9, we do not support it. "EA" means early access
          Hide
          alobato Alvaro Lobato added a comment - - edited

          Oleg Nenashev Yes it looks like a BC issue, but it may be related to Java 9. I've seen similar errors on Java 8 when putting the bc library on the JDK lib folder which should be done.

          Jarosław Maciejewski Please try Java 8 and post the logs if the problem persists.

          Show
          alobato Alvaro Lobato added a comment - - edited Oleg Nenashev Yes it looks like a BC issue, but it may be related to Java 9. I've seen similar errors on Java 8 when putting the bc library on the JDK lib folder which should be done. Jarosław Maciejewski Please try Java 8 and post the logs if the problem persists.
          Hide
          oleg_nenashev Oleg Nenashev added a comment -

          I am going to create a Java 9 compatibility EPIC

          Show
          oleg_nenashev Oleg Nenashev added a comment - I am going to create a Java 9 compatibility EPIC
          Hide
          markewaite Mark Waite added a comment - - edited

          Adding the

          java --illegal-access=debug --add-modules java.xml.bind -jar jenkins.war
          

          will allow Jenkins 2.60.3 to run with JDK 9 181 on Windows and on Ubuntu Linux 16.04. Freestyle and Matrix jobs run successfully. Pipeline jobs do not.

          Show
          markewaite Mark Waite added a comment - - edited Adding the java --illegal-access=debug --add-modules java.xml.bind -jar jenkins.war will allow Jenkins 2.60.3 to run with JDK 9 181 on Windows and on Ubuntu Linux 16.04. Freestyle and Matrix jobs run successfully. Pipeline jobs do not.
          Hide
          markewaite Mark Waite added a comment - - edited

          I've created a JDK 9 based Docker image for Jenkins LTS and a Docker image for Jenkins LTS with plugins. Those branches capture the additional arguments that are currently needed to run Jenkins with the latest pre-release version of JDK 9.

          I launch my environment from those branches with ./docker_run.py --clean

          Show
          markewaite Mark Waite added a comment - - edited I've created a JDK 9 based Docker image for Jenkins LTS and a Docker image for Jenkins LTS with plugins . Those branches capture the additional arguments that are currently needed to run Jenkins with the latest pre-release version of JDK 9. I launch my environment from those branches with ./docker_run.py --clean

            People

            • Assignee:
              Unassigned
              Reporter:
              nitro2016 Jarosław Maciejewski
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: