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

Upgrading to 1.524 breaks startup due to disabled maven-plugin

    XMLWordPrintable

Details

    Description

      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

      Attachments

        Issue Links

          Activity

            rggjan 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 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_issue_link 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 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 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
            jglick 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).

            jglick 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 ).
            danielbeck 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.

            danielbeck 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.

            People

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

              Dates

                Created:
                Updated:
                Resolved: