Null pointer exception in ExtendedEmailPublisher.java:242

148 views
Skip to first unread message

Rob Burke

unread,
Oct 24, 2013, 7:51:09 PM10/24/13
to jenkins...@googlegroups.com
Hi,

After a quick search I didn't find a thread on this, so thought it might be useful to post the exception I got:

ERROR: Processing failed due to a bug in the code. Please report this to jenkins...@googlegroups.com
java.lang.NullPointerException
	at hudson.plugins.emailext.ExtendedEmailPublisher._perform(ExtendedEmailPublisher.java:242)
	at hudson.plugins.emailext.ExtendedEmailPublisher.prebuild(ExtendedEmailPublisher.java:222)
	at hudson.model.AbstractBuild$AbstractBuildExecution.preBuild(AbstractBuild.java:815)
	at hudson.model.AbstractBuild$AbstractBuildExecution.preBuild(AbstractBuild.java:810)
	at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:649)
	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:562)
	at hudson.model.Run.execute(Run.java:1665)
	at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:509)
	at hudson.model.ResourceController.execute(ResourceController.java:88)
	at hudson.model.Executor.run(Executor.java:230)

Our setup is a fresh install of email-ext. The configuration is

all unchecked, default content type is plain text

Default Recipients: r...@xxx.xxx
Reply To List: r...@xxx.xxx
Emergency reroute: (empty)
Excluded Recipients: (empty)
Default Subject: "$PROJECT_NAME - Build # $BUILD_NUMBER - $BUILD_STATUS!"
Maximum Attachment Size: (empty)
Default Content: (default)

Any help you can provide is most welcome.

-RB

Richard Bywater

unread,
Oct 24, 2013, 7:57:32 PM10/24/13
to jenkins...@googlegroups.com
Its probably worth confirming exactly which version of email-ext plugin you are using, but that line appears to be when trying to read the configured triggers - by any chance have you no triggers applied to the job (e.g. no trigger on failure)

Richard.


--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Slide

unread,
Oct 24, 2013, 8:36:33 PM10/24/13
to jenkins...@googlegroups.com
There are two possible reasons, one is that you don't have any triggers defined, there was a bug related to this that has been fixed, but I am waiting to do a release to see if there is traction on the second possible cause, which is if you are running 1.536, there are major issues for email-ext and other plugins relating to how things are getting saved in the XML. I've been trying to narrow down what caused the issue but I haven't been successful yet. FYI, you must have triggers added in order for any email to be sent, without any triggers defined, no emails will be sent out.

Nick Desjardins

unread,
Oct 25, 2013, 11:02:07 AM10/25/13
to jenkins...@googlegroups.com
I'm on Jenkins version 1.536 with ext-email-plugin 2.35.1, and I see the NPE in many of our jobs.

Looking at the config.xml file generated for the job, it seems that any trigger I try to create is set to null:

      <configuredTriggers>
        <null/>
      </configuredTriggers>

After saving and coming back into the page from the web UI, these triggers end up with empty configuration blocks (see attached screenshot).
jenkins_email_ext_trigger.png

Slide

unread,
Oct 25, 2013, 11:14:00 AM10/25/13
to jenkins...@googlegroups.com
Yes, its an issue with the way that 1.536 changed how items that implement Descriptor/Describable pattern are saved. The new behavior breaks several plugins.

Nick Desjardins

unread,
Oct 25, 2013, 11:35:44 AM10/25/13
to jenkins...@googlegroups.com
Noted. I was trying to help narrow down the issue as you mentioned.

As a work-around, I would like to hand-code valid xml nodes into the config.xml file. Do you think this would work, and can you please tell what the plug-in expects?


--
You received this message because you are subscribed to a topic in the Google Groups "Jenkins Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jenkinsci-users/FFlAeCI2V3Y/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jenkinsci-use...@googlegroups.com.

Slide

unread,
Oct 25, 2013, 12:01:21 PM10/25/13
to jenkins...@googlegroups.com
You can look at this issue to see some examples of what the trigger sections look like.

Reply all
Reply to author
Forward
0 new messages