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

Jenkins fails to start after error in hudson.maven.PluginImpl.init

    Details

      Description

      Start 1.490 on a clean home dir, then ask to upgrade the Maven plugin to version 1.491, and restart. After the restart, there are linkage errors from the Maven plugin, predictably enough (since it is using 1.491+ core APIs); but all of Jenkins fails to start, making it impossible to use the GUI to back out the update. (Workaround: delete $JENKINS_HOME/plugins/maven-plugin.jpi.pinned.)

      … jenkins.InitReactorRunner$1 onAttained
      INFO: Started all plugins
      … jenkins.InitReactorRunner$1 onAttained
      INFO: Augmented all extensions
      … jenkins.InitReactorRunner$1 onTaskFailed
      SEVERE: Failed PluginImpl.init
      java.lang.Error: java.lang.reflect.InvocationTargetException
      	at hudson.init.InitializerFinder.invoke(InitializerFinder.java:124)
      	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:883)
      	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:1110)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
      	at java.lang.Thread.run(Thread.java:722)
      Caused by: java.lang.reflect.InvocationTargetException
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:601)
      	at hudson.init.InitializerFinder.invoke(InitializerFinder.java:120)
      	... 8 more
      Caused by: java.lang.NoClassDefFoundError: hudson/PluginManager$PluginUpdateMonitor
      	at hudson.maven.PluginImpl.init(PluginImpl.java:54)
      	... 13 more
      Caused by: java.lang.ClassNotFoundException: hudson.PluginManager$PluginUpdateMonitor
      	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)
      	... 14 more
      
      … jenkins.InitReactorRunner$1 onAttained
      INFO: Loaded all jobs
      … hudson.WebAppMain$2 run
      SEVERE: Failed to initialize Jenkins
      org.jvnet.hudson.reactor.ReactorException: java.lang.Error: java.lang.reflect.InvocationTargetException
      	at org.jvnet.hudson.reactor.Reactor.execute(Reactor.java:246)
      	at jenkins.InitReactorRunner.run(InitReactorRunner.java:43)
      	at jenkins.model.Jenkins.executeReactor(Jenkins.java:894)
      	at jenkins.model.Jenkins.<init>(Jenkins.java:796)
      	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.Error: java.lang.reflect.InvocationTargetException
      	at hudson.init.InitializerFinder.invoke(InitializerFinder.java:124)
      	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:883)
      	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:1110)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
      	at java.lang.Thread.run(Thread.java:722)
      Caused by: java.lang.reflect.InvocationTargetException
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:601)
      	at hudson.init.InitializerFinder.invoke(InitializerFinder.java:120)
      	... 8 more
      Caused by: java.lang.NoClassDefFoundError: hudson/PluginManager$PluginUpdateMonitor
      	at hudson.maven.PluginImpl.init(PluginImpl.java:54)
      	... 13 more
      Caused by: java.lang.ClassNotFoundException: hudson.PluginManager$PluginUpdateMonitor
      	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)
      	... 14 more
      

      followed by various errors from hudson.ExtensionFinder$Sezpoz.scout and similar; and then

      Exception in thread "pool-2-thread-3" java.lang.NullPointerException
      	at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:191)
      	at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:94)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
      	at java.lang.Thread.run(Thread.java:722)
      

      followed by Jenkins shutting down (and throwing some more errors).

      If a plugin fails to start due to linkage errors, it should be disabled, but that should prevent the whole application from starting.

        Issue Links

          Activity

          Hide
          veen Vegard Endresen added a comment -

          Slightly different workaround for our installation:

          # no .pinned file exists, only .disabled
          mv $JENKINS_HOME/plugins/maven-plugin.jpi.disabled $JENKINS_HOME/plugins/maven-plugin.jpi.pinned
          
          # restart jenkins
          /etc/init.d/jenkins restart
          

          This struck quite recently for some reason

          Show
          veen Vegard Endresen added a comment - Slightly different workaround for our installation: # no .pinned file exists, only .disabled mv $JENKINS_HOME/plugins/maven-plugin.jpi.disabled $JENKINS_HOME/plugins/maven-plugin.jpi.pinned # restart jenkins /etc/init.d/jenkins restart This struck quite recently for some reason
          Hide
          danielbeck Daniel Beck added a comment -

          Has this been resolved by extraction of Maven Project from core?

          Show
          danielbeck Daniel Beck added a comment - Has this been resolved by extraction of Maven Project from core?
          Hide
          jglick Jesse Glick added a comment -

          maven-project has long been a plugin, so no. It was moved out of the core source repository.

          Show
          jglick Jesse Glick added a comment - maven-project has long been a plugin, so no. It was moved out of the core source repository .

            People

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

              Dates

              • Created:
                Updated: