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

NullPointerException in jenkins-maven-event-spy in the site phase

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      While executing a maven build (maven 3.3.9) The build result is successful but we get a NullPointerException during the execution.

      The net effects are these:

      • The Last Successful Artifacts section is empty although the artifacts were generated and properly uploaded to nexus
      • Build when SNAPSHOT dependencies are generated trigger does not work

      The Null Pointer Exception disappears if the maven-javadoc-plugin ( 2.10.4 ) is disabled.

      Actual plugin configuration (in the reports section of pom.xml) is as follows:

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>2.10.4</version>
        <configuration>
          <aggregate>false</aggregate>
          <show>public</show>
        </configuration>
        <reportSets>
          <reportSet>
            <reports>
              <report>javadoc</report>
            </reports>
          </reportSet>
        </reportSets>
      </plugin>
      

      The actual log of the null pointer exception is below:

      [INFO] preparing maven-javadoc-plugin:javadoc report requires 'generate-sources' forked phase execution
      [jenkins-maven-event-spy] WARNING Exception processing org.apache.maven.lifecycle.internal.DefaultExecutionEvent@3f1158ee
      java.lang.NullPointerException: Attribute value can not be null
      	at org.codehaus.plexus.util.xml.Xpp3Dom.setAttribute(Xpp3Dom.java:178)
      	at org.jenkinsci.plugins.pipeline.maven.eventspy.handler.AbstractExecutionHandler._handle(AbstractExecutionHandler.java:99)
      	at org.jenkinsci.plugins.pipeline.maven.eventspy.handler.AbstractExecutionHandler.handle(AbstractExecutionHandler.java:58)
      	at org.jenkinsci.plugins.pipeline.maven.eventspy.JenkinsMavenEventSpy.onEvent(JenkinsMavenEventSpy.java:158)
      	at org.apache.maven.eventspy.internal.EventSpyDispatcher.onEvent(EventSpyDispatcher.java:104)
      	at org.apache.maven.eventspy.internal.EventSpyExecutionListener.forkStarted(EventSpyExecutionListener.java:96)
      	at org.apache.maven.lifecycle.internal.DefaultExecutionEventCatapult.fire(DefaultExecutionEventCatapult.java:94)
      	at org.apache.maven.lifecycle.internal.DefaultExecutionEventCatapult.fire(DefaultExecutionEventCatapult.java:42)
      	at org.apache.maven.lifecycle.internal.MojoExecutor.executeForkedExecutions(MojoExecutor.java:315)
      	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeForkedExecutions(DefaultLifecycleExecutor.java:173)
      	at org.apache.maven.reporting.exec.DefaultMavenReportExecutor.prepareReportExecution(DefaultMavenReportExecutor.java:336)
      	at org.apache.maven.reporting.exec.DefaultMavenReportExecutor.buildReportPlugin(DefaultMavenReportExecutor.java:186)
      	at org.apache.maven.reporting.exec.DefaultMavenReportExecutor.buildMavenReports(DefaultMavenReportExecutor.java:151)
      	at org.apache.maven.plugins.site.render.AbstractSiteRenderingMojo.getReports(AbstractSiteRenderingMojo.java:251)
      	at org.apache.maven.plugins.site.render.SiteMojo.execute(SiteMojo.java:115)
      	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
      	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
      	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:116)
      	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
      	at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
      	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
      	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
      	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
      	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
      	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
      	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
      	at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
      	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 org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
      	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
      	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
      	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)

        Attachments

          Activity

          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Cyrille Le Clerc
          Path:
          maven-spy/src/main/java/org/jenkinsci/plugins/pipeline/maven/eventspy/handler/AbstractExecutionHandler.java
          http://jenkins-ci.org/commit/pipeline-maven-plugin/0ecfd86a3e22c77ab28d17a2a8713e90035a417b
          Log:
          JENKINS-47508 Fix NPE when executionId is missing (#105)

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Cyrille Le Clerc Path: maven-spy/src/main/java/org/jenkinsci/plugins/pipeline/maven/eventspy/handler/AbstractExecutionHandler.java http://jenkins-ci.org/commit/pipeline-maven-plugin/0ecfd86a3e22c77ab28d17a2a8713e90035a417b Log: JENKINS-47508 Fix NPE when executionId is missing (#105)
          Show
          cleclerc Cyrille Le Clerc added a comment - Daniel Galan can you re test with 3.0.2? https://github.com/jenkinsci/pipeline-maven-plugin/releases/tag/pipeline-maven-3.0.2
          Hide
          dgalan Daniel Galan added a comment -

          Cyrille Le Clerc, sorry for the delay, was abduced into meetings yesterday.

          Sure, I'll give it a try this afternoon and let you know.

           

          Show
          dgalan Daniel Galan added a comment - Cyrille Le Clerc , sorry for the delay, was abduced into meetings yesterday. Sure, I'll give it a try this afternoon and let you know.  
          Hide
          dgalan Daniel Galan added a comment -

          Hi Cyrille Le Clerc,

          I tried it and the problems seems to be gone.

          Thanks!

          Show
          dgalan Daniel Galan added a comment - Hi Cyrille Le Clerc , I tried it and the problems seems to be gone. Thanks!
          Hide
          cleclerc Cyrille Le Clerc added a comment -

          Fixed in 3.0.2

          Show
          cleclerc Cyrille Le Clerc added a comment - Fixed in 3.0.2

            People

            • Assignee:
              cleclerc Cyrille Le Clerc
              Reporter:
              dgalan Daniel Galan
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: