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

NPE / Project build failure when using email-ext plugin

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • email-ext-plugin
    • None
    • Platform: All, OS: Windows XP

    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

            ralfxwagner ralfxwagner created issue -
            mindless Alan Harder made changes -
            Field Original Value New Value
            Component/s email-ext [ 15538 ]
            Component/s mail [ 15493 ]
            mdonohue mdonohue made changes -
            Description Hi,

            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)
            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)
            Summary NPE / Project build failure when using mail-ext plugin NPE / Project build failure when using email-ext plugin
            mindless Alan Harder made changes -
            Assignee mindless [ mindless ]
            scm_issue_link SCM/JIRA link daemon made changes -
            Resolution Fixed [ 1 ]
            Status Open [ 1 ] Resolved [ 5 ]
            evernat evernat made changes -
            Link This issue is duplicated by JENKINS-1506 [ JENKINS-1506 ]
            abayer Andrew Bayer made changes -
            Status Resolved [ 5 ] Closed [ 6 ]
            rtyler R. Tyler Croy made changes -
            Workflow JNJira [ 131844 ] JNJira + In-Review [ 200970 ]

            People

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

              Dates

                Created:
                Updated:
                Resolved: