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

NPE during Surefire execution of a Maven project without any tests

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Major Major
    • maven-plugin
    • None
    • Hudson 1.338, Solaris 10 SPARC, Sun JVM 1.6.0_16

      After upgrading Hudson to 1.338 we got an NPE while Surefire is executing a Maven project with no tests:

      [INFO] ------------------------------------------------------------------------
      [INFO] Building VK Backend: ZGS Mock Admin
      [INFO]    task-segment: [clean, install]
      [INFO] ------------------------------------------------------------------------
      [INFO] [clean:clean {execution: default-clean}]
      [INFO] [enforcer:enforce {execution: Enforcing build rules}]
      [INFO] [resources:resources {execution: default-resources}]
      [INFO] Using 'ISO-8859-1' encoding to copy filtered resources.
      [INFO] Copying 0 resource
      [INFO] [compiler:compile {execution: default-compile}]
      [INFO] Compiling 1 source file to /data/cibuild/hudson/slaves/slave1/workspace/VK-All-CI/trunk/backend/zgsmockadmin/target/classes
      [INFO] [resources:testResources {execution: default-testResources}]
      [INFO] Using 'ISO-8859-1' encoding to copy filtered resources.
      [INFO] Copying 0 resource
      [INFO] [compiler:testCompile {execution: default-testCompile}]
      [INFO] Nothing to compile - all classes are up to date
      [INFO] [surefire:test {execution: default-test}]
      [INFO] Surefire report directory: /data/cibuild/hudson/slaves/slave1/workspace/VK-All-CI/trunk/backend/zgsmockadmin/target/surefire-reports
      ERROR: Processing failed due to a bug in the code. Please report this to users@hudson.dev.java.net
      java.lang.NullPointerException
      	at hudson.model.listeners.RunListener.all(RunListener.java:167)
      	at hudson.model.listeners.RunListener.fireFinalized(RunListener.java:147)
      	at hudson.model.Run.onEndBuilding(Run.java:1301)
      	at hudson.model.Run.run(Run.java:1249)
      	at hudson.maven.MavenBuild.access$600(MavenBuild.java:71)
      	at hudson.maven.MavenBuild$ProxyImpl2.close(MavenBuild.java:453)
      	at hudson.maven.MavenModuleSetBuild$Builder.end(MavenModuleSetBuild.java:681)
      	at hudson.maven.MavenModuleSetBuild$RunnerImpl.doRun(MavenModuleSetBuild.java:482)
      	at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:417)
      	at hudson.model.Run.run(Run.java:1179)
      	at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:304)
      	at hudson.model.ResourceController.execute(ResourceController.java:88)
      	at hudson.model.Executor.run(Executor.java:122)
      FATAL: null
      java.lang.NullPointerException
      	at hudson.model.AbstractItem.getFullName(AbstractItem.java:126)
      	at hudson.model.AbstractItem.toString(AbstractItem.java:284)
      	at java.lang.String.valueOf(String.java:2826)
      	at java.lang.StringBuilder.append(StringBuilder.java:115)
      	at hudson.maven.MavenModuleSetBuild$RunnerImpl.doRun(MavenModuleSetBuild.java:519)
      	at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:417)
      	at hudson.model.Run.run(Run.java:1179)
      	at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:304)
      	at hudson.model.ResourceController.execute(ResourceController.java:88)
      	at hudson.model.Executor.run(Executor.java:122)
      

      We did no changes to the Hudson configuration. We can't see any related errors in any of Hudsons log files. So no OOM exceptions.

      The jobs MAVEN_OPTS are set to -Xmx1g -XX:MaxPermSize=128m and the jobs is always starting with an empty workspace.

            kutzi kutzi
            tjuerge tjuerge
            Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: