java.lang.NullPointerException

Jenkins JIRA | Gustavo Cabral do Carmo | 9 months ago
  1. 0

    I have created a template with the following Trigger Script - After Build Trigger Script: build.result.toString().equals('SUCCESS') && build.getBuildVariables().get("publish").equals('true'); Then I assign it to the project, that is properly configured, it has a 'publish' variable that was checked in the build, and when I built the project I got this error. Important Detail: With the exactly same configuration but without using templates, it work flawlessly. BUILD SUCCESSFUL Total time: 2 minutes 38 seconds ERROR: Build step failed with exception java.lang.NullPointerException at hudson.plugins.emailext.plugins.trigger.AbstractScriptTrigger.createEngine(AbstractScriptTrigger.java:81) at hudson.plugins.emailext.plugins.trigger.AbstractScriptTrigger.trigger(AbstractScriptTrigger.java:56) at hudson.plugins.emailext.ExtendedEmailPublisher._perform(ExtendedEmailPublisher.java:274) at hudson.plugins.emailext.ExtendedEmailPublisher.perform(ExtendedEmailPublisher.java:258) at org.jenkinsci.plugins.emailext_template.ExtendedEmailTemplatePublisher.perform(ExtendedEmailTemplatePublisher.java:67) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:782) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:723) at hudson.model.Build$BuildExecution.post2(Build.java:185) at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:668) at hudson.model.Run.execute(Run.java:1763) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:410) Build step 'Editable Email Notification Templates' marked build as failure Finished: FAILURE

    Jenkins JIRA | 9 months ago | Gustavo Cabral do Carmo
    java.lang.NullPointerException
  2. 0

    I have created a template with the following Trigger Script - After Build Trigger Script: build.result.toString().equals('SUCCESS') && build.getBuildVariables().get("publish").equals('true'); Then I assign it to the project, that is properly configured, it has a 'publish' variable that was checked in the build, and when I built the project I got this error. Important Detail: With the exactly same configuration but without using templates, it work flawlessly. BUILD SUCCESSFUL Total time: 2 minutes 38 seconds ERROR: Build step failed with exception java.lang.NullPointerException at hudson.plugins.emailext.plugins.trigger.AbstractScriptTrigger.createEngine(AbstractScriptTrigger.java:81) at hudson.plugins.emailext.plugins.trigger.AbstractScriptTrigger.trigger(AbstractScriptTrigger.java:56) at hudson.plugins.emailext.ExtendedEmailPublisher._perform(ExtendedEmailPublisher.java:274) at hudson.plugins.emailext.ExtendedEmailPublisher.perform(ExtendedEmailPublisher.java:258) at org.jenkinsci.plugins.emailext_template.ExtendedEmailTemplatePublisher.perform(ExtendedEmailTemplatePublisher.java:67) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:782) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:723) at hudson.model.Build$BuildExecution.post2(Build.java:185) at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:668) at hudson.model.Run.execute(Run.java:1763) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:410) Build step 'Editable Email Notification Templates' marked build as failure Finished: FAILURE

    Jenkins JIRA | 9 months ago | Gustavo Cabral do Carmo
    java.lang.NullPointerException
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    List of plugins used in project: multiple-scms mercurial subversion nant sonar flexible-publish email-ext I perform a fairly simple build, use the flexible-plugin to only archive on success and then send an email. Without "attach build log" checked everything works, with it checked I get the following error: Run condition [Current build status] enabling perform for step [Archive the artifacts] Archiving artifacts Checking for post-build Performing post-build step Checking if email needs to be generated Email was triggered for: Success Sending email for trigger: Success NOT overriding default server settings, using Mailer to create session messageContentType = text/plain; charset=UTF-8 Request made to attach build log Adding recipients from recipient list Successfully created MimeMessage Sending email to: MY.USERNAME@MYPLACEOFEMPLOYMENT.com ERROR: Could not send email as a part of the post-build publishers. java.lang.NullPointerException at hudson.plugins.emailext.ExtendedEmailPublisher.sendMail(ExtendedEmailPublisher.java:311) at hudson.plugins.emailext.ExtendedEmailPublisher._perform(ExtendedEmailPublisher.java:289) at hudson.plugins.emailext.ExtendedEmailPublisher.perform(ExtendedEmailPublisher.java:249) at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:36) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:718) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:693) at hudson.model.Build$BuildExecution.cleanUp(Build.java:192) at hudson.model.Run.execute(Run.java:1546) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:237) Some error occured trying to send the email...check the Jenkins log

    Jenkins JIRA | 4 years ago | Mark Orchard
    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.plugins.emailext.plugins.trigger.AbstractScriptTrigger.createEngine()
    2. Hudson Email Extension Plugin
      ExtendedEmailPublisher.perform
      1. hudson.plugins.emailext.plugins.trigger.AbstractScriptTrigger.createEngine(AbstractScriptTrigger.java:81)
      2. hudson.plugins.emailext.plugins.trigger.AbstractScriptTrigger.trigger(AbstractScriptTrigger.java:56)
      3. hudson.plugins.emailext.ExtendedEmailPublisher._perform(ExtendedEmailPublisher.java:274)
      4. hudson.plugins.emailext.ExtendedEmailPublisher.perform(ExtendedEmailPublisher.java:258)
      4 frames
    3. org.jenkinsci.plugins
      ExtendedEmailTemplatePublisher.perform
      1. org.jenkinsci.plugins.emailext_template.ExtendedEmailTemplatePublisher.perform(ExtendedEmailTemplatePublisher.java:67)
      1 frame
    4. Hudson
      Executor.run
      1. hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
      2. hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:782)
      3. hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:723)
      4. hudson.model.Build$BuildExecution.post2(Build.java:185)
      5. hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:668)
      6. hudson.model.Run.execute(Run.java:1763)
      7. hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      8. hudson.model.ResourceController.execute(ResourceController.java:98)
      9. hudson.model.Executor.run(Executor.java:410)
      9 frames