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

Upgrading to 1.524 breaks startup due to disabled maven-plugin

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major Major
    • maven-plugin
    • Archlinux, 64-bit

      When upgrading jenkins from 1.523 to 1.524, jenkins crashes. In the web interface, all I see is the error below.

      Restoring the old version:
      mv jenkins.war jenkins.war2
      cp jenkins.war.bak jenkins.war

      makes it work again. Any idea what the problem could be?

      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:906)
      at jenkins.model.Jenkins.<init>(Jenkins.java:806)
      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:895)
      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:724)
      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:606)
      at hudson.init.InitializerFinder.invoke(InitializerFinder.java:120)
      ... 8 more
      Caused by: java.lang.NoClassDefFoundError: hudson/maven/MavenModule
      at hudson.plugins.jobConfigHistory.JobConfigHistory.isSaveable(JobConfigHistory.java:426)
      at hudson.plugins.jobConfigHistory.JobConfigHistorySaveableListener.onChange(JobConfigHistorySaveableListener.java:28)
      at hudson.model.listeners.SaveableListener.fireOnChange(SaveableListener.java:78)
      at hudson.model.UpdateCenter.save(UpdateCenter.java:519)
      at hudson.util.PersistedList.onModified(PersistedList.java:173)
      at hudson.util.PersistedList.replaceBy(PersistedList.java:85)
      at hudson.model.UpdateCenter.load(UpdateCenter.java:533)
      at hudson.model.UpdateCenter.init(UpdateCenter.java:1546)
      ... 13 more
      Caused by: java.lang.ClassNotFoundException: hudson.maven.MavenModule
      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:424)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
      ... 21 more

          [JENKINS-18922] Upgrading to 1.524 breaks startup due to disabled maven-plugin

          kutzi added a comment -

          Rene, Mike looking at the stack trace, your problem seems to be a completely different one

          kutzi added a comment - Rene, Mike looking at the stack trace, your problem seems to be a completely different one

          +1 with the Job History plugin...

          Régis Desgroppes added a comment - +1 with the Job History plugin...

          Simplest workaround I found is by removing $JENKINS_HOME/plugins/maven-plugin.jpi.disabled then restarting...

          Régis Desgroppes added a comment - Simplest workaround I found is by removing $JENKINS_HOME/plugins/maven-plugin.jpi.disabled then restarting...

          Stuart Whelan added a comment -

          I had to also remove javadoc.jpi.disabled

          Stuart Whelan added a comment - I had to also remove javadoc.jpi.disabled

          Jesse Glick added a comment -

          @rggjan did you have the Job Config History plugin enabled at the time? It has a hard dependency on the Maven plugin, so Plugin Manager should never have allowed you to turn off the Maven plugin to begin with if JCH was still enabled.

          Jesse Glick added a comment - @rggjan did you have the Job Config History plugin enabled at the time? It has a hard dependency on the Maven plugin, so Plugin Manager should never have allowed you to turn off the Maven plugin to begin with if JCH was still enabled.

          rggjan added a comment -

          Yes, I had the Job Config History plugin enabled. However, I'm not sure if the Maven plugin was disabled...

          rggjan added a comment - Yes, I had the Job Config History plugin enabled. However, I'm not sure if the Maven plugin was disabled...

          Code changed in jenkins
          User: Jesse Glick
          Path:
          core/src/main/java/hudson/model/UpdateCenter.java
          core/src/main/java/hudson/model/listeners/SaveableListener.java
          http://jenkins-ci.org/commit/jenkins/37d2575f6b11234a37d45695c05e4f95a6faefa2
          Log:
          JENKINS-18922 Trying to make this error (missing maven-plugin) nonfatal during startup.
          May not suffice: a fatal error may simply be thrown later on.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: core/src/main/java/hudson/model/UpdateCenter.java core/src/main/java/hudson/model/listeners/SaveableListener.java http://jenkins-ci.org/commit/jenkins/37d2575f6b11234a37d45695c05e4f95a6faefa2 Log: JENKINS-18922 Trying to make this error (missing maven-plugin) nonfatal during startup. May not suffice: a fatal error may simply be thrown later on.

          dogfood added a comment -

          Integrated in jenkins_main_trunk #3017
          JENKINS-18922 Trying to make this error (missing maven-plugin) nonfatal during startup. (Revision 37d2575f6b11234a37d45695c05e4f95a6faefa2)

          Result = UNSTABLE
          Jesse Glick : 37d2575f6b11234a37d45695c05e4f95a6faefa2
          Files :

          • core/src/main/java/hudson/model/listeners/SaveableListener.java
          • core/src/main/java/hudson/model/UpdateCenter.java

          dogfood added a comment - Integrated in jenkins_main_trunk #3017 JENKINS-18922 Trying to make this error (missing maven-plugin) nonfatal during startup. (Revision 37d2575f6b11234a37d45695c05e4f95a6faefa2) Result = UNSTABLE Jesse Glick : 37d2575f6b11234a37d45695c05e4f95a6faefa2 Files : core/src/main/java/hudson/model/listeners/SaveableListener.java core/src/main/java/hudson/model/UpdateCenter.java

          Jesse Glick added a comment -

          I think the fix of JENKINS-18654 was the trigger for this: previously you could have turned maven-plugin off while still using plugins that had mandatory dependencies on it (like jobConfigHistory), because Jenkins incorrectly allowed you to load classes from a disabled plugin, and it did not verify that mandatory dependencies of an enabled plugin were themselves enabled. Now that the first part is fixed, but the second part is not, you get errors.

          Not clear what the best fix for this mess would be. To have a stable system, the plugin manager should be as strict as, say, OSGi in forbidding you to load a plugin whose expressed dependencies are unmet. Yet the current update center UI does a halfhearted job of enforcing these dependencies during new plugin installation or update (installing or upgrading dependencies insofar as they are available on the UC), and does not even seem to check anything during plugin enable, disable, or uninstall; and it even gives winking approval to violating core version dependencies, by only showing a warning message that could easily be ignored (cf. JENKINS-20155).

          Jesse Glick added a comment - I think the fix of JENKINS-18654 was the trigger for this: previously you could have turned maven-plugin off while still using plugins that had mandatory dependencies on it (like jobConfigHistory ), because Jenkins incorrectly allowed you to load classes from a disabled plugin, and it did not verify that mandatory dependencies of an enabled plugin were themselves enabled. Now that the first part is fixed, but the second part is not, you get errors. Not clear what the best fix for this mess would be. To have a stable system, the plugin manager should be as strict as, say, OSGi in forbidding you to load a plugin whose expressed dependencies are unmet. Yet the current update center UI does a halfhearted job of enforcing these dependencies during new plugin installation or update (installing or upgrading dependencies insofar as they are available on the UC), and does not even seem to check anything during plugin enable, disable, or uninstall; and it even gives winking approval to violating core version dependencies, by only showing a warning message that could easily be ignored (cf. JENKINS-20155 ).

          Daniel Beck added a comment -

          The cause of this issue was an actual fix to plugin loading behavior. The configuration was invalid, and the change in 1.524 resulted in this actually being a problem.

          But this needs to be prevented, or made more visible to admins so this issue doesn't even occur, and these are tracked as JENKINS-23150 and JENKINS-21486, so resolving this as duplicate.

          Daniel Beck added a comment - The cause of this issue was an actual fix to plugin loading behavior. The configuration was invalid, and the change in 1.524 resulted in this actually being a problem. But this needs to be prevented, or made more visible to admins so this issue doesn't even occur, and these are tracked as JENKINS-23150 and JENKINS-21486 , so resolving this as duplicate.

            Unassigned Unassigned
            rggjan rggjan
            Votes:
            3 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved: