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

Java 5 compat: class hudson.node_monitors.DiskSpaceMonitor is missing its descriptor

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Critical
    • Resolution: Fixed
    • Component/s: core
    • Labels:
    • Environment:
      tested in 1.466.x, 1.480.1
    • Similar Issues:

      Description

      Errors are thrown starting Jenkins on Java 5:

      Nov 19, 2012 1:18:07 PM hudson.WebAppMain$2 run
      INFO: Jenkins is fully up and running
      Nov 19, 2012 1:18:12 PM hudson.triggers.SafeTimerTask run
      SEVERE: Timer task hudson.model.LoadStatistics$LoadStatisticsUpdater@1031310 failed
      java.lang.AssertionError: class hudson.node_monitors.DiskSpaceMonitor is missing its descriptor
      	at jenkins.model.Jenkins.getDescriptorOrDie(Jenkins.java:1120)
      	at hudson.node_monitors.NodeMonitor.getDescriptor(NodeMonitor.java:83)
      	at hudson.node_monitors.NodeMonitor.getDescriptor(NodeMonitor.java:67)
      	at hudson.util.DescribableList.get(DescribableList.java:123)
      	at hudson.model.ComputerSet.<clinit>(ComputerSet.java:392)
      	at hudson.model.OverallLoadStatistics.computeTotalExecutors(OverallLoadStatistics.java:63)
      	at hudson.model.LoadStatistics.updateExecutorCounts(LoadStatistics.java:188)
      	at hudson.model.LoadStatistics$LoadStatisticsUpdater.doRun(LoadStatistics.java:226)
      	at hudson.triggers.SafeTimerTask.run(SafeTimerTask.java:54)
      	at java.util.TimerThread.mainLoop(Timer.java:512)
      	at java.util.TimerThread.run(Timer.java:462)
      Nov 19, 2012 1:18:17 PM hudson.triggers.SafeTimerTask run
      SEVERE: Timer task hudson.triggers.Trigger$2@1c5a33b failed
      java.lang.NoClassDefFoundError
      	at hudson.triggers.Trigger$2.doRun(Trigger.java:298)
      	at hudson.triggers.SafeTimerTask.run(SafeTimerTask.java:54)
      	at java.util.TimerThread.mainLoop(Timer.java:512)
      	at java.util.TimerThread.run(Timer.java:462)
      Nov 19, 2012 1:18:22 PM hudson.triggers.SafeTimerTask run
      SEVERE: Timer task hudson.model.LoadStatistics$LoadStatisticsUpdater@1031310 failed
      java.lang.NoClassDefFoundError
      	at hudson.model.OverallLoadStatistics.computeTotalExecutors(OverallLoadStatistics.java:63)
      	at hudson.model.LoadStatistics.updateExecutorCounts(LoadStatistics.java:188)
      	at hudson.model.LoadStatistics$LoadStatisticsUpdater.doRun(LoadStatistics.java:226)
      	at hudson.triggers.SafeTimerTask.run(SafeTimerTask.java:54)
      	at java.util.TimerThread.mainLoop(Timer.java:512)
      	at java.util.TimerThread.run(Timer.java:462)
      

        Attachments

          Activity

          Hide
          jglick Jesse Glick added a comment -

          DiskSpaceMonitor.install and TemporarySpaceMonitor.install are returning null on Java 5, but apparently this is not preventing NodeMonitor.all() from listing them.

          Show
          jglick Jesse Glick added a comment - DiskSpaceMonitor.install and TemporarySpaceMonitor.install are returning null on Java 5, but apparently this is not preventing NodeMonitor.all() from listing them.
          Hide
          jglick Jesse Glick added a comment -

          Cannot consistently reproduce.

          Also when building from sources rather than using a released WAR I get bogus errors such as

          Nov 19, 2012 1:47:33 PM hudson.ExtensionFinder$Sezpoz scout
          WARNING: Failed to scout hudson.scm.MailAddressResolverImpl
          java.lang.InstantiationException: file:…/plugins/cvs/WEB-INF/classes/META-INF/annotations/hudson.Extension might need to be rebuilt: java.lang.ClassNotFoundException: hudson.scm.MailAddressResolverImpl
          	at net.java.sezpoz.IndexItem.element(IndexItem.java:144)
          	at hudson.ExtensionFinder$Sezpoz.scout(ExtensionFinder.java:646)
          	at hudson.ClassicPluginStrategy.findComponents(ClassicPluginStrategy.java:290)
          	at hudson.ExtensionList.load(ExtensionList.java:295)
          	at hudson.ExtensionList.ensureLoaded(ExtensionList.java:248)
          	at hudson.ExtensionList.iterator(ExtensionList.java:138)
          	at hudson.ClassicPluginStrategy.findComponents(ClassicPluginStrategy.java:289)
          	at hudson.ExtensionList.load(ExtensionList.java:295)
          	at hudson.ExtensionList.ensureLoaded(ExtensionList.java:248)
          	at hudson.ExtensionList.size(ExtensionList.java:157)
          	at java.util.AbstractCollection.isEmpty(AbstractCollection.java:78)
          	at hudson.model.queue.QueueSorter.installDefaultQueueSorter(QueueSorter.java:47)
          	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
          	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
          	at java.lang.reflect.Method.invoke(Method.java:592)
          	at hudson.init.InitializerFinder.invoke(InitializerFinder.java:120)
          	at hudson.init.InitializerFinder$TaskImpl.run(InitializerFinder.java:184)
          	at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:259)
          	at jenkins.model.Jenkins$7.runTask(Jenkins.java:875)
          	at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:187)
          	at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:94)
          	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:651)
          	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:676)
          	at java.lang.Thread.run(Thread.java:595)
          Caused by: java.lang.ClassNotFoundException: hudson.scm.MailAddressResolverImpl
          	at hudson.PluginManager$UberClassLoader.findClass(PluginManager.java:783)
          	at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
          	at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
          	at net.java.sezpoz.IndexItem.element(IndexItem.java:134)
          	... 24 more
          

          which may or may not be related.

          Show
          jglick Jesse Glick added a comment - Cannot consistently reproduce. Also when building from sources rather than using a released WAR I get bogus errors such as Nov 19, 2012 1:47:33 PM hudson.ExtensionFinder$Sezpoz scout WARNING: Failed to scout hudson.scm.MailAddressResolverImpl java.lang.InstantiationException: file:…/plugins/cvs/WEB-INF/classes/META-INF/annotations/hudson.Extension might need to be rebuilt: java.lang.ClassNotFoundException: hudson.scm.MailAddressResolverImpl at net.java.sezpoz.IndexItem.element(IndexItem.java:144) at hudson.ExtensionFinder$Sezpoz.scout(ExtensionFinder.java:646) at hudson.ClassicPluginStrategy.findComponents(ClassicPluginStrategy.java:290) at hudson.ExtensionList.load(ExtensionList.java:295) at hudson.ExtensionList.ensureLoaded(ExtensionList.java:248) at hudson.ExtensionList.iterator(ExtensionList.java:138) at hudson.ClassicPluginStrategy.findComponents(ClassicPluginStrategy.java:289) at hudson.ExtensionList.load(ExtensionList.java:295) at hudson.ExtensionList.ensureLoaded(ExtensionList.java:248) at hudson.ExtensionList.size(ExtensionList.java:157) at java.util.AbstractCollection.isEmpty(AbstractCollection.java:78) at hudson.model.queue.QueueSorter.installDefaultQueueSorter(QueueSorter.java:47) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:592) at hudson.init.InitializerFinder.invoke(InitializerFinder.java:120) at hudson.init.InitializerFinder$TaskImpl.run(InitializerFinder.java:184) at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:259) at jenkins.model.Jenkins$7.runTask(Jenkins.java:875) at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:187) at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:94) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:651) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:676) at java.lang.Thread.run(Thread.java:595) Caused by: java.lang.ClassNotFoundException: hudson.scm.MailAddressResolverImpl at hudson.PluginManager$UberClassLoader.findClass(PluginManager.java:783) at java.lang.ClassLoader.loadClass(ClassLoader.java:307) at java.lang.ClassLoader.loadClass(ClassLoader.java:252) at net.java.sezpoz.IndexItem.element(IndexItem.java:134) ... 24 more which may or may not be related.
          Hide
          jglick Jesse Glick added a comment -

          Causes http://localhost:8080/computer/ to crash with a 500 error.

          Show
          jglick Jesse Glick added a comment - Causes http://localhost:8080/computer/ to crash with a 500 error.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Jesse Glick
          Path:
          changelog.html
          core/src/main/java/hudson/node_monitors/DiskSpaceMonitor.java
          core/src/main/java/hudson/node_monitors/TemporarySpaceMonitor.java
          core/src/main/resources/hudson/node_monitors/Messages.properties
          http://jenkins-ci.org/commit/jenkins/8ad62f77cb429a49318444fad2191d0e08857ca6
          Log:
          [FIXED JENKINS-15869] When running on Java 5, must still load DiskSpaceMonitor/TemporarySpaceMonitor, even though they will show N/A.
          Returning null from an @Extension method does not seem to work reliably, and is not supported by SezPoz.
          If desirable to hide a monitor column in $server/computer/, add a boolean isEnabled() method interpretable in Jelly.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: changelog.html core/src/main/java/hudson/node_monitors/DiskSpaceMonitor.java core/src/main/java/hudson/node_monitors/TemporarySpaceMonitor.java core/src/main/resources/hudson/node_monitors/Messages.properties http://jenkins-ci.org/commit/jenkins/8ad62f77cb429a49318444fad2191d0e08857ca6 Log: [FIXED JENKINS-15869] When running on Java 5, must still load DiskSpaceMonitor/TemporarySpaceMonitor, even though they will show N/A. Returning null from an @Extension method does not seem to work reliably, and is not supported by SezPoz. If desirable to hide a monitor column in $server/computer/, add a boolean isEnabled() method interpretable in Jelly.
          Hide
          jglick Jesse Glick added a comment -

          Still not consistently reproducible, but may be necessary to run using Java 6+ before running on Java 5, presumably to populate $JENKINS_HOME/nodeMonitors.xml.

          Show
          jglick Jesse Glick added a comment - Still not consistently reproducible, but may be necessary to run using Java 6+ before running on Java 5, presumably to populate $JENKINS_HOME/nodeMonitors.xml .
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Kohsuke Kawaguchi
          Path:
          changelog.html
          core/src/main/java/hudson/node_monitors/DiskSpaceMonitor.java
          core/src/main/java/hudson/node_monitors/TemporarySpaceMonitor.java
          core/src/main/resources/hudson/node_monitors/Messages.properties
          http://jenkins-ci.org/commit/jenkins/6465ba0f8386fcdef22d2f523357f3024dafd57b
          Log:
          JENKINS-15869 reverting the change.

          "When running on Java 5, must still load DiskSpaceMonitor/TemporarySpaceMonitor, even though they will show N/A."

          This reverts commit 8ad62f77cb429a49318444fad2191d0e08857ca6.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Kohsuke Kawaguchi Path: changelog.html core/src/main/java/hudson/node_monitors/DiskSpaceMonitor.java core/src/main/java/hudson/node_monitors/TemporarySpaceMonitor.java core/src/main/resources/hudson/node_monitors/Messages.properties http://jenkins-ci.org/commit/jenkins/6465ba0f8386fcdef22d2f523357f3024dafd57b Log: JENKINS-15869 reverting the change. "When running on Java 5, must still load DiskSpaceMonitor/TemporarySpaceMonitor, even though they will show N/A." This reverts commit 8ad62f77cb429a49318444fad2191d0e08857ca6.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Kohsuke Kawaguchi
          Path:
          core/src/main/java/hudson/model/ComputerSet.java
          http://jenkins-ci.org/commit/jenkins/5eada311c640663a2dbe40c69a7257e80be9ffca
          Log:
          [FIXED JENKINS-15869]

          revisiting the fix by vetting the deserialized NodeMonitors to make sure they are valid.

          Compare: https://github.com/jenkinsci/jenkins/compare/8ad62f77cb42...5eada311c640

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Kohsuke Kawaguchi Path: core/src/main/java/hudson/model/ComputerSet.java http://jenkins-ci.org/commit/jenkins/5eada311c640663a2dbe40c69a7257e80be9ffca Log: [FIXED JENKINS-15869] revisiting the fix by vetting the deserialized NodeMonitors to make sure they are valid. Compare: https://github.com/jenkinsci/jenkins/compare/8ad62f77cb42...5eada311c640
          Hide
          dogfood dogfood added a comment -

          Integrated in jenkins_main_trunk #2086
          [FIXED JENKINS-15869] When running on Java 5, must still load DiskSpaceMonitor/TemporarySpaceMonitor, even though they will show N/A. (Revision 8ad62f77cb429a49318444fad2191d0e08857ca6)
          JENKINS-15869 reverting the change. (Revision 6465ba0f8386fcdef22d2f523357f3024dafd57b)
          [FIXED JENKINS-15869] (Revision 5eada311c640663a2dbe40c69a7257e80be9ffca)

          Result = SUCCESS
          Jesse Glick : 8ad62f77cb429a49318444fad2191d0e08857ca6
          Files :

          • changelog.html
          • core/src/main/java/hudson/node_monitors/TemporarySpaceMonitor.java
          • core/src/main/java/hudson/node_monitors/DiskSpaceMonitor.java
          • core/src/main/resources/hudson/node_monitors/Messages.properties

          kohsuke : 6465ba0f8386fcdef22d2f523357f3024dafd57b
          Files :

          • changelog.html
          • core/src/main/java/hudson/node_monitors/DiskSpaceMonitor.java
          • core/src/main/resources/hudson/node_monitors/Messages.properties
          • core/src/main/java/hudson/node_monitors/TemporarySpaceMonitor.java

          kohsuke : 5eada311c640663a2dbe40c69a7257e80be9ffca
          Files :

          • core/src/main/java/hudson/model/ComputerSet.java
          Show
          dogfood dogfood added a comment - Integrated in jenkins_main_trunk #2086 [FIXED JENKINS-15869] When running on Java 5, must still load DiskSpaceMonitor/TemporarySpaceMonitor, even though they will show N/A. (Revision 8ad62f77cb429a49318444fad2191d0e08857ca6) JENKINS-15869 reverting the change. (Revision 6465ba0f8386fcdef22d2f523357f3024dafd57b) [FIXED JENKINS-15869] (Revision 5eada311c640663a2dbe40c69a7257e80be9ffca) Result = SUCCESS Jesse Glick : 8ad62f77cb429a49318444fad2191d0e08857ca6 Files : changelog.html core/src/main/java/hudson/node_monitors/TemporarySpaceMonitor.java core/src/main/java/hudson/node_monitors/DiskSpaceMonitor.java core/src/main/resources/hudson/node_monitors/Messages.properties kohsuke : 6465ba0f8386fcdef22d2f523357f3024dafd57b Files : changelog.html core/src/main/java/hudson/node_monitors/DiskSpaceMonitor.java core/src/main/resources/hudson/node_monitors/Messages.properties core/src/main/java/hudson/node_monitors/TemporarySpaceMonitor.java kohsuke : 5eada311c640663a2dbe40c69a7257e80be9ffca Files : core/src/main/java/hudson/model/ComputerSet.java

            People

            • Assignee:
              jglick Jesse Glick
              Reporter:
              jglick Jesse Glick
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: