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

NullPointerException in hudson.maven.Maven3Builder$MavenExecutionListener.recordProjectStarted

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Critical
    • Resolution: Duplicate
    • Component/s: core
    • Labels:
      None
    • Similar Issues:

      Description

      22:24:15  mavenExecutionResult exceptions not empty
      22:24:15  message : Internal error: java.lang.NullPointerException
      22:24:15  cause : null
      22:24:15  Stack trace :
      22:24:15  org.apache.maven.InternalErrorException: Internal error: java.lang.NullPointerException
      22:24:15        at org.apache.maven.lifecycle.internal.BuilderCommon.handleBuildError(BuilderCommon.java:128)
      22:24:15        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:95)
      22:24:15        at org.apache.maven.lifecycle.internal.LifecycleThreadedBuilder$1.call(LifecycleThreadedBuilder.java:167)
      22:24:15        at org.apache.maven.lifecycle.internal.LifecycleThreadedBuilder$1.call(LifecycleThreadedBuilder.java:164)
      22:24:15        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
      22:24:15        at java.util.concurrent.FutureTask.run(FutureTask.java:138)
      22:24:15        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
      22:24:15        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
      22:24:15        at java.util.concurrent.FutureTask.run(FutureTask.java:138)
      22:24:15        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
      22:24:15        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
      22:24:15        at java.lang.Thread.run(Thread.java:662)
      22:24:15  Caused by: java.lang.NullPointerException
      22:24:15        at hudson.maven.Maven3Builder$MavenExecutionListener.recordProjectStarted(Maven3Builder.java:368)
      22:24:15        at hudson.maven.Maven3Builder$MavenExecutionListener.projectStarted(Maven3Builder.java:358)
      22:24:15        at org.apache.maven.lifecycle.internal.DefaultExecutionEventCatapult.fire(DefaultExecutionEventCatapult.java:71)
      22:24:15        at org.apache.maven.lifecycle.internal.DefaultExecutionEventCatapult.fire(DefaultExecutionEventCatapult.java:42)
      22:24:15        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:78)
      22:24:15        ... 10 more
      

      I have some modules which gets activated by properties (provided as buildparameters) - when I activate these with the property it fails with the stack trace.
      Note however that if the same modules are activated explicity on the commandline with -P it all works ok - so this only happens when activating via properties.

        Attachments

          Issue Links

            Activity

            Hide
            nipro Nils Probson added a comment -

            Switch to "Free Style" worked for me

            Show
            nipro Nils Probson added a comment - Switch to "Free Style" worked for me
            Hide
            kutzi kutzi added a comment -

            Obviously, we need the version of Jenkins and Maven under which this is happening.
            https://wiki.jenkins-ci.org/display/JENKINS/Issue+Tracking#IssueTracking-Whattoputinthedescriptionofanissuereport%3F

            Show
            kutzi kutzi added a comment - Obviously, we need the version of Jenkins and Maven under which this is happening. https://wiki.jenkins-ci.org/display/JENKINS/Issue+Tracking#IssueTracking-Whattoputinthedescriptionofanissuereport%3F
            Hide
            kutzi kutzi added a comment - - edited

            Seems to be related to JENKINS-2295 (only for Maven 3 in this case).
            Root problem in both cases seems to be that modules are added via profiles which is something Jenkins still cannot handle in every scenario.

            Show
            kutzi kutzi added a comment - - edited Seems to be related to JENKINS-2295 (only for Maven 3 in this case). Root problem in both cases seems to be that modules are added via profiles which is something Jenkins still cannot handle in every scenario.
            Hide
            kutzi kutzi added a comment -

            On a 2nd look, this indeed seems to be a duplicate of JENKINS-2295:
            Jenkins can handle profiles activated via -P, but not if they're activated by different means (properties, Java version etc.)

            Show
            kutzi kutzi added a comment - On a 2nd look, this indeed seems to be a duplicate of JENKINS-2295 : Jenkins can handle profiles activated via -P, but not if they're activated by different means (properties, Java version etc.)
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Nicolas De Loof
            Path:
            src/main/java/hudson/maven/Maven3Builder.java
            http://jenkins-ci.org/commit/maven-plugin/6e44d072bd5048ecae2b9ad9f99d90c5844ce913
            Log:
            JENKINS-11078 prevent NPE

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Nicolas De Loof Path: src/main/java/hudson/maven/Maven3Builder.java http://jenkins-ci.org/commit/maven-plugin/6e44d072bd5048ecae2b9ad9f99d90c5844ce913 Log: JENKINS-11078 prevent NPE
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Olivier Lamy
            Path:
            src/main/java/hudson/maven/Maven3Builder.java
            http://jenkins-ci.org/commit/maven-plugin/6e8c99da29f60177dd8e14771c3f344871383773
            Log:
            Merge pull request #30 from jenkinsci/JENKINS-11078

            JENKINS-11078 prevent NPE

            Compare: https://github.com/jenkinsci/maven-plugin/compare/0f964451d8e9...6e8c99da29f6

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Olivier Lamy Path: src/main/java/hudson/maven/Maven3Builder.java http://jenkins-ci.org/commit/maven-plugin/6e8c99da29f60177dd8e14771c3f344871383773 Log: Merge pull request #30 from jenkinsci/ JENKINS-11078 JENKINS-11078 prevent NPE Compare: https://github.com/jenkinsci/maven-plugin/compare/0f964451d8e9...6e8c99da29f6

              People

              • Assignee:
                Unassigned
                Reporter:
                davidkarlsen2 David Karlsen
              • Votes:
                2 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: