java.lang.NullPointerException

Jenkins JIRA | John Doe | 3 years ago
  1. 0

    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)

    Jenkins JIRA | 3 years ago | John Doe
    java.lang.NullPointerException
  2. 0

    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)

    Jenkins JIRA | 3 years ago | John Doe
    java.lang.NullPointerException
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    Nullpointer in log rotator

    Google Groups | 4 years ago | Larry Shatzer, Jr.
    java.lang.NullPointerException

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.NullPointerException

      No message provided

      at hudson.tasks.MailSender.createFailureMail()
    2. Hudson
      Executor.run
      1. hudson.tasks.MailSender.createFailureMail(MailSender.java:278)
      2. hudson.tasks.MailSender.getMail(MailSender.java:153)
      3. hudson.tasks.MailSender.execute(MailSender.java:101)
      4. hudson.tasks.Mailer.perform(Mailer.java:137)
      5. hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
      6. hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:744)
      7. hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:714)
      8. hudson.model.Build$BuildExecution.post2(Build.java:182)
      9. hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:663)
      10. hudson.model.Run.execute(Run.java:1725)
      11. hudson.matrix.MatrixRun.run(MatrixRun.java:146)
      12. hudson.model.ResourceController.execute(ResourceController.java:88)
      13. hudson.model.Executor.run(Executor.java:231)
      13 frames