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

Linkage error in InitializerFinder.discoverTasks blocks startup

    XMLWordPrintable

Details

    Description

      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.

      Attachments

        Issue Links

          Activity

            jglick Jesse Glick created issue -
            jglick Jesse Glick made changes -
            Field Original Value New Value
            Link This issue is related to JENKINS-18922 [ JENKINS-18922 ]
            jglick Jesse Glick added a comment -

            Seems similar to JENKINS-18922, yet the stack trace is different, and the Jenkins version is as well.

            jglick Jesse Glick added a comment - Seems similar to JENKINS-18922 , yet the stack trace is different, and the Jenkins version is as well.

            Code changed in jenkins
            User: Jesse Glick
            Path:
            src/main/java/org/jvnet/hudson/annotation_indexer/Index.java
            src/test/java/org/jvnet/hudson/annotation_indexer/AnnotationProcessorImplTest.java
            http://jenkins-ci.org/commit/lib-annotation-indexer/c985b86cc786a877f8c556465ccfbc24a6441d1c
            Log:
            JENKINS-20442 Ensuring linkage errors do not halt iteration over indexed elements.

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: src/main/java/org/jvnet/hudson/annotation_indexer/Index.java src/test/java/org/jvnet/hudson/annotation_indexer/AnnotationProcessorImplTest.java http://jenkins-ci.org/commit/lib-annotation-indexer/c985b86cc786a877f8c556465ccfbc24a6441d1c Log: JENKINS-20442 Ensuring linkage errors do not halt iteration over indexed elements.
            jglick Jesse Glick made changes -
            Assignee Jesse Glick [ jglick ]
            jglick Jesse Glick made changes -
            Status Open [ 1 ] In Progress [ 3 ]

            Code changed in jenkins
            User: Jesse Glick
            Path:
            changelog.html
            core/pom.xml
            http://jenkins-ci.org/commit/jenkins/684921e8c5ec0a3c75db3f045199b8a5c5e33961
            Log:
            [FIXED JENKINS-20442] Integrate annotation-indexer 1.6 with improved robustness.

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: changelog.html core/pom.xml http://jenkins-ci.org/commit/jenkins/684921e8c5ec0a3c75db3f045199b8a5c5e33961 Log: [FIXED JENKINS-20442] Integrate annotation-indexer 1.6 with improved robustness.
            scm_issue_link SCM/JIRA link daemon made changes -
            Resolution Fixed [ 1 ]
            Status In Progress [ 3 ] Resolved [ 5 ]
            dogfood dogfood added a comment -

            Integrated in jenkins_main_trunk #3018
            [FIXED JENKINS-20442] Integrate annotation-indexer 1.6 with improved robustness. (Revision 684921e8c5ec0a3c75db3f045199b8a5c5e33961)

            Result = SUCCESS
            Jesse Glick : 684921e8c5ec0a3c75db3f045199b8a5c5e33961
            Files :

            • core/pom.xml
            • changelog.html
            dogfood dogfood added a comment - Integrated in jenkins_main_trunk #3018 [FIXED JENKINS-20442] Integrate annotation-indexer 1.6 with improved robustness. (Revision 684921e8c5ec0a3c75db3f045199b8a5c5e33961) Result = SUCCESS Jesse Glick : 684921e8c5ec0a3c75db3f045199b8a5c5e33961 Files : core/pom.xml changelog.html
            danielbeck Daniel Beck made changes -
            Labels annotation-indexer robustness 1.532.2-fixed annotation-indexer robustness
            rtyler R. Tyler Croy made changes -
            Workflow JNJira [ 151967 ] JNJira + In-Review [ 194157 ]

            People

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

              Dates

                Created:
                Updated:
                Resolved: