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

Hudson 1.319 + Violations 0.7.4 = NullPointerException in ViolationsMavenReporter

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: core
    • Labels:
      None
    • Environment:
      Platform: All, OS: Linux
    • Similar Issues:

      Description

      Hi guys,

      I'm running 0.7.4 of the Violations plugin. After upgrading to 1.319 of Hudson,
      my builds began to fail with the following message:

      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD SUCCESSFUL
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 4 minutes 13 seconds
      [INFO] Finished at: Mon Aug 10 09:21:22 CDT 2009
      [INFO] Final Memory: 99M/587M
      [INFO] ------------------------------------------------------------------------
      [locks-and-latches] Releasing all the locks
      [locks-and-latches] All the locks released
      ERROR: Processing failed due to a bug in the code. Please report this to
      users@hudson.dev.java.net
      java.lang.NullPointerException
      at
      hudson.plugins.violations.hudson.maven.ViolationsMavenReporter.end(ViolationsMavenReporter.java:98)
      at hudson.maven.MavenModuleSetBuild$Builder.end(MavenModuleSetBuild.java:674)
      at
      hudson.maven.MavenModuleSetBuild$RunnerImpl.doRun(MavenModuleSetBuild.java:484)
      at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:345)
      at hudson.model.Run.run(Run.java:1090)
      at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:301)
      at hudson.model.ResourceController.execute(ResourceController.java:93)
      at hudson.model.Executor.run(Executor.java:122)
      project=hudson.maven.MavenModuleSet@77ec3adc[project]
      project.getModules()=[hudson.maven.MavenModule@427b2d29[project/com.uprr.project:project]]
      project.getRootModule()=hudson.maven.MavenModule@427b2d29[project/com.uprr.project:project]
      FATAL: null
      java.lang.NullPointerException
      at
      hudson.plugins.violations.hudson.maven.ViolationsMavenReporter.end(ViolationsMavenReporter.java:98)
      at hudson.maven.MavenModuleSetBuild$Builder.end(MavenModuleSetBuild.java:674)
      at
      hudson.maven.MavenModuleSetBuild$RunnerImpl.doRun(MavenModuleSetBuild.java:484)
      at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:345)
      at hudson.model.Run.run(Run.java:1090)
      at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:301)
      at hudson.model.ResourceController.execute(ResourceController.java:93)
      at hudson.model.Executor.run(Executor.java:122)

      The builds are successful when I revert Hudson to version 1.318.

      Looking at the location of the NPE, it looks like that class hasn't been changed
      for months:
      http://fisheye4.atlassian.com/browse/hudson/trunk/hudson/plugins/violations/src/main/java/hudson/plugins/violations/hudson/maven/ViolationsMavenReporter.java?r=10807#l98

        Attachments

          Issue Links

            Activity

            Hide
            abayer Andrew Bayer added a comment -

            The problem here is that changes were made to hudson.tasks.BuildStep - I have a
            feeling this is not a problem isolated to the violations plugin. You can't even
            compile the violations plugin against 1.319 - error below. I'm going to poke
            around more.

            [INFO] [hpi:apt-compile]
            [INFO] Compiling 23 source files to C:\svn\hudson\plugins\violations\target\classes
            C:\svn\hudson\plugins\violations\src\main\java\hudson\plugins\violations\ViolationsPublisher.java:32:
            hudson.plugins.violations.ViolationsPublisher is not abstract and does not
            override abstract method getRequiredMonitorService() in hudson.tasks.BuildStep
            public class ViolationsPublisher extends Publisher {
            ^

            Show
            abayer Andrew Bayer added a comment - The problem here is that changes were made to hudson.tasks.BuildStep - I have a feeling this is not a problem isolated to the violations plugin. You can't even compile the violations plugin against 1.319 - error below. I'm going to poke around more. [INFO] [hpi:apt-compile] [INFO] Compiling 23 source files to C:\svn\hudson\plugins\violations\target\classes C:\svn\hudson\plugins\violations\src\main\java\hudson\plugins\violations\ViolationsPublisher.java:32: hudson.plugins.violations.ViolationsPublisher is not abstract and does not override abstract method getRequiredMonitorService() in hudson.tasks.BuildStep public class ViolationsPublisher extends Publisher { ^
            Hide
            kohsuke Kohsuke Kawaguchi added a comment -

            Reproduced the problem. This is indeed a regression in the core.

            Show
            kohsuke Kohsuke Kawaguchi added a comment - Reproduced the problem. This is indeed a regression in the core.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in hudson
            User: : kohsuke
            Path:
            trunk/hudson/main/core/src/main/java/hudson/model/AbstractBuild.java
            trunk/hudson/main/maven-plugin/src/main/java/hudson/maven/MavenBuild.java
            trunk/hudson/main/maven-plugin/src/main/java/hudson/maven/MavenModuleSetBuild.java
            trunk/hudson/main/test/src/test/resources/hudson/maven/JENKINS-4192.zip
            trunk/hudson/main/test/src/test/resources/hudson/maven/MavenBuildTest.java
            trunk/www/changelog.html
            http://fisheye4.cenqua.com/changelog/hudson/?cs=20635
            Log:
            [FIXED JENKINS-4192] in 1.320. The core wasn't setting the workspace for MavenBuild, leaving it empty.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in hudson User: : kohsuke Path: trunk/hudson/main/core/src/main/java/hudson/model/AbstractBuild.java trunk/hudson/main/maven-plugin/src/main/java/hudson/maven/MavenBuild.java trunk/hudson/main/maven-plugin/src/main/java/hudson/maven/MavenModuleSetBuild.java trunk/hudson/main/test/src/test/resources/hudson/maven/ JENKINS-4192 .zip trunk/hudson/main/test/src/test/resources/hudson/maven/MavenBuildTest.java trunk/www/changelog.html http://fisheye4.cenqua.com/changelog/hudson/?cs=20635 Log: [FIXED JENKINS-4192] in 1.320. The core wasn't setting the workspace for MavenBuild, leaving it empty.
            Hide
            kohsuke Kohsuke Kawaguchi added a comment -
                • Issue 4187 has been marked as a duplicate of this issue. ***
            Show
            kohsuke Kohsuke Kawaguchi added a comment - Issue 4187 has been marked as a duplicate of this issue. ***

              People

              Assignee:
              kohsuke Kohsuke Kawaguchi
              Reporter:
              mdsteele mdsteele
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: