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

NoClassDefFoundError "hudson/tools/JDKInstaller$FileSystem" at SSHLauncher after Jenkins Update 2.111->2.112

    • Icon: Bug Bug
    • Resolution: Not A Defect
    • Icon: Critical Critical
    • core
    • None

      During restart when upgrading Jenkins (core) from 2.111 => 2.112

      2018-03-20 07:50:39 WARNING [hudson.ExtensionFinder$GuiceFinder$FaultTolerantScope$1 error]   Failed to instantiate Key[type=hudson.plugins.sshslaves.SSHLauncher$DescriptorImpl, an
      notation=[none]]; skipping this component
      com.google.inject.ProvisionException: Unable to provision, see the following errors:
      
      1) Error injecting constructor, java.lang.NoClassDefFoundError: hudson/tools/JDKInstaller$FileSystem
        at hudson.plugins.sshslaves.SSHLauncher$DescriptorImpl.<init>(SSHLauncher.java:1617)
      
      1 error
              at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:52)
              at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:145)
              at hudson.ExtensionFinder$GuiceFinder$FaultTolerantScope$1.get(ExtensionFinder.java:424)
              at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:41)
              at com.google.inject.internal.InjectorImpl$2$1.call(InjectorImpl.java:1016)
              at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1092)
              at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1012)
              at hudson.ExtensionFinder$GuiceFinder._find(ExtensionFinder.java:386)
              at hudson.ExtensionFinder$GuiceFinder.find(ExtensionFinder.java:377)
              at hudson.ClassicPluginStrategy.findComponents(ClassicPluginStrategy.java:482)
              at hudson.ExtensionList.load(ExtensionList.java:366)
              at hudson.ExtensionList.ensureLoaded(ExtensionList.java:304)
              at hudson.ExtensionList.getComponents(ExtensionList.java:169)
              at hudson.DescriptorExtensionList.load(DescriptorExtensionList.java:192)
              at hudson.ExtensionList.ensureLoaded(ExtensionList.java:304)
              at hudson.ExtensionList.iterator(ExtensionList.java:158)
              at org.jenkinsci.plugins.xunit.AliasInitializer.addAliases(AliasInitializer.java:47)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:498)
              at hudson.init.TaskMethodFinder.invoke(TaskMethodFinder.java:104)
              at hudson.init.TaskMethodFinder$TaskImpl.run(TaskMethodFinder.java:175)
              at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:296)
              at jenkins.model.Jenkins$5.runTask(Jenkins.java:1064)
              at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:214)
              at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
              at java.lang.Thread.run(Thread.java:748)
      Caused by: java.lang.NoClassDefFoundError: hudson/tools/JDKInstaller$FileSystem
              at java.lang.Class.getDeclaredMethods0(Native Method)
              at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
              at java.lang.Class.privateGetMethodRecursive(Class.java:3048)
              at java.lang.Class.getMethod0(Class.java:3018)
              at java.lang.Class.getMethod(Class.java:1784)
              at hudson.model.Descriptor.<init>(Descriptor.java:289)
              at hudson.plugins.sshslaves.SSHLauncher$DescriptorImpl.<init>(SSHLauncher.java:1617)
              at hudson.plugins.sshslaves.SSHLauncher$DescriptorImpl$$FastClassByGuice$$7821d6d6.newInstance(<generated>)
              at com.google.inject.internal.cglib.reflect.$FastConstructor.newInstance(FastConstructor.java:40)
              at com.google.inject.internal.DefaultConstructionProxyFactory$1.newInstance(DefaultConstructionProxyFactory.java:61)
              at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:105)
              at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:85)
              at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:267)
              at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
              at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1103)
              at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
              ... 29 more
      Caused by: java.lang.ClassNotFoundException: hudson.tools.JDKInstaller$FileSystem
              at jenkins.util.AntClassLoader.findClassInComponents(AntClassLoader.java:1374)
              at jenkins.util.AntClassLoader.findClass(AntClassLoader.java:1327)
              at jenkins.util.AntClassLoader.loadClass(AntClassLoader.java:1080)
              at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
              ... 45 more
      
      2018-03-20 07:50:39 WARNING [hudson.ExtensionFinder$GuiceFinder$FaultTolerantScope$1 error]   Failed to instantiate Key[type=hudson.os.windows.ManagedWindowsServiceLauncher$DescriptorImpl, annotation=[none]]; skipping this component
      com.google.inject.ProvisionException: Unable to provision, see the following errors:
      
      1) Error injecting constructor, java.lang.NoClassDefFoundError: hudson/tools/JDKInstaller$FileSystem
        at hudson.os.windows.ManagedWindowsServiceLauncher$DescriptorImpl.<init>(ManagedWindowsServiceLauncher.java:540)
      
      1 error
              at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:52)
              at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:145)
              at hudson.ExtensionFinder$GuiceFinder$FaultTolerantScope$1.get(ExtensionFinder.java:424)
              at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:41)
              at com.google.inject.internal.InjectorImpl$2$1.call(InjectorImpl.java:1016)
              at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1092)
              at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1012)
              at hudson.ExtensionFinder$GuiceFinder._find(ExtensionFinder.java:386)
              at hudson.ExtensionFinder$GuiceFinder.find(ExtensionFinder.java:377)
              at hudson.ClassicPluginStrategy.findComponents(ClassicPluginStrategy.java:482)
              at hudson.ExtensionList.load(ExtensionList.java:366)
              at hudson.ExtensionList.ensureLoaded(ExtensionList.java:304)
              at hudson.ExtensionList.getComponents(ExtensionList.java:169)
              at hudson.DescriptorExtensionList.load(DescriptorExtensionList.java:192)
              at hudson.ExtensionList.ensureLoaded(ExtensionList.java:304)
              at hudson.ExtensionList.iterator(ExtensionList.java:158)
              at org.jenkinsci.plugins.xunit.AliasInitializer.addAliases(AliasInitializer.java:47)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:498)
              at hudson.init.TaskMethodFinder.invoke(TaskMethodFinder.java:104)
              at hudson.init.TaskMethodFinder$TaskImpl.run(TaskMethodFinder.java:175)
              at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:296)
              at jenkins.model.Jenkins$5.runTask(Jenkins.java:1064)
              at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:214)
              at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
              at java.lang.Thread.run(Thread.java:748)
      Caused by: java.lang.NoClassDefFoundError: hudson/tools/JDKInstaller$FileSystem
              at java.lang.Class.getDeclaredMethods0(Native Method)
              at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
              at java.lang.Class.privateGetMethodRecursive(Class.java:3048)
              at java.lang.Class.getMethod0(Class.java:3018)
              at java.lang.Class.getMethod(Class.java:1784)
              at hudson.model.Descriptor.<init>(Descriptor.java:289)
              at hudson.os.windows.ManagedWindowsServiceLauncher$DescriptorImpl.<init>(ManagedWindowsServiceLauncher.java:540)
              at hudson.os.windows.ManagedWindowsServiceLauncher$DescriptorImpl$$FastClassByGuice$$39d9fc24.newInstance(<generated>)
              at com.google.inject.internal.cglib.reflect.$FastConstructor.newInstance(FastConstructor.java:40)
              at com.google.inject.internal.DefaultConstructionProxyFactory$1.newInstance(DefaultConstructionProxyFactory.java:61)
              at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:105)
              at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:85)
              at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:267)
              at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
              at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1103)
              at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
              ... 29 more
      Caused by: java.lang.ClassNotFoundException: hudson.tools.JDKInstaller$FileSystem
              at jenkins.util.AntClassLoader.findClassInComponents(AntClassLoader.java:1374)
              at jenkins.util.AntClassLoader.findClass(AntClassLoader.java:1327)
              at jenkins.util.AntClassLoader.loadClass(AntClassLoader.java:1080)
              at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
              ... 45 more
      

          [JENKINS-50272] NoClassDefFoundError "hudson/tools/JDKInstaller$FileSystem" at SSHLauncher after Jenkins Update 2.111->2.112

          Reinhold Füreder created issue -

          Maybe caused by JENKINS-22367?

          Reinhold Füreder added a comment - Maybe caused by JENKINS-22367 ?
          Reinhold Füreder made changes -
          Link New: This issue is related to JENKINS-22367 [ JENKINS-22367 ]

          Reinhold Füreder added a comment - - edited

          Well, the solution was to install the brand-new JDK Tool Plugin, as admittedly at least vaguely mentioned in the change log:

          Install from java.sun.com installation method for JDK tools has been moved to a new JDK Tool Plugin. (issue 22367)

          In my installation I was a bit lucky as this was then done implicitly when updating Jenkins plugins too: due to seemingly new dependency of the only two plugins (cloudbees-folder v6.4, credentials-binding v1.16) that were not up-to-date:

          2018-03-20 08:13:32 INFO [java.util.logging.LogManager$RootLogger log]   Checking 'cloudbees-folder' plugin...
          2018-03-20 08:13:32 INFO [java.util.logging.LogManager$RootLogger log]   Installing update for 'cloudbees-folder:6.3' plugin: 6.4...
          2018-03-20 08:13:32 INFO [hudson.model.UpdateSite$Plugin deploy]   Adding dependent install of jdk-tool for plugin cloudbees-folder
          ...
          2018-03-20 08:13:32 INFO [java.util.logging.LogManager$RootLogger log]   Checking 'credentials-binding' plugin...
          2018-03-20 08:13:32 INFO [java.util.logging.LogManager$RootLogger log]   Installing update for 'credentials-binding:1.15' plugin: 1.16...
          2018-03-20 08:13:32 INFO [hudson.model.UpdateSite$Plugin deploy]   Dependent install of jdk-tool for plugin credentials-binding already added, skipping
          ...
          2018-03-20 08:13:32 INFO [java.util.logging.LogManager$RootLogger log]   ---> Installation of plugins in progress, waiting for completion...
          2018-03-20 08:13:33 INFO [hudson.model.UpdateCenter$DownloadJob run]   Starting the installation of JDK Tool on behalf of SYSTEM
          2018-03-20 08:13:34 INFO [hudson.model.UpdateCenter$UpdateCenterConfiguration download]   Downloading JDK Tool
          2018-03-20 08:13:34 INFO [hudson.model.UpdateCenter$DownloadJob run]   Starting the installation of Folders on behalf of SYSTEM
          2018-03-20 08:13:35 INFO [hudson.model.UpdateCenter$UpdateCenterConfiguration download]   Downloading Folders
          2018-03-20 08:13:36 INFO [hudson.model.UpdateCenter$DownloadJob run]   Starting the installation of Credentials Binding on behalf of SYSTEM
          2018-03-20 08:13:36 INFO [hudson.model.UpdateCenter$UpdateCenterConfiguration download]   Downloading Credentials Binding
          ---> Plugins installed:
                  cloudbees-folder:6.4
                  credentials-binding:1.16
          
          Why did this problem occur?
          • I am always first updating solely Jenkins core (followed by testing the update with some pipelines) and only then (in an explicit second step) update Jenkins plugins (again followed by testing the updates with some pipelines)...
          • So I am not entirely happy due to being surprised by that problem, but I can certainly live with the required fix.

          Reinhold Füreder added a comment - - edited Well, the solution was to install the brand-new JDK Tool Plugin , as admittedly at least vaguely mentioned in the change log: Install from java.sun.com installation method for JDK tools has been moved to a new JDK Tool Plugin. (issue 22367) In my installation I was a bit lucky as this was then done implicitly when updating Jenkins plugins too: due to seemingly new dependency of the only two plugins (cloudbees-folder v6.4, credentials-binding v1.16) that were not up-to-date: 2018-03-20 08:13:32 INFO [java.util.logging.LogManager$RootLogger log] Checking 'cloudbees-folder' plugin... 2018-03-20 08:13:32 INFO [java.util.logging.LogManager$RootLogger log] Installing update for 'cloudbees-folder:6.3' plugin: 6.4... 2018-03-20 08:13:32 INFO [hudson.model.UpdateSite$Plugin deploy] Adding dependent install of jdk-tool for plugin cloudbees-folder ... 2018-03-20 08:13:32 INFO [java.util.logging.LogManager$RootLogger log] Checking 'credentials-binding' plugin... 2018-03-20 08:13:32 INFO [java.util.logging.LogManager$RootLogger log] Installing update for 'credentials-binding:1.15' plugin: 1.16... 2018-03-20 08:13:32 INFO [hudson.model.UpdateSite$Plugin deploy] Dependent install of jdk-tool for plugin credentials-binding already added, skipping ... 2018-03-20 08:13:32 INFO [java.util.logging.LogManager$RootLogger log] ---> Installation of plugins in progress, waiting for completion... 2018-03-20 08:13:33 INFO [hudson.model.UpdateCenter$DownloadJob run] Starting the installation of JDK Tool on behalf of SYSTEM 2018-03-20 08:13:34 INFO [hudson.model.UpdateCenter$UpdateCenterConfiguration download] Downloading JDK Tool 2018-03-20 08:13:34 INFO [hudson.model.UpdateCenter$DownloadJob run] Starting the installation of Folders on behalf of SYSTEM 2018-03-20 08:13:35 INFO [hudson.model.UpdateCenter$UpdateCenterConfiguration download] Downloading Folders 2018-03-20 08:13:36 INFO [hudson.model.UpdateCenter$DownloadJob run] Starting the installation of Credentials Binding on behalf of SYSTEM 2018-03-20 08:13:36 INFO [hudson.model.UpdateCenter$UpdateCenterConfiguration download] Downloading Credentials Binding ---> Plugins installed: cloudbees-folder:6.4 credentials-binding:1.16 Why did this problem occur? I am always first updating solely Jenkins core (followed by testing the update with some pipelines) and only then (in an explicit second step) update Jenkins plugins (again followed by testing the updates with some pipelines)... So I am not entirely happy due to being surprised by that problem, but I can certainly live with the required fix.

          Reinhold Füreder added a comment - - edited

          I dare to resolve with "Won't Fix".

          Is there a good possibility to kind of signal the new need for installing a plugin (due to refactorings) to avoid this error? And of course this problem only hits existing installations...

          Suggestion for a poor man's attempt to avoid this error based on change log (https://jenkins.io/changelog/ for 2.112): Explicitly list all plugins that depend on the this JDK Tool plugin and that newly require the installation of JDK Tool plugin. Oh! Or is the Jenkins core depending on it already?

          Reinhold Füreder added a comment - - edited I dare to resolve with "Won't Fix". Is there a good possibility to kind of signal the new need for installing a plugin (due to refactorings) to avoid this error? And of course this problem only hits existing installations... Suggestion for a poor man's attempt to avoid this error based on change log ( https://jenkins.io/changelog/ for 2.112): Explicitly list all plugins that depend on the this JDK Tool plugin and that newly require the installation of JDK Tool plugin. Oh! Or is the Jenkins core depending on it already?
          Reinhold Füreder made changes -
          Resolution New: Won't Fix [ 2 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]

          Devin Nusbaum added a comment -

          reinholdfuereder The new plugin should be automatically installed on an upgrade. If it was not upgraded, that is a bug and it should be fixed.

          Devin Nusbaum added a comment - reinholdfuereder The new plugin should be automatically installed on an upgrade. If it was not upgraded, that is a bug and it should be fixed.
          Devin Nusbaum made changes -
          Assignee New: Devin Nusbaum [ dnusbaum ]

          dnusbaum Frankly, I had hoped so too (ad automatically installed). However, I am not sure whether or not my Jenkins core upgrade automation process/procedure may be disallowing that?

          1. (Manual) "Manage Jenkins > Prepare for Shutdown"
          2. (Automatic) Via Ansible:
            1. Download the specific version as debian package
            2. Install via Ansible (apt deb)
            3. Update 'jenkins.install.UpgradeWizard.state' and 'jenkins.install.InstallUtil.lastExecVersion' files
            4. Restart Jenkins

          Reinhold Füreder added a comment - dnusbaum Frankly, I had hoped so too (ad automatically installed). However, I am not sure whether or not my Jenkins core upgrade automation process/procedure may be disallowing that? (Manual) "Manage Jenkins > Prepare for Shutdown" (Automatic) Via Ansible: Download the specific version as debian package Install via Ansible (apt deb) Update 'jenkins.install.UpgradeWizard.state' and 'jenkins.install.InstallUtil.lastExecVersion' files Restart Jenkins

          Devin Nusbaum added a comment -

          reinholdfuereder Can you post logs from the time of the upgrade? 

          I would expect to see a line like:

          Upgrading Jenkins. The last running version was $old. This Jenkins is version $new.

          If you do not see such a line, then Jenkins did not detect that an upgrade was happening (possibly related to JENKINS-48365), which explains why the plugin was not installed. That shouldn't be possible when upgrading from 2.111 unless maybe your instance has no jenkins.install.lastExecVersion file?

          Devin Nusbaum added a comment - reinholdfuereder  Can you post logs from the time of the upgrade?  I would expect to see a line like: Upgrading Jenkins. The last running version was $old. This Jenkins is version $new. If you do not see such a line, then Jenkins did not detect that an upgrade was happening (possibly related to JENKINS-48365 ), which explains why the plugin was not installed. That shouldn't be possible when upgrading from 2.111 unless maybe your instance has no jenkins.install.lastExecVersion file?

            dnusbaum Devin Nusbaum
            reinholdfuereder Reinhold Füreder
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: