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

NullPointerException in Maven32Main

    Details

    • Similar Issues:

      Description

      It is a follow-up to https://github.com/jenkinsci/maven-plugin/pull/88

      > 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

        Attachments

          Activity

          Hide
          adovi_accenture arnaud dovi added a comment -

          Thank you Oleg for the fast reply,

          I have reponened the issue here: https://issues.jenkins-ci.org/browse/JENKINS-45060

          Let me know If I missed any possible interesting information

          Show
          adovi_accenture arnaud dovi added a comment - Thank you Oleg for the fast reply, I have reponened the issue here: https://issues.jenkins-ci.org/browse/JENKINS-45060 Let me know If I missed any possible interesting information
          Hide
          oleg_nenashev Oleg Nenashev added a comment -

          Arnaud Dovi Yes, it's there: https://github.com/jenkinsci/maven-plugin/blob/master/src/main/java/hudson/maven/MavenBuild.java#L840-L847 . Could you please reopen another issue for Maven 3.5? This issue has been "properly" fixed, hence I am going to close it.

          P.S: there is an a design concern with defaults handling which will make such issues a never-ending story as I already mentioned to Arnaud Héritier and Olivier Lamy.

           

          Show
          oleg_nenashev Oleg Nenashev added a comment - Arnaud Dovi Yes, it's there: https://github.com/jenkinsci/maven-plugin/blob/master/src/main/java/hudson/maven/MavenBuild.java#L840-L847 . Could you please reopen another issue for Maven 3.5? This issue has been "properly" fixed, hence I am going to close it. P.S: there is an a design concern with defaults handling which will make such issues a never-ending story as I already mentioned to Arnaud Héritier and Olivier Lamy .  
          Hide
          adovi_accenture arnaud dovi added a comment -

          The issue is back with Maven 3.5.0

          Show
          adovi_accenture arnaud dovi added a comment - The issue is back with Maven 3.5.0
          Hide
          adovi_accenture arnaud dovi added a comment -

          Hello,

          I'm reopening because

          the issue is back under Maven 3.5.0

           

          Show
          adovi_accenture arnaud dovi added a comment - Hello, I'm reopening because the issue is back under Maven 3.5.0  
          Hide
          aheritier Arnaud Héritier added a comment -

          Fixed in 2.15

          Show
          aheritier Arnaud Héritier added a comment - Fixed in 2.15
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: adovi-accenture
          Path:
          src/main/java/hudson/maven/MavenBuild.java
          http://jenkins-ci.org/commit/maven-plugin/c25bc30c29b5e60230d35400c6631376677b0897
          Log:
          JENKINS-41761 - Fix attempt at a null pointer when building a submodule only of a Jenkins job (#88)

          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

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: adovi-accenture Path: src/main/java/hudson/maven/MavenBuild.java http://jenkins-ci.org/commit/maven-plugin/c25bc30c29b5e60230d35400c6631376677b0897 Log: JENKINS-41761 - Fix attempt at a null pointer when building a submodule only of a Jenkins job (#88) 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

            People

            • Assignee:
              oleg_nenashev Oleg Nenashev
              Reporter:
              oleg_nenashev Oleg Nenashev
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: