NullPointerException thrown when trying to perform a Maven Release

Article ID:204754560
1 minute readKnowledge base

Issue

When you press "Schedule Release Build", this exception is thrown:

javax.servlet.ServletException: java.lang.NullPointerException at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:795) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:875) at org.kohsuke.stapler.MetaClass$12.dispatch(MetaClass.java:391) …​ Caused by: java.lang.NullPointerException at org.jvnet.hudson.plugins.m2release.M2ReleaseAction.getString(M2ReleaseAction.java:318) at org.jvnet.hudson.plugins.m2release.M2ReleaseAction.doSubmit(M2ReleaseAction.java:223)

Environment

  • CloudBees Jenkins Enterprise

  • M2 Release plugin <= 0.14

Resolution

You should upgrade to version 0.15 or upper of M2 release plugin.

This article is part of our Knowledge Base and is provided for guidance-based purposes only. The solutions or workarounds described here are not officially supported by CloudBees and may not be applicable in all environments. Use at your own discretion, and test changes in a safe environment before applying them to production systems.