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

Linkage error in InitializerFinder.discoverTasks blocks startup

XMLWordPrintable

      A user who perhaps had the Maven plugin disabled or uninstalled encountered this fatal error during Jenkins startup:

      ...	SEVERE	jenkins.InitReactorRunner$1#onTaskFailed: Failed Discovering plugin initialization tasks
      java.lang.NoClassDefFoundError: hudson/maven/MavenBuild
      	at java.lang.Class.getDeclaredMethods0(Native Method)
      	at java.lang.Class.privateGetDeclaredMethods(Class.java:2451)
      	at java.lang.Class.getDeclaredMethods(Class.java:1810)
      	at org.jvnet.hudson.annotation_indexer.Index$2$1.fetch(Index.java:101)
      	at org.jvnet.hudson.annotation_indexer.Index$2$1.hasNext(Index.java:71)
      	at org.jvnet.hudson.annotation_indexer.FilterIterator.fetch(FilterIterator.java:23)
      	at org.jvnet.hudson.annotation_indexer.FilterIterator.hasNext(FilterIterator.java:42)
      	at hudson.init.InitializerFinder.discoverTasks(InitializerFinder.java:70)
      	at hudson.PluginManager$2$1$3.run(PluginManager.java:367)
      	at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:146)
      	at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:259)
      	at jenkins.model.Jenkins$7.runTask(Jenkins.java:888)
      	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.runWorker(ThreadPoolExecutor.java:1145)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      	at java.lang.Thread.run(Thread.java:722)
      Caused by: java.lang.ClassNotFoundException: hudson.maven.MavenBuild
      	at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
      	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:423)
      	at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
      	... 17 more
      ...	SEVERE	hudson.WebAppMain$2#run: Failed to initialize Jenkins
      org.jvnet.hudson.reactor.ReactorException: java.lang.NoClassDefFoundError: hudson/maven/MavenBuild
      	at org.jvnet.hudson.reactor.Reactor.execute(Reactor.java:246)
      	at jenkins.InitReactorRunner.run(InitReactorRunner.java:43)
      	at jenkins.model.Jenkins.executeReactor(Jenkins.java:899)
      	at jenkins.model.Jenkins.<init>(Jenkins.java:801)
      	at hudson.model.Hudson.<init>(Hudson.java:81)
      	at hudson.model.Hudson.<init>(Hudson.java:77)
      	at hudson.WebAppMain$2.run(WebAppMain.java:214)
      Caused by: java.lang.NoClassDefFoundError: hudson/maven/MavenBuild
      	at java.lang.Class.getDeclaredMethods0(Native Method)
      	at java.lang.Class.privateGetDeclaredMethods(Class.java:2451)
      	at java.lang.Class.getDeclaredMethods(Class.java:1810)
      	at org.jvnet.hudson.annotation_indexer.Index$2$1.fetch(Index.java:101)
      	at org.jvnet.hudson.annotation_indexer.Index$2$1.hasNext(Index.java:71)
      	at org.jvnet.hudson.annotation_indexer.FilterIterator.fetch(FilterIterator.java:23)
      	at org.jvnet.hudson.annotation_indexer.FilterIterator.hasNext(FilterIterator.java:42)
      	at hudson.init.InitializerFinder.discoverTasks(InitializerFinder.java:70)
      	at hudson.PluginManager$2$1$3.run(PluginManager.java:367)
      	at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:146)
      	at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:259)
      	at jenkins.model.Jenkins$7.runTask(Jenkins.java:888)
      	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.runWorker(ThreadPoolExecutor.java:1145)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      	at java.lang.Thread.run(Thread.java:722)
      Caused by: java.lang.ClassNotFoundException: hudson.maven.MavenBuild
      	at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
      	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:423)
      	at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
      	... 17 more
      

      The annotation indexer should just proceed in case some annotated classes are unloadable due to linkage errors, just as it proceeds when the classes are missing.

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

              Created:
              Updated:
              Resolved: