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

NPE when building Maven project

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Blocker
    • Resolution: Fixed
    • Component/s: maven-plugin
    • Labels:
      None
    • Environment:
      Platform: All, OS: Windows XP
    • Similar Issues:

      Description

      We are currently using Hudson version 1.319 to build our Maven projects. This
      is the latest up date and before this update was applied our builds were
      completing without a problem. Since updating, we get broken builds quite
      regularly and the console log reports the following:

      Started by upstream project "<our project name>" build number 238
      Building on master
      FATAL: null
      java.lang.NullPointerException
      at hudson.maven.MavenBuild$RunnerImpl.decideWorkspace
      (MavenBuild.java:481)
      at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:334)
      at hudson.model.Run.run(Run.java:1090)
      at hudson.maven.MavenBuild.run(MavenBuild.java:207)
      at hudson.model.ResourceController.execute(ResourceController.java:93)
      at hudson.model.Executor.run(Executor.java:122)

      We are using Maven 2.1.0. The system properties as reported by Hudson are:

      awt.toolkit sun.awt.windows.WToolkit
      executable-war C:\Program Files\Hudson\hudson.war
      file.encoding Cp1252
      file.encoding.pkg sun.io
      file.separator \
      hudson.diyChunking true
      java.awt.graphicsenv sun.awt.Win32GraphicsEnvironment
      java.awt.headless true
      java.awt.printerjob sun.awt.windows.WPrinterJob
      java.class.path hudson.war
      java.class.version 50.0
      java.endorsed.dirs C:\Program Files\Java\jre6\lib\endorsed
      java.ext.dirs C:\Program Files\Java\jre6\lib\ext;C:\WINDOWS\Sun\Java\lib\ext
      java.home C:\Program Files\Java\jre6
      java.io.tmpdir C:\DOCUME~1\DEVSER~1\LOCALS~1\Temp\
      java.library.path
      C:\WINDOWS\system32;.;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\
      PHP\;C:\Program Files\Windows Resource Kits\Tools\;C:\oracle\product\10.2.0\db_1
      \bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program
      Files\Microsoft SQL Server\80\Tools\Binn\;C:\Program Files\Borland\StarTeam SDK
      2005 R2\Lib;C:\Program Files\Borland\StarTeam SDK 2005 R2
      \Bin;C:\www\openssl\bin;C:\www\Apache22\bin;C:\www\php5;C:\www\mysql5
      \bin;C:\www\perl\bin;C:\www\tomcat5\bin;C:\PHP;C:\Program Files\Common
      Files\GTK\2.0\bin;C:\Maven\apache-maven-2.2.0\bin;C:\Program
      Files\NSIS;C:\Program Files\exe4j\bin;C:\Program Files\SlikSvn\bin\;C:\Program
      Files\TortoiseSVN\bin;C:\Program Files\MySQL\MySQL Server 5.0\bin
      java.runtime.name Java(TM) SE Runtime Environment
      java.runtime.version 1.6.0_12-b04
      java.specification.name Java Platform API Specification
      java.specification.vendor Sun Microsystems Inc.
      java.specification.version 1.6
      java.vendor Sun Microsystems Inc.
      java.vendor.url http://java.sun.com/
      java.vendor.url.bug http://java.sun.com/cgi-bin/bugreport.cgi
      java.version 1.6.0_12
      java.vm.info mixed mode, sharing
      java.vm.name Java HotSpot(TM) Client VM
      java.vm.specification.name Java Virtual Machine Specification
      java.vm.specification.vendor Sun Microsystems Inc.
      java.vm.specification.version 1.0
      java.vm.vendor Sun Microsystems Inc.
      java.vm.version 11.2-b01
      line.separator
      os.arch x86
      os.name Windows XP
      os.version 5.1
      path.separator ;
      sun.arch.data.model 32
      sun.boot.class.path C:\Program Files\Java\jre6\lib\resources.jar;C:\Program
      Files\Java\jre6\lib\rt.jar;C:\Program Files\Java\jre6
      \lib\sunrsasign.jar;C:\Program Files\Java\jre6\lib\jsse.jar;C:\Program
      Files\Java\jre6\lib\jce.jar;C:\Program Files\Java\jre6
      \lib\charsets.jar;C:\Program Files\Java\jre6\classes
      sun.boot.library.path C:\Program Files\Java\jre6\bin
      sun.cpu.endian little
      sun.cpu.isalist
      sun.desktop windows
      sun.io.unicode.encoding UnicodeLittle
      sun.java.launcher SUN_STANDARD
      sun.jnu.encoding Cp1252
      sun.management.compiler HotSpot Client Compiler
      sun.os.patch.level Service Pack 3
      svnkit.ssh2.persistent false
      user.country US
      user.dir C:\Program Files\Hudson
      user.home C:\Documents and Settings\DEVSERVER
      user.language en
      user.name DEVSERVER
      user.timezone Europe/Berlin
      user.variant

        Attachments

          Activity

          Hide
          abayer Andrew Bayer added a comment -

          I believe this is probably fixed in 1.320 - I know kohsuke has resolved a number
          of workspace-allocation related issues there.

          Show
          abayer Andrew Bayer added a comment - I believe this is probably fixed in 1.320 - I know kohsuke has resolved a number of workspace-allocation related issues there.
          Hide
          steve_chamberlain steve_chamberlain added a comment -

          Thanks for the advice. I upgraded our installation to 1.320 and it seems a bit
          more stable, but still 1/3 of the time we get the NPE and a broken build report.

          Show
          steve_chamberlain steve_chamberlain added a comment - Thanks for the advice. I upgraded our installation to 1.320 and it seems a bit more stable, but still 1/3 of the time we get the NPE and a broken build report.
          Hide
          mrtsmith mrtsmith added a comment -

          I have the same problem. The build seems to run successfully through the modules
          of my maven build and then when the build is concluding various modules are
          "red" with the same error stacktrace as reported.

          We are using Maven 2.1.0, Ubuntu 8.04, Java 5

          Show
          mrtsmith mrtsmith added a comment - I have the same problem. The build seems to run successfully through the modules of my maven build and then when the build is concluding various modules are "red" with the same error stacktrace as reported. We are using Maven 2.1.0, Ubuntu 8.04, Java 5
          Hide
          mrtsmith mrtsmith added a comment -

          I forgot to mention that I was using Hudson 1.321.

          I have rolled-back to 1.318 and the builds are back to normal. So it seems to be
          a recent change that has introduced this issue?

          Show
          mrtsmith mrtsmith added a comment - I forgot to mention that I was using Hudson 1.321. I have rolled-back to 1.318 and the builds are back to normal. So it seems to be a recent change that has introduced this issue?
          Hide
          steve_chamberlain steve_chamberlain added a comment -

          Is there an easy way to role back to a previous installation? I always use the
          upgrade options in the Hudson web UI.

          I am also considering rolling back until this issue is solved, as its starting
          to get in the way of our productivity. I would prefer not to have to reinstall
          the software, but perhaps I have no choice...

          Show
          steve_chamberlain steve_chamberlain added a comment - Is there an easy way to role back to a previous installation? I always use the upgrade options in the Hudson web UI. I am also considering rolling back until this issue is solved, as its starting to get in the way of our productivity. I would prefer not to have to reinstall the software, but perhaps I have no choice...
          Hide
          stigkj Stig Kleppe-Jørgensen added a comment -

          Created an attachment (id=922)
          Patch to fix this issue

          Show
          stigkj Stig Kleppe-Jørgensen added a comment - Created an attachment (id=922) Patch to fix this issue
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in hudson
          User: : kohsuke
          Path:
          trunk/hudson/main/maven-plugin/src/main/java/hudson/maven/MavenBuild.java
          trunk/hudson/main/test/pom.xml
          trunk/hudson/main/test/src/test/java/hudson/maven/MavenBuildTest.java
          trunk/www/changelog.html
          http://fisheye4.cenqua.com/changelog/hudson/?cs=21999
          Log:
          [FIXED JENKINS-4226] Applied the patch and added a test case. This fix will be in 1.325.
          I also added subversion.hpi in the dependency of the test-harness so that we can use Subversion check out for tests. I was afraid of a circular dependency problem when building the subversion plugin, but apparently Maven handles it gracefully.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in hudson User: : kohsuke Path: trunk/hudson/main/maven-plugin/src/main/java/hudson/maven/MavenBuild.java trunk/hudson/main/test/pom.xml trunk/hudson/main/test/src/test/java/hudson/maven/MavenBuildTest.java trunk/www/changelog.html http://fisheye4.cenqua.com/changelog/hudson/?cs=21999 Log: [FIXED JENKINS-4226] Applied the patch and added a test case. This fix will be in 1.325. I also added subversion.hpi in the dependency of the test-harness so that we can use Subversion check out for tests. I was afraid of a circular dependency problem when building the subversion plugin, but apparently Maven handles it gracefully.

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            steve_chamberlain steve_chamberlain
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: