java.lang.NullPointerException

Jenkins JIRA | Christian Apel | 4 years ago
  1. 0

    Since we upgraded to Jenkins 1.577 (we also upgraded the Email Ext plugin to the latest 2.38.2), we now have NPE when our jobs fail and an email is trying to be sent: {noformat} The label "_xwiki_bin_get_Blog_GlobalBlogRss" caused the build to fail Build step 'Publish Performance test result report' changed build result to FAILURE Email was triggered for: Failure - Any Sending email for trigger: Failure - Any ERROR: Could not send email as a part of the post-build publishers. java.lang.NullPointerException at hudson.plugins.emailext.ExtendedEmailPublisher.createMail(ExtendedEmailPublisher.java:515) at hudson.plugins.emailext.ExtendedEmailPublisher.sendMail(ExtendedEmailPublisher.java:290) at hudson.plugins.emailext.ExtendedEmailPublisher._perform(ExtendedEmailPublisher.java:281) at hudson.plugins.emailext.ExtendedEmailPublisher.perform(ExtendedEmailPublisher.java:233) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:770) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:734) at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.cleanUp(MavenModuleSetBuild.java:1064) at hudson.model.Run.execute(Run.java:1786) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:529) at hudson.model.ResourceController.execute(ResourceController.java:89) at hudson.model.Executor.run(Executor.java:240) Finished: FAILURE {noformat} I check the code and the line 515 of ExtendedEmailPublisher.java: {noformat} for (RecipientProvider provider : context.getTrigger().getEmail().getRecipientProviders()) { {noformat} So this means either: * context is null * getTrigger() returns null * getEmail() returns null Any idea? Thanks

    Jenkins JIRA | 2 years ago | Vincent Massol
    java.lang.NullPointerException
  2. Speed up your debug routine!

    Automated exception search integrated into your IDE

  3. 0

    Since we upgraded to Jenkins 1.577 (we also upgraded the Email Ext plugin to the latest 2.38.2), we now have NPE when our jobs fail and an email is trying to be sent: {noformat} The label "_xwiki_bin_get_Blog_GlobalBlogRss" caused the build to fail Build step 'Publish Performance test result report' changed build result to FAILURE Email was triggered for: Failure - Any Sending email for trigger: Failure - Any ERROR: Could not send email as a part of the post-build publishers. java.lang.NullPointerException at hudson.plugins.emailext.ExtendedEmailPublisher.createMail(ExtendedEmailPublisher.java:515) at hudson.plugins.emailext.ExtendedEmailPublisher.sendMail(ExtendedEmailPublisher.java:290) at hudson.plugins.emailext.ExtendedEmailPublisher._perform(ExtendedEmailPublisher.java:281) at hudson.plugins.emailext.ExtendedEmailPublisher.perform(ExtendedEmailPublisher.java:233) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:770) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:734) at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.cleanUp(MavenModuleSetBuild.java:1064) at hudson.model.Run.execute(Run.java:1786) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:529) at hudson.model.ResourceController.execute(ResourceController.java:89) at hudson.model.Executor.run(Executor.java:240) Finished: FAILURE {noformat} I check the code and the line 515 of ExtendedEmailPublisher.java: {noformat} for (RecipientProvider provider : context.getTrigger().getEmail().getRecipientProviders()) { {noformat} So this means either: * context is null * getTrigger() returns null * getEmail() returns null Any idea? Thanks

    Jenkins JIRA | 2 years ago | Vincent Massol
    java.lang.NullPointerException
  4. 0

    It looks like Jenkins builds are not sending emails. Email was triggered for: Failure - Any Sending email for trigger: Failure - Any ERROR: Could not send email as a part of the post-build publishers. java.lang.NullPointerException at hudson.plugins.emailext.ExtendedEmailPublisher.sendMail(ExtendedEmailPublisher.java:379) at hudson.plugins.emailext.ExtendedEmailPublisher._perform(ExtendedEmailPublisher.java:350) at hudson.plugins.emailext.ExtendedEmailPublisher.perform(ExtendedEmailPublisher.java:258) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:779) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:720) at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.cleanUp(MavenModuleSetBuild.java:1061) at hudson.model.Run.execute(Run.java:1788) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:529) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:410) Email was triggered for: Unstable (Test Failures)/Failure -> Success Trigger Success was overridden by another trigger and will not send an email. Sending email for trigger: Unstable (Test Failures)/Failure -> Success ERROR: Could not send email as a part of the post-build publishers. java.lang.NullPointerException at hudson.plugins.emailext.ExtendedEmailPublisher.sendMail(ExtendedEmailPublisher.java:379) at hudson.plugins.emailext.ExtendedEmailPublisher._perform(ExtendedEmailPublisher.java:350) at hudson.plugins.emailext.ExtendedEmailPublisher.perform(ExtendedEmailPublisher.java:258) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:779) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:720) at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.cleanUp(MavenModuleSetBuild.java:1061) at hudson.model.Run.execute(Run.java:1788) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:529) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:410) Configuration: <hudson.plugins.emailext.ExtendedEmailPublisher plugin="email-ext@2.47"> <recipientList>$DEFAULT_RECIPIENTS</recipientList> <configuredTriggers> <hudson.plugins.emailext.plugins.trigger.FailureTrigger> <email> <subject>$PROJECT_DEFAULT_SUBJECT</subject> <body>$PROJECT_DEFAULT_CONTENT</body> <recipientProviders> <hudson.plugins.emailext.plugins.recipients.DevelopersRecipientProvider/> <hudson.plugins.emailext.plugins.recipients.UpstreamComitterRecipientProvider/> <hudson.plugins.emailext.plugins.recipients.ListRecipientProvider/> <hudson.plugins.emailext.plugins.recipients.CulpritsRecipientProvider/> </recipientProviders> <attachmentsPattern></attachmentsPattern> <attachBuildLog>false</attachBuildLog> <compressBuildLog>false</compressBuildLog> <replyTo>$PROJECT_DEFAULT_REPLYTO</replyTo> <contentType>project</contentType> </email> </hudson.plugins.emailext.plugins.trigger.FailureTrigger> <hudson.plugins.emailext.plugins.trigger.StillFailingTrigger> <email> <subject>$PROJECT_DEFAULT_SUBJECT</subject> <body>$PROJECT_DEFAULT_CONTENT</body> <recipientProviders> <hudson.plugins.emailext.plugins.recipients.DevelopersRecipientProvider/> <hudson.plugins.emailext.plugins.recipients.UpstreamComitterRecipientProvider/> <hudson.plugins.emailext.plugins.recipients.ListRecipientProvider/> <hudson.plugins.emailext.plugins.recipients.CulpritsRecipientProvider/> </recipientProviders> <attachmentsPattern></attachmentsPattern> <attachBuildLog>false</attachBuildLog> <compressBuildLog>false</compressBuildLog> <replyTo>$PROJECT_DEFAULT_REPLYTO</replyTo> <contentType>project</contentType> </email> </hudson.plugins.emailext.plugins.trigger.StillFailingTrigger> <hudson.plugins.emailext.plugins.trigger.BuildingTrigger> <email> <subject>$PROJECT_DEFAULT_SUBJECT</subject> <body>$PROJECT_DEFAULT_CONTENT</body> <recipientProviders> <hudson.plugins.emailext.plugins.recipients.DevelopersRecipientProvider/> <hudson.plugins.emailext.plugins.recipients.ListRecipientProvider/> <hudson.plugins.emailext.plugins.recipients.UpstreamComitterRecipientProvider/> <hudson.plugins.emailext.plugins.recipients.CulpritsRecipientProvider/> </recipientProviders> <attachmentsPattern></attachmentsPattern> <attachBuildLog>false</attachBuildLog> <compressBuildLog>false</compressBuildLog> <replyTo>$PROJECT_DEFAULT_REPLYTO</replyTo> <contentType>project</contentType> </email> </hudson.plugins.emailext.plugins.trigger.BuildingTrigger> <hudson.plugins.emailext.plugins.trigger.UnstableTrigger> <email> <subject>$PROJECT_DEFAULT_SUBJECT</subject> <body>$PROJECT_DEFAULT_CONTENT</body> <recipientProviders> <hudson.plugins.emailext.plugins.recipients.DevelopersRecipientProvider/> <hudson.plugins.emailext.plugins.recipients.UpstreamComitterRecipientProvider/> <hudson.plugins.emailext.plugins.recipients.ListRecipientProvider/> <hudson.plugins.emailext.plugins.recipients.CulpritsRecipientProvider/> </recipientProviders> <attachmentsPattern></attachmentsPattern> <attachBuildLog>false</attachBuildLog> <compressBuildLog>false</compressBuildLog> <replyTo>$PROJECT_DEFAULT_REPLYTO</replyTo> <contentType>project</contentType> </email> </hudson.plugins.emailext.plugins.trigger.UnstableTrigger> <hudson.plugins.emailext.plugins.trigger.StillUnstableTrigger> <email> <subject>$PROJECT_DEFAULT_SUBJECT</subject> <body>$PROJECT_DEFAULT_CONTENT</body> <recipientProviders> <hudson.plugins.emailext.plugins.recipients.DevelopersRecipientProvider/> <hudson.plugins.emailext.plugins.recipients.UpstreamComitterRecipientProvider/> <hudson.plugins.emailext.plugins.recipients.ListRecipientProvider/> <hudson.plugins.emailext.plugins.recipients.CulpritsRecipientProvider/> </recipientProviders> <attachmentsPattern></attachmentsPattern> <attachBuildLog>false</attachBuildLog> <compressBuildLog>false</compressBuildLog> <replyTo>$PROJECT_DEFAULT_REPLYTO</replyTo> <contentType>project</contentType> </email> </hudson.plugins.emailext.plugins.trigger.StillUnstableTrigger> <hudson.plugins.emailext.plugins.trigger.FixedUnhealthyTrigger> <email> <subject>$PROJECT_DEFAULT_SUBJECT</subject> <body>$PROJECT_DEFAULT_CONTENT</body> <recipientProviders> <hudson.plugins.emailext.plugins.recipients.DevelopersRecipientProvider/> <hudson.plugins.emailext.plugins.recipients.UpstreamComitterRecipientProvider/> <hudson.plugins.emailext.plugins.recipients.ListRecipientProvider/> <hudson.plugins.emailext.plugins.recipients.CulpritsRecipientProvider/> </recipientProviders> <attachmentsPattern></attachmentsPattern> <attachBuildLog>false</attachBuildLog> <compressBuildLog>false</compressBuildLog> <replyTo>$PROJECT_DEFAULT_REPLYTO</replyTo> <contentType>project</contentType> </email> </hudson.plugins.emailext.plugins.trigger.FixedUnhealthyTrigger> </configuredTriggers> <contentType>default</contentType> <defaultSubject>$DEFAULT_SUBJECT</defaultSubject> <defaultContent>$DEFAULT_CONTENT</defaultContent> <attachmentsPattern></attachmentsPattern> <presendScript>$DEFAULT_PRESEND_SCRIPT</presendScript> <postsendScript>$DEFAULT_POSTSEND_SCRIPT</postsendScript> <attachBuildLog>false</attachBuildLog> <compressBuildLog>false</compressBuildLog> <replyTo>$DEFAULT_REPLYTO</replyTo> <saveOutput>false</saveOutput> <disabled>false</disabled> </hudson.plugins.emailext.ExtendedEmailPublisher>

    Jenkins JIRA | 2 months ago | Christopher Febles
    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.EmailTrigger.getNumFailures()
    2. Hudson Email Extension Plugin
      ExtendedEmailPublisher.perform
      1. hudson.plugins.emailext.plugins.EmailTrigger.getNumFailures(EmailTrigger.java:70)
      2. hudson.plugins.emailext.plugins.trigger.RegressionTrigger.trigger(RegressionTrigger.java:23)
      3. hudson.plugins.emailext.ExtendedEmailPublisher._perform(ExtendedEmailPublisher.java:260)
      4. hudson.plugins.emailext.ExtendedEmailPublisher.perform(ExtendedEmailPublisher.java:249)
      4 frames
    3. Hudson
      AbstractBuild$AbstractBuildExecution.performAllBuildSteps
      1. hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:36)
      2. hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:810)
      3. hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:785)
      3 frames
    4. Hudson Maven Embedder
      MavenModuleSetBuild$MavenModuleSetBuildExecution.cleanUp
      1. hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.cleanUp(MavenModuleSetBuild.java:970)
      1 frame
    5. Hudson
      Run.execute
      1. hudson.model.Run.execute(Run.java:1587)
      1 frame
    6. Hudson Maven Embedder
      MavenModuleSetBuild.run
      1. hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:477)
      1 frame
    7. Hudson
      Executor.run
      1. hudson.model.ResourceController.execute(ResourceController.java:88)
      2. hudson.model.Executor.run(Executor.java:236)
      2 frames