NullPointerException on failed build

37 views
Skip to first unread message

Alessandro Ferrucci

unread,
Dec 31, 2013, 2:15:51 PM12/31/13
to jenkins...@googlegroups.com
I'm testing a build and when the build fails,it's supposed to send an email to a list of users.

I can see the NPE originating from the mail sender, and it would look like it would be because there are no recipients email addresses configured for the job, but I did configure email addresses.  I'm using latest stable Jenkins build (1.544)

Thanks!

Alessandro Ferrucci
In the console output I see:

ERROR: Processing failed due to a bug in the code. Please report this to jenkins...@googlegroups.com
java.lang.NullPointerException
	at java.util.StringTokenizer.<init>(StringTokenizer.java:199)
	at java.util.StringTokenizer.<init>(StringTokenizer.java:236)
	at hudson.tasks.MailSender.createEmptyMail(MailSender.java:326)
	at hudson.tasks.MailSender.createFailureMail(MailSender.java:225)
	at hudson.tasks.MailSender.getMail(MailSender.java:152)
	at hudson.tasks.MailSender.execute(MailSender.java:100)
	at hudson.maven.reporters.MavenMailer.end(MavenMailer.java:56)
	at hudson.maven.AbstractMavenBuilder.end(AbstractMavenBuilder.java:103)
	at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:829)
	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:566)
	at hudson.model.Run.execute(Run.java:1678)
	at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:509)
	at hudson.model.ResourceController.execute(ResourceController.java:88)
	at hudson.model.Executor.run(Executor.java:231)
project=hudson.maven.MavenModuleSet@2a94f028[Comet Test]
project.getModules()=[hudson.maven.MavenModule@2059dcd9[Comet Test/comet:Comet][Comet Test/comet:Comet][relativePath:trunk]]
project.getRootModule()=hudson.maven.MavenModule@2059dcd9[Comet Test/comet:Comet][Comet Test/comet:Comet][relativePath:trunk]
FATAL: null
java.lang.NullPointerException
	at java.util.StringTokenizer.<init>(StringTokenizer.java:199)
	at java.util.StringTokenizer.<init>(StringTokenizer.java:236)
	at hudson.tasks.MailSender.createEmptyMail(MailSender.java:326)
	at hudson.tasks.MailSender.createFailureMail(MailSender.java:225)
	at hudson.tasks.MailSender.getMail(MailSender.java:152)
	at hudson.tasks.MailSender.execute(MailSender.java:100)
	at hudson.maven.reporters.MavenMailer.end(MavenMailer.java:56)
	at hudson.maven.AbstractMavenBuilder.end(AbstractMavenBuilder.java:103)
	at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:829)
	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:566)
	at hudson.model.Run.execute(Run.java:1678)
	at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:509)
	at hudson.model.ResourceController.execute(ResourceController.java:88)
	at hudson.model.Executor.run(Executor.java:231)

Marc MacIntyre

unread,
Dec 31, 2013, 2:19:38 PM12/31/13
to jenkins...@googlegroups.com
NPE in the tokenizer could be misconfigured email addresses, too.


--
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.



--
Marc MacIntyre

Alessandro Ferrucci

unread,
Dec 31, 2013, 2:26:30 PM12/31/13
to jenkins...@googlegroups.com
Marc,
that's what I thought, which takes me to a second issue.

I have configured a set of recipients in the job configuration.  When I click "Apply", then "Save", then go back to the job configuration, the email recipients are not saved (it's blank again).




--
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/DFSWgKgs1r8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jenkinsci-use...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.



--
Signed,
Alessandro Ferrucci

Marc MacIntyre

unread,
Dec 31, 2013, 2:53:00 PM12/31/13
to jenkins...@googlegroups.com
So there's your problem; not sure how that got left out of the original report.  Figure out why your config isn't being saved, fix that, and try again.

Alessandro Ferrucci

unread,
Jan 1, 2014, 9:07:02 AM1/1/14
to jenkins...@googlegroups.com
Hi Marc,
thanks for your reply.

So I'm in the configuration screen of the job.  When I change any attributes other than E-Mail Notification Recipients, they get persisted to the job's config.xml.  Whenever I set any recipients, click Apply then Save, I open up the config.xml for the job, and the only thing I see in the reporters section is:

<reporters>
    <hudson.maven.reporters.MavenMailer>
      <dontNotifyEveryUnstableBuild>true</dontNotifyEveryUnstableBuild>
      <sendToIndividuals>false</sendToIndividuals>
      <perModuleEmail>true</perModuleEmail>
    </hudson.maven.reporters.MavenMailer>
  </reporters>

Obviously it's not persisting the changes to the config.xml, and I do not see any errors in the log file.

What are some other things I could check ?  FYI, I'm running in embedded/bootstrapped mode (java -jar jenkins.war), Not sure if that makes a difference or not.

Thanks!
Alessandro Ferrucci

Reply all
Reply to author
Forward
0 new messages