Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-1771

NPE / Project build failure when using email-ext plugin

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • email-ext-plugin
    • None
    • Platform: All, OS: Windows XP

      I've been using Hudson 1.219 with the regular mail notification for a couple of
      days now without problems.
      Today, I installed the new mail-ext plugin (version 2.1). I haven't used that
      plugin before.
      Here's the plugin configuration:
      Global Mail address => my mail address
      For testing, I want to receive mails, when a build runs successfully, so I did
      the following:

      • I activated the build trigger "Success".
      • I deactivated "Send to committers"
      • I activated "Send to recipient list"
      • I left the field for the recipient list empty, as I expected that the mail
        will always be sent to the global recipient list.
      • Even when I fill the recipient list, the NPE still occurs.

      Now the project fails due to a NPE in the plugin, here's the stack trace from
      the end of the console log:

      Email was triggered for: Success
      There are 1 triggered emails.
      Sending email for trigger: Success
      FATAL: null
      java.lang.NullPointerException
      at
      hudson.plugins.emailext.plugins.content.HudsonURLContent.getContent(HudsonURLContent.java:20)
      at
      hudson.plugins.emailext.ExtendedEmailPublisher.replaceTokensWithContent(ExtendedEmailPublisher.java:360)
      at
      hudson.plugins.emailext.ExtendedEmailPublisher.replaceTokensWithContent(ExtendedEmailPublisher.java:362)
      at
      hudson.plugins.emailext.ExtendedEmailPublisher.transformText(ExtendedEmailPublisher.java:340)
      at
      hudson.plugins.emailext.ExtendedEmailPublisher.createMail(ExtendedEmailPublisher.java:295)
      at
      hudson.plugins.emailext.ExtendedEmailPublisher.sendMail(ExtendedEmailPublisher.java:265)
      at
      hudson.plugins.emailext.ExtendedEmailPublisher._perform(ExtendedEmailPublisher.java:257)
      at
      hudson.plugins.emailext.ExtendedEmailPublisher.perform(ExtendedEmailPublisher.java:215)
      at
      hudson.model.AbstractBuild$AbstractRunner.performAllBuildStep(AbstractBuild.java:309)
      at
      hudson.model.AbstractBuild$AbstractRunner.performAllBuildStep(AbstractBuild.java:297)
      at hudson.model.Build$RunnerImpl.post2(Build.java:118)
      at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:282)
      at hudson.model.Run.run(Run.java:774)
      at hudson.model.Build.run(Build.java:85)
      at hudson.model.ResourceController.execute(ResourceController.java:70)
      at hudson.model.Executor.run(Executor.java:82)

            mindless Alan Harder
            ralfxwagner ralfxwagner
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: