java.lang.NullPointerException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • We're seeing the attached NullPointerException from the mailer plugin. This is because [this call|https://github.com/jenkinsci/mailer-plugin/blob/master/src/main/java/hudson/tasks/MailSender.java#L268] can return null as documented [here|http://javadoc.jenkins-ci.org/hudson/model/AbstractBuild.html#getWorkspace%28%29]. If it's important, our use case is we're trying to send an email after the failure of a Build Flow job. As of version [0.11|https://wiki.jenkins-ci.org/display/JENKINS/Build+Flow+Plugin], the plugin no longer creates or maintains a workspace. Thank you! -------------------------------- Publisher hudson.tasks.Mailer aborted due to exception java.lang.NullPointerException at hudson.tasks.MailSender.createFailureMail(MailSender.java:278) at hudson.tasks.MailSender.getMail(MailSender.java:153) at hudson.tasks.MailSender.execute(MailSender.java:101) at hudson.tasks.Mailer.perform(Mailer.java:137) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:744) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:714) at hudson.model.Build$BuildExecution.post2(Build.java:182) at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:663) at hudson.model.Run.execute(Run.java:1725) at hudson.matrix.MatrixRun.run(MatrixRun.java:146) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:231)
    via by John Doe,
  • We're seeing the attached NullPointerException from the mailer plugin. This is because [this call|https://github.com/jenkinsci/mailer-plugin/blob/master/src/main/java/hudson/tasks/MailSender.java#L268] can return null as documented [here|http://javadoc.jenkins-ci.org/hudson/model/AbstractBuild.html#getWorkspace%28%29]. If it's important, our use case is we're trying to send an email after the failure of a Build Flow job. As of version [0.11|https://wiki.jenkins-ci.org/display/JENKINS/Build+Flow+Plugin], the plugin no longer creates or maintains a workspace. Thank you! -------------------------------- Publisher hudson.tasks.Mailer aborted due to exception java.lang.NullPointerException at hudson.tasks.MailSender.createFailureMail(MailSender.java:278) at hudson.tasks.MailSender.getMail(MailSender.java:153) at hudson.tasks.MailSender.execute(MailSender.java:101) at hudson.tasks.Mailer.perform(Mailer.java:137) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:744) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:714) at hudson.model.Build$BuildExecution.post2(Build.java:182) at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:663) at hudson.model.Run.execute(Run.java:1725) at hudson.matrix.MatrixRun.run(MatrixRun.java:146) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:231)
    via by John Doe,
  • Nullpointer in log rotator
    via by Larry Shatzer, Jr.,
  • Perforce Plugin - Jenkins - Jenkins Wiki
    via by Unknown author,
  • Perforce Plugin - hudson - Hudson Wiki
    via by Unknown author,
  • Perforce Plugin - hudson - Hudson Wiki
    via by Unknown author,
    • java.lang.NullPointerException at hudson.tasks.MailSender.createFailureMail(MailSender.java:278) at hudson.tasks.MailSender.getMail(MailSender.java:153) at hudson.tasks.MailSender.execute(MailSender.java:101) at hudson.tasks.Mailer.perform(Mailer.java:137) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:744) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:714) at hudson.model.Build$BuildExecution.post2(Build.java:182) at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:663) at hudson.model.Run.execute(Run.java:1725) at hudson.matrix.MatrixRun.run(MatrixRun.java:146) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:231)
    No Bugmate found.