Null Pointer after successful Maven build

16 views
Skip to first unread message

Tim Pizey

unread,
Aug 25, 2011, 4:13:50 AM8/25/11
to jenkins...@googlegroups.com
Hi,

I have an odd NPE being thrown after a successful build, the code is at
https://github.com/jenkinsci/jenkins/blob/master/maven-plugin/src/main/java/hudson/maven/MavenModuleSetBuild.java
as there is a null check there I cannot see how this is happening.

The only clue I have is that I have re-enabled email notification,
which had been accidentally
remove a few weeks ago.

cheers
Tim


[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2:44:45.102s
[INFO] Finished at: Thu Aug 25 02:47:23 BST 2011
[INFO] Final Memory: 42M/261M
[INFO] ------------------------------------------------------------------------
Sending e-mails to: ti...@well.ox.ac.uk richard...@wwarn.org
jul...@wwarn.org
channel stopped
FATAL: null
java.lang.NullPointerException
at hudson.maven.MavenModuleSetBuild$RunnerImpl.doRun(MavenModuleSetBuild.java:833)
at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:448)
at hudson.model.Run.run(Run.java:1376)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:479)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:230)

--
Tim Pizey - http://pizey.net/~timp
Centre for Genomics and Global Health - http://cggh.org

Vojtech Juranek

unread,
Aug 25, 2011, 4:35:51 AM8/25/11
to jenkins...@googlegroups.com
Hi,
which version are you on? This should be fixed in 1.427.
Vojtech

> Hi,
>
> I have an odd NPE being thrown after a successful build, the code is at
> https://github.com/jenkinsci/jenkins/blob/master/maven-plugin/src/main/java

> /hudson/maven/MavenModuleSetBuild.java as there is a null check there I

Tim Pizey

unread,
Aug 25, 2011, 5:35:57 AM8/25/11
to jenkins...@googlegroups.com
Wow, great, we are on 426.
thanks
Tim

--

Tim Pizey

unread,
Aug 26, 2011, 3:32:13 PM8/26/11
to jenkins...@googlegroups.com
Hi Vojtech,

It is great that this is fixed in the next release, but what is 'this'?
Am I able to stop the build failing by altering the configuration?

cheers
Tim

--

Kamal Ahmed

unread,
Aug 26, 2011, 3:53:05 PM8/26/11
to jenkins...@googlegroups.com
in 1.427 i am getting:

FAILURE: testUpload(hudson.PluginManagerTest)
java.io.IOException: GET http://localhost:41885/pluginManager/advanced failed
    at com.gargoylesoftware.htmlunit.HttpWebConnection.getResponse(HttpWebConnection.java:126)
    at com.gargoylesoftware.htmlunit.WebClient.loadWebResponseFromWebConnection(WebClient.java:1456)
    at com.gargoylesoftware.htmlunit.WebClient.loadWebResponse(WebClient.java:1387)
    at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:328)
    at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:389)
    at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:374)
    at org.jvnet.hudson.test.HudsonTestCase$WebClient.goTo(HudsonTestCase.java:1687)
    at org.jvnet.hudson.test.HudsonTestCase$WebClient.goTo(HudsonTestCase.java:1678)
    at hudson.PluginManagerTest.testUpload(PluginManagerTest.java:48)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)


any idea how to get around this?
Thanks,
-Kamal.


From: Tim Pizey <tim....@gmail.com>
To: jenkins...@googlegroups.com
Sent: Friday, August 26, 2011 3:32 PM
Subject: Re: Null Pointer after successful Maven build

Kamal Ahmed

unread,
Aug 26, 2011, 4:18:04 PM8/26/11
to jenkins...@googlegroups.com

Richard Mortimer

unread,
Aug 26, 2011, 6:37:21 PM8/26/11
to jenkins...@googlegroups.com

On 26/08/2011 20:32, Tim Pizey wrote:
> Hi Vojtech,
>
> It is great that this is fixed in the next release, but what is 'this'?

"this" is the NPE on line 833 of MavenModuleSetBuild. It is fixed in 1.427.

You noted that there is already a null check but that is the fix for the
bug.

See
https://issues.jenkins-ci.org/browse/JENKINS-10715
https://issues.jenkins-ci.org/browse/JENKINS-10755
fixed in commit as seen at
https://github.com/jenkinsci/jenkins/commit/e7f17b5db283af591faf71aeb5f76af6626757cc#maven-plugin/src/main/java/hudson/maven/MavenModuleSetBuild.java

> Am I able to stop the build failing by altering the configuration?
>

Upgrade either jenkins core to 1.427 or just to the maven plugin
included in that version.

Hope this helps

Richard

Tim Pizey

unread,
Aug 26, 2011, 7:20:09 PM8/26/11
to jenkins...@googlegroups.com
Hi Richard,

Thanks for your reply, unlike the other posters on the issue tracker
this only affects one of my Maven jobs, all the others are still
building happily.

A team member deleted all email notification, when I caught this and
put email notification back in then the build started to fail with an
NPE.

So I wondered if I could configure the problem away. I am very glad
that the fix is already in and that this problem will go away but
hoping that I can set remoteGlobalSettings to non-null through the
user interface so that remoteGlobalSettings.delete() will not fail.

My question, which I should have worded better is 'what UI element
sets remoteGlobalSettings' ?


cheers
Tim

--

Richard Mortimer

unread,
Aug 26, 2011, 7:39:25 PM8/26/11
to jenkins...@googlegroups.com

On 27/08/2011 00:20, Tim Pizey wrote:
> Hi Richard,
>
> Thanks for your reply, unlike the other posters on the issue tracker
> this only affects one of my Maven jobs, all the others are still
> building happily.
>
> A team member deleted all email notification, when I caught this and
> put email notification back in then the build started to fail with an
> NPE.
>
> So I wondered if I could configure the problem away. I am very glad
> that the fix is already in and that this problem will go away but
> hoping that I can set remoteGlobalSettings to non-null through the
> user interface so that remoteGlobalSettings.delete() will not fail.
>
> My question, which I should have worded better is 'what UI element
> sets remoteGlobalSettings' ?
>

That answer I don't know. But I don't recall anyone giving a simple
workaround for this one.

Regards

Richard

>
> cheers
> Tim

Olivier Lamy

unread,
Aug 27, 2011, 3:01:26 AM8/27/11
to jenkins...@googlegroups.com
2011/8/27 Tim Pizey <tim....@gmail.com>:

> Hi Richard,
>
> Thanks for your reply, unlike the other posters on the issue tracker
> this only affects one of my Maven jobs, all the others are still
> building happily.
>
> A team member deleted all email notification, when I caught this and
> put email notification back in then the build started to fail with an
> NPE.
>
> So I wondered if I could configure the problem away. I am very glad
> that the fix is already in and that this problem will go away but
> hoping that I can set remoteGlobalSettings to non-null through the
> user interface so that remoteGlobalSettings.delete() will not fail.
>
> My question, which I should have worded better is 'what UI element
> sets remoteGlobalSettings' ?

You must install this plugin :
https://wiki.jenkins-ci.org/display/JENKINS/Config+File+Provider+Plugin

--
Olivier Lamy
Talend : http://talend.com
http://twitter.com/olamy | http://linkedin.com/in/olamy

Tim Pizey

unread,
Aug 30, 2011, 9:48:10 AM8/30/11
to jenkins...@googlegroups.com
Thanks all for your replies, we are now running 1.428 and all is well!

thanks again
Tim


On 27 August 2011 08:01, Olivier Lamy wrote:
> 2011/8/27 Tim Pizey :

Reply all
Reply to author
Forward
0 new messages