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

Use of jelly template leads to NPE in email-ext 2.35.1 in combination with template project plugin

    XMLWordPrintable

Details

    Description

      when sending an email with default content

      ${JELLY_SCRIPT}
      

      the token is not replaced and the jenkins log shows the following stack trace:

      Okt 18, 2013 8:21:02 AM SEVERE hudson.plugins.emailext.plugins.ContentBuilder transformText
      null
      java.lang.NullPointerException
      	at hudson.plugins.emailext.plugins.content.JellyScriptContent.createContext(JellyScriptContent.java:132)
      	at hudson.plugins.emailext.plugins.content.JellyScriptContent.renderContent(JellyScriptContent.java:107)
      	at hudson.plugins.emailext.plugins.content.JellyScriptContent.evaluate(JellyScriptContent.java:64)
      	at org.jenkinsci.plugins.tokenmacro.DataBoundTokenMacro.evaluate(DataBoundTokenMacro.java:177)
      	at org.jenkinsci.plugins.tokenmacro.TokenMacro.expand(TokenMacro.java:182)
      	at org.jenkinsci.plugins.tokenmacro.TokenMacro.expandAll(TokenMacro.java:233)
      	at hudson.plugins.emailext.plugins.ContentBuilder.transformText(ContentBuilder.java:63)
      	at hudson.plugins.emailext.ExtendedEmailPublisher.getContent(ExtendedEmailPublisher.java:698)
      	at hudson.plugins.emailext.ExtendedEmailPublisher.createMail(ExtendedEmailPublisher.java:456)
      	at hudson.plugins.emailext.ExtendedEmailPublisher.sendMail(ExtendedEmailPublisher.java:280)
      	at hudson.plugins.emailext.ExtendedEmailPublisher._perform(ExtendedEmailPublisher.java:272)
      	at hudson.plugins.emailext.ExtendedEmailPublisher.perform(ExtendedEmailPublisher.java:232)
      	at hudson.plugins.templateproject.ProxyPublisher.perform(ProxyPublisher.java:69)
      	at hudson.tasks.BuildStepMonitor$2.perform(BuildStepMonitor.java:32)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:781)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:753)
      	at hudson.model.Build$BuildExecution.post2(Build.java:183)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:706)
      	at hudson.model.Run.execute(Run.java:1690)
      	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
      	at hudson.model.ResourceController.execute(ResourceController.java:88)
      	at hudson.model.Executor.run(Executor.java:246)
      

      This only happens if the email-ext publisher is used in combination with the template project plugin.

      Attachments

        Activity

          axelbehrens Axel Behrens created issue -
          slide_o_mix Alex Earl made changes -
          Field Original Value New Value
          Link This issue is duplicated by JENKINS-20183 [ JENKINS-20183 ]
          slide_o_mix Alex Earl made changes -
          Link This issue is duplicated by JENKINS-20183 [ JENKINS-20183 ]
          axelbehrens Axel Behrens made changes -
          Description when sending an email with default content
          {noformat}
          ${JELLY_SCRIPT}
          {noformat}
          the token is not replaced and the jenkins log show the following stack trace:
          {noformat}
          Okt 18, 2013 8:21:02 AM SEVERE hudson.plugins.emailext.plugins.ContentBuilder transformText
          null
          java.lang.NullPointerException
          at hudson.plugins.emailext.plugins.content.JellyScriptContent.createContext(JellyScriptContent.java:132)
          at hudson.plugins.emailext.plugins.content.JellyScriptContent.renderContent(JellyScriptContent.java:107)
          at hudson.plugins.emailext.plugins.content.JellyScriptContent.evaluate(JellyScriptContent.java:64)
          at org.jenkinsci.plugins.tokenmacro.DataBoundTokenMacro.evaluate(DataBoundTokenMacro.java:177)
          at org.jenkinsci.plugins.tokenmacro.TokenMacro.expand(TokenMacro.java:182)
          at org.jenkinsci.plugins.tokenmacro.TokenMacro.expandAll(TokenMacro.java:233)
          at hudson.plugins.emailext.plugins.ContentBuilder.transformText(ContentBuilder.java:63)
          at hudson.plugins.emailext.ExtendedEmailPublisher.getContent(ExtendedEmailPublisher.java:698)
          at hudson.plugins.emailext.ExtendedEmailPublisher.createMail(ExtendedEmailPublisher.java:456)
          at hudson.plugins.emailext.ExtendedEmailPublisher.sendMail(ExtendedEmailPublisher.java:280)
          at hudson.plugins.emailext.ExtendedEmailPublisher._perform(ExtendedEmailPublisher.java:272)
          at hudson.plugins.emailext.ExtendedEmailPublisher.perform(ExtendedEmailPublisher.java:232)
          at hudson.plugins.templateproject.ProxyPublisher.perform(ProxyPublisher.java:69)
          at hudson.tasks.BuildStepMonitor$2.perform(BuildStepMonitor.java:32)
          at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:781)
          at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:753)
          at hudson.model.Build$BuildExecution.post2(Build.java:183)
          at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:706)
          at hudson.model.Run.execute(Run.java:1690)
          at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
          at hudson.model.ResourceController.execute(ResourceController.java:88)
          at hudson.model.Executor.run(Executor.java:246)
          {noformat}
          when sending an email with default content
          {noformat}
          ${JELLY_SCRIPT}
          {noformat}
          the token is not replaced and the jenkins log shows the following stack trace:
          {noformat}
          Okt 18, 2013 8:21:02 AM SEVERE hudson.plugins.emailext.plugins.ContentBuilder transformText
          null
          java.lang.NullPointerException
          at hudson.plugins.emailext.plugins.content.JellyScriptContent.createContext(JellyScriptContent.java:132)
          at hudson.plugins.emailext.plugins.content.JellyScriptContent.renderContent(JellyScriptContent.java:107)
          at hudson.plugins.emailext.plugins.content.JellyScriptContent.evaluate(JellyScriptContent.java:64)
          at org.jenkinsci.plugins.tokenmacro.DataBoundTokenMacro.evaluate(DataBoundTokenMacro.java:177)
          at org.jenkinsci.plugins.tokenmacro.TokenMacro.expand(TokenMacro.java:182)
          at org.jenkinsci.plugins.tokenmacro.TokenMacro.expandAll(TokenMacro.java:233)
          at hudson.plugins.emailext.plugins.ContentBuilder.transformText(ContentBuilder.java:63)
          at hudson.plugins.emailext.ExtendedEmailPublisher.getContent(ExtendedEmailPublisher.java:698)
          at hudson.plugins.emailext.ExtendedEmailPublisher.createMail(ExtendedEmailPublisher.java:456)
          at hudson.plugins.emailext.ExtendedEmailPublisher.sendMail(ExtendedEmailPublisher.java:280)
          at hudson.plugins.emailext.ExtendedEmailPublisher._perform(ExtendedEmailPublisher.java:272)
          at hudson.plugins.emailext.ExtendedEmailPublisher.perform(ExtendedEmailPublisher.java:232)
          at hudson.plugins.templateproject.ProxyPublisher.perform(ProxyPublisher.java:69)
          at hudson.tasks.BuildStepMonitor$2.perform(BuildStepMonitor.java:32)
          at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:781)
          at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:753)
          at hudson.model.Build$BuildExecution.post2(Build.java:183)
          at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:706)
          at hudson.model.Run.execute(Run.java:1690)
          at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
          at hudson.model.ResourceController.execute(ResourceController.java:88)
          at hudson.model.Executor.run(Executor.java:246)
          {noformat}
          This only happens if the email-ext publisher is used in combination with the template project plugin.
          Summary Use of jelly template leads to NPE in email-ext 2.35.1 Use of jelly template leads to NPE in email-ext 2.35.1 in combination with template project plugin
          slide_o_mix Alex Earl made changes -
          Resolution Fixed [ 1 ]
          Status Open [ 1 ] Resolved [ 5 ]
          axelbehrens Axel Behrens made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          rtyler R. Tyler Croy made changes -
          Workflow JNJira [ 151639 ] JNJira + In-Review [ 207045 ]

          People

            slide_o_mix Alex Earl
            axelbehrens Axel Behrens
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: