Maven Cascade Release plugin breaks Jenkins Initialization

Article ID:360042174512
2 minute readKnowledge base

Issue

Jenkins controller fails to start after update with following error:

2020-01-01 00:00:00.000+0000 [id=77]    SEVERE  jenkins.InitReactorRunner$1#onTaskFailed: Failed Contributed.load
java.lang.NullPointerException
    at jenkins.security.CustomClassFilter$Contributed.load(CustomClassFilter.java:155)
Caused: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at hudson.init.TaskMethodFinder.invoke(TaskMethodFinder.java:104)
Caused: java.lang.Error
    at hudson.init.TaskMethodFinder.invoke(TaskMethodFinder.java:110)
    at hudson.init.TaskMethodFinder$TaskImpl.run(TaskMethodFinder.java:175)
    at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:296)
    at jenkins.model.Jenkins$5.runTask(Jenkins.java:1121)
    at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:214)
    at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)

In addition, you may also see the following in the logs prior to the Failed Contributed.load error:

2020-01-01 00:00:00.000+0000 [id=77]    SEVERE  h.ExtensionFinder$GuiceFinder#<init>: Failed to create Guice container from all the plugins
java.lang.NoClassDefFoundError: hudson/plugins/depgraph_view/model/graph/EdgeProvider
    at com.barchart.jenkins.cascade.GraphModule.configure(GraphModule.java:39)
    at com.google.inject.AbstractModule.configure(AbstractModule.java:62)
    at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:340)
    at com.google.inject.spi.Elements.getElements(Elements.java:110)
    at com.google.inject.internal.InjectorShell$Builder.build(InjectorShell.java:138)
    at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:104)
    at com.google.inject.Guice.createInjector(Guice.java:96)
    at com.google.inject.Guice.createInjector(Guice.java:73)
    at hudson.ExtensionFinder$GuiceFinder.<init>(ExtensionFinder.java:284)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
    at java.lang.Class.newInstance(Class.java:442)
    at net.java.sezpoz.IndexItem.instance(IndexItem.java:181)
    at hudson.ExtensionFinder$Sezpoz._find(ExtensionFinder.java:704)
    at hudson.ExtensionFinder$Sezpoz.find(ExtensionFinder.java:690)
    at hudson.ClassicPluginStrategy.findComponents(ClassicPluginStrategy.java:344)
    at hudson.ExtensionList.load(ExtensionList.java:381)
    at hudson.ExtensionList.ensureLoaded(ExtensionList.java:317)
    at hudson.ExtensionList.getComponents(ExtensionList.java:183)
    at jenkins.model.Jenkins$6.onInitMilestoneAttained(Jenkins.java:1151)
    at jenkins.InitReactorRunner$1.onAttained(InitReactorRunner.java:83)
    at org.jvnet.hudson.reactor.ReactorListener$Aggregator.lambda$onAttained$3(ReactorListener.java:102)
    at org.jvnet.hudson.reactor.ReactorListener$Aggregator.run(ReactorListener.java:109)
    at org.jvnet.hudson.reactor.ReactorListener$Aggregator.onAttained(ReactorListener.java:102)
    at org.jvnet.hudson.reactor.Reactor$1.run(Reactor.java:177)
    at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)

Resolution

Uninstall Maven Cascade Release. It has not been updated in 7 years as of moment of writing hence appears abandoned. It uses the API that plugs into Jenkins initialization process in a way that can cause the initialization failure.

OR

If uninstalling is not yet possible, downgrade the Dependency Graph Viewer plugin to 0.15.0. The API changes in 1.x version of Dependency Graph Viewer cause the error in the Maven Cascade Release plugin that breaks the initialization. Versions from 0.11 to 0.15.0 appear compatible.