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

NullPointerException in maven-plugin: Maven3Builder / ExecutedMojo (1.445)

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • maven-plugin
    • RedHat Linux, Java 1.6.0_26.

      Just updated to Jenkins 1.445 from 1.427 and now am getting this NPE; looks like either the MojoDescriptor or PluginDescriptor param to getMojoClass() is null, or else classRealm (in the latter case, might have been fixed by olamy's changes on Dec 29th):

      Caused by: java.lang.NullPointerException
      at hudson.maven.ExecutedMojo.getMojoClass(ExecutedMojo.java:114)
      at hudson.maven.ExecutedMojo.<init>(ExecutedMojo.java:99)
      at hudson.maven.Maven3Builder$MavenExecutionListener.recordExecutionTime(Maven3Builder.java:524)
      at hudson.maven.Maven3Builder$MavenExecutionListener.recordMojoSucceeded(Maven3Builder.java:493)
      at hudson.maven.Maven3Builder$MavenExecutionListener.forkSucceeded(Maven3Builder.java:601)
      at org.apache.maven.lifecycle.internal.DefaultExecutionEventCatapult.fire(DefaultExecutionEventCatapult.java:97)

      Last message logged prior to this seems to be:

      [DEBUG] Looking up lifecyle mappings for packaging pom from ClassRealm[plexus.core, parent: null]

      This is in a child project, not the parent.

          [JENKINS-12259] NullPointerException in maven-plugin: Maven3Builder / ExecutedMojo (1.445)

          Larry West created issue -

          Larry West added a comment -

          Rolled back to 1.444 and the NPE disappeared.

          Also: not sure if this is relevant, but the same problem occurred with both Maven 3.0.2 and Maven 3.0.3 installed.

          Finally, my attachment name has a typo: should be "20111230-jenkins-1.445.systemInfo.htm".

          Larry West added a comment - Rolled back to 1.444 and the NPE disappeared. Also: not sure if this is relevant, but the same problem occurred with both Maven 3.0.2 and Maven 3.0.3 installed. Finally, my attachment name has a typo: should be "20111230-jenkins-1.445.systemInfo.htm".

          Olivier Lamy added a comment -

          Olivier Lamy added a comment - fixed with https://github.com/jenkinsci/jenkins/commit/22317ad5c0a94bfa660d6a669f3cf0e18010283a
          Olivier Lamy made changes -
          Assignee New: Olivier Lamy [ olamy ]
          Resolution New: Fixed [ 1 ]
          Status Original: Open [ 1 ] New: Closed [ 6 ]

          Code changed in jenkins
          User: Olivier Lamy
          Path:
          changelog.html
          http://jenkins-ci.org/commit/jenkins/78792b35b3106db2cfca892ac99070a07a4d3a0c
          Log:
          JENKINS-12259 add change log entry

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Olivier Lamy Path: changelog.html http://jenkins-ci.org/commit/jenkins/78792b35b3106db2cfca892ac99070a07a4d3a0c Log: JENKINS-12259 add change log entry

          Olivier Lamy added a comment -

          will be in 1.447.

          Olivier Lamy added a comment - will be in 1.447.
          Olivier Lamy made changes -
          Link New: This issue is duplicated by JENKINS-12269 [ JENKINS-12269 ]
          kutzi made changes -
          Link New: This issue is duplicated by JENKINS-12358 [ JENKINS-12358 ]

          jeremy comte added a comment -

          Hi there,

          We are still running into the same problem on one of our projects ...
          We just updated Jenkins to 1.448 but it doesn't change anything.

          The stack trace is the following:

          Waiting for Jenkins to finish collecting data
          mavenExecutionResult exceptions not empty
          message : Internal error: java.lang.NullPointerException
          cause : null
          Stack trace :
          org.apache.maven.InternalErrorException: Internal error: java.lang.NullPointerException
          at org.apache.maven.lifecycle.internal.BuilderCommon.handleBuildError(BuilderCommon.java:128)
          at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:95)
          at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
          at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
          at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
          at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319)
          at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
          at org.jvnet.hudson.maven3.launcher.Maven3Launcher.main(Maven3Launcher.java:79)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
          at java.lang.reflect.Method.invoke(Method.java:597)
          at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:329)
          at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:239)
          at org.jvnet.hudson.maven3.agent.Maven3Main.launch(Maven3Main.java:158)
          at hudson.maven.Maven3Builder.call(Maven3Builder.java:112)
          at hudson.maven.Maven3Builder.call(Maven3Builder.java:70)
          at hudson.remoting.UserRequest.perform(UserRequest.java:118)
          at hudson.remoting.UserRequest.perform(UserRequest.java:48)
          at hudson.remoting.Request$2.run(Request.java:287)
          at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
          at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
          at java.util.concurrent.FutureTask.run(FutureTask.java:138)
          at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
          at java.lang.Thread.run(Thread.java:662)
          Caused by: java.lang.NullPointerException
          at hudson.maven.ExecutedMojo.getMojoClass(ExecutedMojo.java:114)
          at hudson.maven.ExecutedMojo.<init>(ExecutedMojo.java:99)
          at hudson.maven.Maven3Builder$MavenExecutionListener.recordExecutionTime(Maven3Builder.java:524)
          at hudson.maven.Maven3Builder$MavenExecutionListener.recordMojoSucceeded(Maven3Builder.java:493)
          at hudson.maven.Maven3Builder$MavenExecutionListener.forkSucceeded(Maven3Builder.java:601)
          at org.apache.maven.lifecycle.internal.DefaultExecutionEventCatapult.fire(DefaultExecutionEventCatapult.java:97)
          at org.apache.maven.lifecycle.internal.DefaultExecutionEventCatapult.fire(DefaultExecutionEventCatapult.java:42)
          at org.apache.maven.lifecycle.internal.MojoExecutor.executeForkedExecutions(MojoExecutor.java:383)
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:199)
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
          at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
          ... 24 more
          channel stopped
          Finished: FAILURE

          The last printout before failure is:

          [INFO] — flexmojos-maven-plugin:3.9:test-run (default) @ gameselector-tests —
          [INFO] Flexmojos 3.9
          [INFO] Apache License - Version 2.0 (NO WARRANTY) - See COPYRIGHT file
          [INFO] Skipping test phase.
          [JENKINS] Recording test results
          [JENKINS] Archiving ...

          Our tests are disabled because they are flash files so they can't be run on our build server.
          Everything worked well for months until first week of January.

          Cheers,
          Jeremy

          jeremy comte added a comment - Hi there, We are still running into the same problem on one of our projects ... We just updated Jenkins to 1.448 but it doesn't change anything. The stack trace is the following: Waiting for Jenkins to finish collecting data mavenExecutionResult exceptions not empty message : Internal error: java.lang.NullPointerException cause : null Stack trace : org.apache.maven.InternalErrorException: Internal error: java.lang.NullPointerException at org.apache.maven.lifecycle.internal.BuilderCommon.handleBuildError(BuilderCommon.java:128) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:95) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59) at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156) at org.jvnet.hudson.maven3.launcher.Maven3Launcher.main(Maven3Launcher.java:79) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:329) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:239) at org.jvnet.hudson.maven3.agent.Maven3Main.launch(Maven3Main.java:158) at hudson.maven.Maven3Builder.call(Maven3Builder.java:112) at hudson.maven.Maven3Builder.call(Maven3Builder.java:70) at hudson.remoting.UserRequest.perform(UserRequest.java:118) at hudson.remoting.UserRequest.perform(UserRequest.java:48) at hudson.remoting.Request$2.run(Request.java:287) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662) Caused by: java.lang.NullPointerException at hudson.maven.ExecutedMojo.getMojoClass(ExecutedMojo.java:114) at hudson.maven.ExecutedMojo.<init>(ExecutedMojo.java:99) at hudson.maven.Maven3Builder$MavenExecutionListener.recordExecutionTime(Maven3Builder.java:524) at hudson.maven.Maven3Builder$MavenExecutionListener.recordMojoSucceeded(Maven3Builder.java:493) at hudson.maven.Maven3Builder$MavenExecutionListener.forkSucceeded(Maven3Builder.java:601) at org.apache.maven.lifecycle.internal.DefaultExecutionEventCatapult.fire(DefaultExecutionEventCatapult.java:97) at org.apache.maven.lifecycle.internal.DefaultExecutionEventCatapult.fire(DefaultExecutionEventCatapult.java:42) at org.apache.maven.lifecycle.internal.MojoExecutor.executeForkedExecutions(MojoExecutor.java:383) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:199) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84) ... 24 more channel stopped Finished: FAILURE The last printout before failure is: [INFO] — flexmojos-maven-plugin:3.9:test-run (default) @ gameselector-tests — [INFO] Flexmojos 3.9 [INFO] Apache License - Version 2.0 (NO WARRANTY) - See COPYRIGHT file [INFO] Skipping test phase. [JENKINS] Recording test results [JENKINS] Archiving ... Our tests are disabled because they are flash files so they can't be run on our build server. Everything worked well for months until first week of January. Cheers, Jeremy
          jeremy comte made changes -
          Resolution Original: Fixed [ 1 ]
          Status Original: Closed [ 6 ] New: Reopened [ 4 ]

            Unassigned Unassigned
            larry_west Larry West
            Votes:
            6 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated: