Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[JENKINS-41761] - NullPointerException in Maven32Main #88

Merged
merged 1 commit into from Feb 6, 2017

Conversation

@adovi-accenture
Copy link
Contributor

adovi-accenture commented Jan 6, 2017

Hello guys,

We have a regression there when building a submodule of a Jenkins job, under Maven 3.3.9 we fail I believe because maven-plugin is calling Maven32Main while it is explicitely written on the command line Maven33Main.

So I attached a remote debugger to it and the null pointer is caused at launcher.launch() where launcher is null probably because we are landing in the wrong class set by the builder

Log:
Established TCP socket on 42188
<===[JENKINS REMOTING CAPACITY]===>channel started
Executing Maven: -N -B -s /home/jenkins/config/settings_maven_integration.xml -f /home/jenkins/workspace/SDR_TRUNK_TEST_INTEGRATION/outillage/tests-integration/tests-edr/pom.xml clean deploy -Pjenkins,integration,full-release,integration-modules-deploiements,integration-modules-tests-bouchons,integration-modules-tests-services,integration-deploiements,integration-deploiements-nreg-edr,integration-deploiements-bouchons,integration-deploiements-services,integration-deploiements-elise-verif-start,tests-ti,coverage-ti,tests-tu,coverage-tu,tests-edr,integration-bouchons,tests-soapui,tests-soapui-bouchons,tests-soapui-services
java.lang.NullPointerException
at jenkins.maven3.agent.Maven32Main.launch(Maven32Main.java:186)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at hudson.maven.Maven3Builder.call(Maven3Builder.java:133)
at hudson.maven.Maven3Builder.call(Maven3Builder.java:68)
at hudson.remoting.UserRequest.perform(UserRequest.java:153)
at hudson.remoting.UserRequest.perform(UserRequest.java:50)
at hudson.remoting.Request$2.run(Request.java:336)
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Started by user a.dovi
Finished: ABORTED
Set build name.
channel stopped
New build name is '#652-IGOR-NREG_EDR'
Variable with name 'BUILD_DISPLAY_NAME' already exists, current value: '#652-IGOR-NREG_EDR', new value: '#652-IGOR-NREG_EDR'
FATAL: java.lang.reflect.InvocationTargetException
java.io.IOException: java.lang.reflect.InvocationTargetException
at hudson.maven.Maven3Builder.call(Maven3Builder.java:173)
at hudson.maven.Maven3Builder.call(Maven3Builder.java:68)
at hudson.remoting.UserRequest.perform(UserRequest.java:153)
at hudson.remoting.UserRequest.perform(UserRequest.java:50)
at hudson.remoting.Request$2.run(Request.java:336)
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
at ......remote call to Channel to Maven [/home/xjdkit/put/prd/latest/bin/java, -Xms512m, -Xmx2G, -cp, /home/jenkins/plugins/maven-plugin/WEB-INF/lib/maven33-agent-1.8.1.jar:/home/maven/latest3/boot/plexus-classworlds-2.5.2.jar:/home/maven/latest3/conf/logging, jenkins.maven3.agent.Maven33Main, /home/maven/latest3, /var/cache/jenkins/war/WEB-INF/lib/remoting-3.4.jar, /home/jenkins/plugins/maven-plugin/WEB-INF/lib/maven33-interceptor-1.8.1.jar, /home/jenkins/plugins/maven-plugin/WEB-INF/lib/maven3-interceptor-commons-1.8.1.jar, 42188](Native Method)
at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1537)
at hudson.remoting.UserResponse.retrieve(UserRequest.java:253)
at hudson.remoting.Channel.call(Channel.java:822)
at hudson.maven.ProcessCache$MavenProcess.call(ProcessCache.java:161)
at hudson.maven.MavenBuild$MavenBuildExecution.doRun(MavenBuild.java:880)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534)
at hudson.model.Run.execute(Run.java:1729)
at hudson.maven.MavenBuild.run(MavenBuild.java:270)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:404)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at hudson.maven.Maven3Builder.call(Maven3Builder.java:133)
at hudson.maven.Maven3Builder.call(Maven3Builder.java:68)
at hudson.remoting.UserRequest.perform(UserRequest.java:153)
at hudson.remoting.UserRequest.perform(UserRequest.java:50)
at hudson.remoting.Request$2.run(Request.java:336)
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.Exception: java.lang.NullPointerException
at jenkins.maven3.agent.Maven32Main.launch(Maven32Main.java:189)
... 14 more
Caused by: java.lang.NullPointerException
at jenkins.maven3.agent.Maven32Main.launch(Maven32Main.java:186)
... 14 more
Finished: FAILURE

…kins job

Established TCP socket on 42188
<===[JENKINS REMOTING CAPACITY]===>channel started
Executing Maven:  -N -B -s /home/jenkins/config/settings_maven_integration.xml -f /home/jenkins/workspace/SDR_TRUNK_TEST_INTEGRATION/outillage/tests-integration/tests-edr/pom.xml clean deploy -Pjenkins,integration,full-release,integration-modules-deploiements,integration-modules-tests-bouchons,integration-modules-tests-services,integration-deploiements,integration-deploiements-nreg-edr,integration-deploiements-bouchons,integration-deploiements-services,integration-deploiements-elise-verif-start,tests-ti,coverage-ti,tests-tu,coverage-tu,tests-edr,integration-bouchons,tests-soapui,tests-soapui-bouchons,tests-soapui-services
java.lang.NullPointerException
	at jenkins.maven3.agent.Maven32Main.launch(Maven32Main.java:186)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at hudson.maven.Maven3Builder.call(Maven3Builder.java:133)
	at hudson.maven.Maven3Builder.call(Maven3Builder.java:68)
	at hudson.remoting.UserRequest.perform(UserRequest.java:153)
	at hudson.remoting.UserRequest.perform(UserRequest.java:50)
	at hudson.remoting.Request$2.run(Request.java:336)
	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
Started by user a.dovi
Finished: ABORTED
Set build name.
channel stopped
New build name is '#652-IGOR-NREG_EDR'
Variable with name 'BUILD_DISPLAY_NAME' already exists, current value: '#652-IGOR-NREG_EDR', new value: '#652-IGOR-NREG_EDR'
FATAL: java.lang.reflect.InvocationTargetException
java.io.IOException: java.lang.reflect.InvocationTargetException
	at hudson.maven.Maven3Builder.call(Maven3Builder.java:173)
	at hudson.maven.Maven3Builder.call(Maven3Builder.java:68)
	at hudson.remoting.UserRequest.perform(UserRequest.java:153)
	at hudson.remoting.UserRequest.perform(UserRequest.java:50)
	at hudson.remoting.Request$2.run(Request.java:336)
	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
	at ......remote call to Channel to Maven [/home/xjdkit/put/prd/latest/bin/java, -Xms512m, -Xmx2G, -cp, /home/jenkins/plugins/maven-plugin/WEB-INF/lib/maven33-agent-1.8.1.jar:/home/maven/latest3/boot/plexus-classworlds-2.5.2.jar:/home/maven/latest3/conf/logging, jenkins.maven3.agent.Maven33Main, /home/maven/latest3, /var/cache/jenkins/war/WEB-INF/lib/remoting-3.4.jar, /home/jenkins/plugins/maven-plugin/WEB-INF/lib/maven33-interceptor-1.8.1.jar, /home/jenkins/plugins/maven-plugin/WEB-INF/lib/maven3-interceptor-commons-1.8.1.jar, 42188](Native Method)
	at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1537)
	at hudson.remoting.UserResponse.retrieve(UserRequest.java:253)
	at hudson.remoting.Channel.call(Channel.java:822)
	at hudson.maven.ProcessCache$MavenProcess.call(ProcessCache.java:161)
	at hudson.maven.MavenBuild$MavenBuildExecution.doRun(MavenBuild.java:880)
	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534)
	at hudson.model.Run.execute(Run.java:1729)
	at hudson.maven.MavenBuild.run(MavenBuild.java:270)
	at hudson.model.ResourceController.execute(ResourceController.java:98)
	at hudson.model.Executor.run(Executor.java:404)
Caused by: java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at hudson.maven.Maven3Builder.call(Maven3Builder.java:133)
	at hudson.maven.Maven3Builder.call(Maven3Builder.java:68)
	at hudson.remoting.UserRequest.perform(UserRequest.java:153)
	at hudson.remoting.UserRequest.perform(UserRequest.java:50)
	at hudson.remoting.Request$2.run(Request.java:336)
	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.Exception: java.lang.NullPointerException
	at jenkins.maven3.agent.Maven32Main.launch(Maven32Main.java:189)
	... 14 more
Caused by: java.lang.NullPointerException
	at jenkins.maven3.agent.Maven32Main.launch(Maven32Main.java:186)
	... 14 more
Finished: FAILURE
@adovi-accenture

This comment has been minimized.

Copy link
Contributor Author

adovi-accenture commented Jan 6, 2017

I have forgot the tests sorry guys :)

Also the build launch is success after patching

Established TCP socket on 40071
<===[JENKINS REMOTING CAPACITY]===>channel started
Executing Maven: -N -B -s /home/jenkins/config/settings_maven_integration.xml -f /home/jenkins/workspace/SDR_TRUNK_TEST_INTEGRATION/outillage/tests-integration/tests-edr/pom.xml clean deploy -Pjenkins,integration,full-release,integration-modules-deploiements,integration-modules-tests-bouchons,integration-modules-tests-services,integration-deploiements,integration-deploiements-nreg-edr,integration-deploiements-bouchons,integration-deploiements-services,integration-deploiements-elise-verif-start,tests-ti,coverage-ti,tests-tu,coverage-tu,tests-edr,integration-bouchons,tests-soapui,tests-soapui-bouchons,tests-soapui-services
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building tests-edr 171-05-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:3.0.0:clean (default-clean) @ tests-edr ---
[INFO]
[INFO] --- maven-scm-plugin:1.9.4:checkout (sdr-checkout) @ tests-edr ---
[IN

@aheritier

This comment has been minimized.

Copy link
Member

aheritier commented Jan 11, 2017

Hi @adovi-accenture

Did you open a Jira issue to track this defect ?
The fix seems to be ok and is passing the existing tests
I would like to verify if we cannot add a test to validate this bug too

cheers

@adovi-accenture

This comment has been minimized.

Copy link
Contributor Author

adovi-accenture commented Jan 12, 2017

Hi @aheritier

No I did not open a Jira issue, I just debugged and determined from what Jenkins plugin the issue was coming.

Btw let me know if you need me to create it, I believe the site is https://issues.jenkins-ci.org

Copy link
Member

oleg-nenashev left a comment

👍 for the fix, but the issue in Jenkins JIRA would be really useful

@oleg-nenashev oleg-nenashev self-assigned this Feb 6, 2017
@oleg-nenashev

This comment has been minimized.

Copy link
Member

oleg-nenashev commented Feb 6, 2017

@oleg-nenashev oleg-nenashev changed the title NullPointerException in Maven32Main [JENKINS-41761] - NullPointerException in Maven32Main Feb 6, 2017
@oleg-nenashev

This comment has been minimized.

Copy link
Member

oleg-nenashev commented Feb 6, 2017

@aheritier approved it

@oleg-nenashev oleg-nenashev merged commit c25bc30 into jenkinsci:master Feb 6, 2017
1 check passed
1 check passed
Jenkins This pull request looks good
Details
@adovi-accenture

This comment has been minimized.

Copy link
Contributor Author

adovi-accenture commented Feb 13, 2017

Sorry for not creating the JIRA ticket I was in vacation

thanks

@adovi-accenture

This comment has been minimized.

Copy link
Contributor Author

adovi-accenture commented Jun 22, 2017

The issue is back with Maven 3.5.0 :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.