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

NPE / Project build failure when using email-ext plugin

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: email-ext-plugin
    • Labels:
      None
    • Environment:
      Platform: All, OS: Windows XP
    • Similar Issues:

      Description

      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)

        Attachments

          Issue Links

            Activity

            Hide
            ralfxwagner ralfxwagner added a comment -

            Some more information:
            I didn't enter anything in the system configuration for the Extended e-mail
            notification plugin, as I found this setting only latter.

            Here's the setting as I've found it:

            • SMTP Server and Default user suffix were empty
            • system admin e-mail address was set to a default message (please enter
              something here)
            • the Hudson URL parameter (which seems to cause the problem according to the
              log) was properly copied from the normal e-mail notification settings

            When I fill out all of the fields, the e-mail notification works.

            Show
            ralfxwagner ralfxwagner added a comment - Some more information: I didn't enter anything in the system configuration for the Extended e-mail notification plugin, as I found this setting only latter. Here's the setting as I've found it: SMTP Server and Default user suffix were empty system admin e-mail address was set to a default message (please enter something here) the Hudson URL parameter (which seems to cause the problem according to the log) was properly copied from the normal e-mail notification settings When I fill out all of the fields, the e-mail notification works.
            Hide
            ralfxwagner ralfxwagner added a comment -

            set priority to P3 as there is a workaround

            Show
            ralfxwagner ralfxwagner added a comment - set priority to P3 as there is a workaround
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in hudson
            User: : mindless
            Path:
            trunk/hudson/plugins/email-ext/src/main/java/hudson/plugins/emailext/plugins/content/HudsonURLContent.java
            http://fisheye4.cenqua.com/changelog/hudson/?cs=26092
            Log:
            [FIXED JENKINS-1771] avoid NPE in unconfigured Hudson (no root URL set)

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in hudson User: : mindless Path: trunk/hudson/plugins/email-ext/src/main/java/hudson/plugins/emailext/plugins/content/HudsonURLContent.java http://fisheye4.cenqua.com/changelog/hudson/?cs=26092 Log: [FIXED JENKINS-1771] avoid NPE in unconfigured Hudson (no root URL set)

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: