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.

  • Email can not send out, error info as follows: Email was triggered for: Success Sending email for trigger: Success ERROR: Could not send email as a part of the post-build publishers. java.lang.NullPointerException or Email was triggered for: Success Sending email for trigger: Success ERROR: Could not send email as a part of the post-build publishers. java.lang.NullPointerException at java.util.regex.Matcher.quoteReplacement(Matcher.java:598) at hudson.plugins.emailext.plugins.ContentBuilder$Tokenizer.appendReplacement(ContentBuilder.java:195) at hudson.plugins.emailext.plugins.ContentBuilder.replaceTokensWithContent(ContentBuilder.java:96) at hudson.plugins.emailext.plugins.ContentBuilder.transformText(ContentBuilder.java:67) at hudson.plugins.emailext.ExtendedEmailPublisher.setContent(ExtendedEmailPublisher.java:369) at hudson.plugins.emailext.ExtendedEmailPublisher.createMail(ExtendedEmailPublisher.java:274) at hudson.plugins.emailext.ExtendedEmailPublisher.sendMail(ExtendedEmailPublisher.java:220) at hudson.plugins.emailext.ExtendedEmailPublisher._perform(ExtendedEmailPublisher.java:212) at hudson.plugins.emailext.ExtendedEmailPublisher.perform(ExtendedEmailPublisher.java:174) at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:36) at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:682) at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:657) at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:635) at hudson.model.Build$RunnerImpl.cleanUp(Build.java:171) at hudson.model.Run.run(Run.java:1420) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:230) Finished: SUCCESS
    via by pangpang wanzi,
  • Email can not send out, error info as follows: Email was triggered for: Success Sending email for trigger: Success ERROR: Could not send email as a part of the post-build publishers. java.lang.NullPointerException or Email was triggered for: Success Sending email for trigger: Success ERROR: Could not send email as a part of the post-build publishers. java.lang.NullPointerException at java.util.regex.Matcher.quoteReplacement(Matcher.java:598) at hudson.plugins.emailext.plugins.ContentBuilder$Tokenizer.appendReplacement(ContentBuilder.java:195) at hudson.plugins.emailext.plugins.ContentBuilder.replaceTokensWithContent(ContentBuilder.java:96) at hudson.plugins.emailext.plugins.ContentBuilder.transformText(ContentBuilder.java:67) at hudson.plugins.emailext.ExtendedEmailPublisher.setContent(ExtendedEmailPublisher.java:369) at hudson.plugins.emailext.ExtendedEmailPublisher.createMail(ExtendedEmailPublisher.java:274) at hudson.plugins.emailext.ExtendedEmailPublisher.sendMail(ExtendedEmailPublisher.java:220) at hudson.plugins.emailext.ExtendedEmailPublisher._perform(ExtendedEmailPublisher.java:212) at hudson.plugins.emailext.ExtendedEmailPublisher.perform(ExtendedEmailPublisher.java:174) at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:36) at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:682) at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:657) at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:635) at hudson.model.Build$RunnerImpl.cleanUp(Build.java:171) at hudson.model.Run.run(Run.java:1420) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:230) Finished: SUCCESS
    via by pangpang wanzi,
  • how to configure ext-mail
    via by ensienne,
  • email-ext fails with a NullPointerException when sending some emails (not all). I am not a java developer but if someone could send me a version of email-ext having this line (ContentBuilder.java:68) devided in several lines, next time it fails we could locate more precisely the error. Here is the stack I have: ---------------------------------------------- Build step 'Execute shell' marked build as failure Email was triggered for: Failure Sending email for trigger: Failure ERROR: Could not send email as a part of the post-build publishers. java.lang.NullPointerException at java.util.regex.Matcher.quoteReplacement(Matcher.java:598) at hudson.plugins.emailext.plugins.ContentBuilder.transformText(ContentBuilder.java:68) at hudson.plugins.emailext.ExtendedEmailPublisher.setSubject(ExtendedEmailPublisher.java:463) at hudson.plugins.emailext.ExtendedEmailPublisher.createMail(ExtendedEmailPublisher.java:311) at hudson.plugins.emailext.ExtendedEmailPublisher.sendMail(ExtendedEmailPublisher.java:259) at hudson.plugins.emailext.ExtendedEmailPublisher._perform(ExtendedEmailPublisher.java:251) at hudson.plugins.emailext.ExtendedEmailPublisher.perform(ExtendedEmailPublisher.java:211) at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:36) at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:703) at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:678) at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:656) at hudson.model.Build$RunnerImpl.cleanUp(Build.java:171) at hudson.model.Run.run(Run.java:1454) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:238) Finished: FAILURE
    via by Chris J,
  • When job log contains either ' or ' (seems to work OK with straight simple-quote ') email-ext will crash with the following stack: Email was triggered for: Failure Sending email for trigger: Failure ERROR: Could not send email as a part of the post-build publishers. java.lang.NullPointerException at java.util.regex.Matcher.quoteReplacement(Matcher.java:598) at hudson.plugins.emailext.plugins.ContentBuilder$Tokenizer.appendReplacement(ContentBuilder.java:211) at hudson.plugins.emailext.plugins.ContentBuilder.replaceTokensWithContent(ContentBuilder.java:112) at hudson.plugins.emailext.plugins.ContentBuilder.transformText(ContentBuilder.java:82) at hudson.plugins.emailext.ExtendedEmailPublisher.getContent(ExtendedEmailPublisher.java:482) at hudson.plugins.emailext.ExtendedEmailPublisher.createMail(ExtendedEmailPublisher.java:314) at hudson.plugins.emailext.ExtendedEmailPublisher.sendMail(ExtendedEmailPublisher.java:259) at hudson.plugins.emailext.ExtendedEmailPublisher._perform(ExtendedEmailPublisher.java:251) at hudson.plugins.emailext.ExtendedEmailPublisher.perform(ExtendedEmailPublisher.java:211) at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:36) at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:697) at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:672) at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:650) at hudson.model.Build$RunnerImpl.cleanUp(Build.java:171) at hudson.model.Run.run(Run.java:1448) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:238) Finished: FAILURE
    via by Chris J,
  • email-ext fails with a NullPointerException when sending some emails (not all). I am not a java developer but if someone could send me a version of email-ext having this line (ContentBuilder.java:68) devided in several lines, next time it fails we could locate more precisely the error. Here is the stack I have: ---------------------------------------------- Build step 'Execute shell' marked build as failure Email was triggered for: Failure Sending email for trigger: Failure ERROR: Could not send email as a part of the post-build publishers. java.lang.NullPointerException at java.util.regex.Matcher.quoteReplacement(Matcher.java:598) at hudson.plugins.emailext.plugins.ContentBuilder.transformText(ContentBuilder.java:68) at hudson.plugins.emailext.ExtendedEmailPublisher.setSubject(ExtendedEmailPublisher.java:463) at hudson.plugins.emailext.ExtendedEmailPublisher.createMail(ExtendedEmailPublisher.java:311) at hudson.plugins.emailext.ExtendedEmailPublisher.sendMail(ExtendedEmailPublisher.java:259) at hudson.plugins.emailext.ExtendedEmailPublisher._perform(ExtendedEmailPublisher.java:251) at hudson.plugins.emailext.ExtendedEmailPublisher.perform(ExtendedEmailPublisher.java:211) at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:36) at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:703) at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:678) at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:656) at hudson.model.Build$RunnerImpl.cleanUp(Build.java:171) at hudson.model.Run.run(Run.java:1454) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:238) Finished: FAILURE
    via by Chris J,
  • When job log contains either ' or ' (seems to work OK with straight simple-quote ') email-ext will crash with the following stack: Email was triggered for: Failure Sending email for trigger: Failure ERROR: Could not send email as a part of the post-build publishers. java.lang.NullPointerException at java.util.regex.Matcher.quoteReplacement(Matcher.java:598) at hudson.plugins.emailext.plugins.ContentBuilder$Tokenizer.appendReplacement(ContentBuilder.java:211) at hudson.plugins.emailext.plugins.ContentBuilder.replaceTokensWithContent(ContentBuilder.java:112) at hudson.plugins.emailext.plugins.ContentBuilder.transformText(ContentBuilder.java:82) at hudson.plugins.emailext.ExtendedEmailPublisher.getContent(ExtendedEmailPublisher.java:482) at hudson.plugins.emailext.ExtendedEmailPublisher.createMail(ExtendedEmailPublisher.java:314) at hudson.plugins.emailext.ExtendedEmailPublisher.sendMail(ExtendedEmailPublisher.java:259) at hudson.plugins.emailext.ExtendedEmailPublisher._perform(ExtendedEmailPublisher.java:251) at hudson.plugins.emailext.ExtendedEmailPublisher.perform(ExtendedEmailPublisher.java:211) at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:36) at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:697) at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:672) at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:650) at hudson.model.Build$RunnerImpl.cleanUp(Build.java:171) at hudson.model.Run.run(Run.java:1448) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:238) Finished: FAILURE
    via by Chris J,
    • java.lang.NullPointerException at java.util.regex.Matcher.quoteReplacement(Matcher.java:598) at hudson.plugins.emailext.plugins.ContentBuilder$Tokenizer.appendReplacement(ContentBuilder.java:195) at hudson.plugins.emailext.plugins.ContentBuilder.replaceTokensWithContent(ContentBuilder.java:96) at hudson.plugins.emailext.plugins.ContentBuilder.transformText(ContentBuilder.java:67) at hudson.plugins.emailext.ExtendedEmailPublisher.setContent(ExtendedEmailPublisher.java:369) at hudson.plugins.emailext.ExtendedEmailPublisher.createMail(ExtendedEmailPublisher.java:274) at hudson.plugins.emailext.ExtendedEmailPublisher.sendMail(ExtendedEmailPublisher.java:220) at hudson.plugins.emailext.ExtendedEmailPublisher._perform(ExtendedEmailPublisher.java:212) at hudson.plugins.emailext.ExtendedEmailPublisher.perform(ExtendedEmailPublisher.java:174) at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:36) at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:682) at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:657) at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:635) at hudson.model.Build$RunnerImpl.cleanUp(Build.java:171) at hudson.model.Run.run(Run.java:1420) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:230)

    Users with the same issue

    tvrmsmith
    tvrmsmith1 times, last one,