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

Maven2/3 job fails with NullPointerException while parsing module structure

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • Windows XP Professional, Jenkins 1.437, Java JRE 1.6.0_26-b03, PTC Integrity Plugin 1.11

      I am trying to build a maven2 software project as a maven2/3 job. The configuration option "Incremental build - only build changed modules" is checked.

      However, if updates during the SCM checkout (using PTC Integrity Plugin) are detected, the build fails with a NPE (if there aren't any pending changes in the SCM the build runs successfully):

      Change Log: http://xyz:7777/job/maven_project_testbed/6/changes
      Build Log: http://xyz:7777/job/maven_project_testbed/6/console
      Preparing to execute si projectinfo for #p=xxx
      Preparing to execute si viewproject for #p=xxx
      Checkout directory is D:\runtime\jenkins\jobs\maven_project_testbed\workspace
      Successfully updated workspace with 1 updates and cleaned up 0 files!
      Saving current Integrity Project configuration...
      API Response for si viewproject successfully saved to file!
      Successfully saved current Integrity Project configuration to D:\runtime\jenkins\jobs\maven_project_testbed\builds\2011-11-16_11-01-33\viewproject.dat
      Writing build change log...
      Change log successfully generated: D:\runtime\jenkins\jobs\maven_project_testbed\builds\2011-11-16_11-01-33\changelog.xml
      Parsing POMs
      ERROR: Processing failed due to a bug in the code. Please report this to jenkinsci-users@googlegroups.com
      java.lang.NullPointerException
      at hudson.maven.MavenModuleSetBuild$1.isDescendantOf(MavenModuleSetBuild.java:238)
      at hudson.maven.MavenModuleSetBuild$1.<init>(MavenModuleSetBuild.java:208)
      at hudson.maven.MavenModuleSetBuild.getChangeSetFor(MavenModuleSetBuild.java:201)
      at hudson.maven.MavenModuleSetBuild$RunnerImpl.doRun(MavenModuleSetBuild.java:664)
      at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:460)
      at hudson.model.Run.run(Run.java:1404)
      at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:470)
      at hudson.model.ResourceController.execute(ResourceController.java:88)
      at hudson.model.Executor.run(Executor.java:230)
      project=hudson.maven.MavenModuleSet@1a76feb[maven_project_testbed]
      project.getModules()=[hudson.maven.MavenModule@12644c9[maven_project_testbed/buildtestbed:buildtestbed.bundleset.1][maven_project_testbed/buildtestbed:buildtestbed.bundleset.1][relativePath:src/bundleset.1], hudson.maven.MavenModule@257989[maven_project_testbed/buildtestbed:buildtestbed.bundleset.2][maven_project_testbed/buildtestbed:buildtestbed.bundleset.2][relativePath:src/bundleset.2], hudson.maven.MavenModule@1f061fe[maven_project_testbed/buildtestbed:buildtestbed.bundleset.3][maven_project_testbed/buildtestbed:buildtestbed.bundleset.3][relativePath:src/bundleset.3], hudson.maven.MavenModule@1e0565b[maven_project_testbed/buildtestbed:bundlesets][maven_project_testbed/buildtestbed:bundlesets][relativePath:src], hudson.maven.MavenModule@639073[maven_project_testbed/buildtestbed:bundlesets-parent][maven_project_testbed/buildtestbed:bundlesets-parent][relativePath:], hudson.maven.MavenModule@8f9eac[maven_project_testbed/buildtestbed.bundleset.1:bundle.a][maven_project_testbed/buildtestbed.bundleset.1:bundle.a][relativePath:src/bundleset.1/bundle.a], hudson.maven.MavenModule@80a7b7[maven_project_testbed/buildtestbed.bundleset.1:bundle.b][maven_project_testbed/buildtestbed.bundleset.1:bundle.b][relativePath:src/bundleset.1/bundle.b], hudson.maven.MavenModule@d5ae35[maven_project_testbed/buildtestbed.bundleset.1:bundle.c][maven_project_testbed/buildtestbed.bundleset.1:bundle.c][relativePath:src/bundleset.1/bundle.c], hudson.maven.MavenModule@1da552f[maven_project_testbed/buildtestbed.bundleset.1:bundle.d][maven_project_testbed/buildtestbed.bundleset.1:bundle.d][relativePath:src/bundleset.1/bundle.d], hudson.maven.MavenModule@86610[maven_project_testbed/buildtestbed.bundleset.2:bundle.w][maven_project_testbed/buildtestbed.bundleset.2:bundle.w][relativePath:src/bundleset.2/bundle.w], hudson.maven.MavenModule@38ce9c[maven_project_testbed/buildtestbed.bundleset.2:bundle.x][maven_project_testbed/buildtestbed.bundleset.2:bundle.x][relativePath:src/bundleset.2/bundle.x], hudson.maven.MavenModule@b70825[maven_project_testbed/buildtestbed.bundleset.2:bundle.y][maven_project_testbed/buildtestbed.bundleset.2:bundle.y][relativePath:src/bundleset.2/bundle.y], hudson.maven.MavenModule@191adb8[maven_project_testbed/buildtestbed.bundleset.2:bundle.z][maven_project_testbed/buildtestbed.bundleset.2:bundle.z][relativePath:src/bundleset.2/bundle.z], hudson.maven.MavenModule@11052[maven_project_testbed/buildtestbed.bundleset.3:bundle.h][maven_project_testbed/buildtestbed.bundleset.3:bundle.h][relativePath:src/bundleset.3/bundle.h]]
      project.getRootModule()=hudson.maven.MavenModule@639073[maven_project_testbed/buildtestbed:bundlesets-parent][maven_project_testbed/buildtestbed:bundlesets-parent][relativePath:]
      FATAL: null
      java.lang.NullPointerException
      at hudson.maven.MavenModuleSetBuild$1.isDescendantOf(MavenModuleSetBuild.java:238)
      at hudson.maven.MavenModuleSetBuild$1.<init>(MavenModuleSetBuild.java:208)
      at hudson.maven.MavenModuleSetBuild.getChangeSetFor(MavenModuleSetBuild.java:201)
      at hudson.maven.MavenModuleSetBuild$RunnerImpl.doRun(MavenModuleSetBuild.java:664)
      at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:460)
      at hudson.model.Run.run(Run.java:1404)
      at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:470)
      at hudson.model.ResourceController.execute(ResourceController.java:88)
      at hudson.model.Executor.run(Executor.java:230)

      Furthermore, after setting up the job in jenkins, the page /people/ isn't reachable anymore:
      java.lang.NullPointerException
      at hudson.maven.MavenModuleSetBuild$1.isDescendantOf(MavenModuleSetBuild.java:238)
      at hudson.maven.MavenModuleSetBuild$1.(MavenModuleSetBuild.java:208)
      at hudson.maven.MavenModuleSetBuild.getChangeSetFor(MavenModuleSetBuild.java:201)
      at hudson.maven.FilteredChangeLogSet.(FilteredChangeLogSet.java:51)
      at hudson.maven.MavenBuild.getChangeSet(MavenBuild.java:181)
      at hudson.model.View$People.getUserInfo(View.java:623)
      at hudson.model.View$People.(View.java:601)
      at jenkins.model.Jenkins.getPeople(Jenkins.java:929)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:282)
      at org.kohsuke.stapler.MetaClass$4.doDispatch(MetaClass.java:196)
      at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
      at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:561)
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:646)
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:477)
      at org.kohsuke.stapler.Stapler.service(Stapler.java:159)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:45)
      at winstone.ServletConfiguration.execute(ServletConfiguration.java:249)
      at winstone.RequestDispatcher.forward(RequestDispatcher.java:335)
      at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:378)
      at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:95)
      at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:185)
      at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:159)
      at net.bull.javamelody.PluginMonitoringFilter.doFilter(PluginMonitoringFilter.java:86)
      at org.jvnet.hudson.plugins.monitoring.HudsonMonitoringFilter.doFilter(HudsonMonitoringFilter.java:84)
      at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:98)
      at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:87)
      at winstone.FilterConfiguration.execute(FilterConfiguration.java:195)
      at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:368)
      at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:47)
      at winstone.FilterConfiguration.execute(FilterConfiguration.java:195)
      at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:368)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
      at hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:166)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      at org.acegisecurity.ui.basicauth.BasicProcessingFilter.doFilter(BasicProcessingFilter.java:173)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      at jenkins.security.ApiTokenFilter.doFilter(ApiTokenFilter.java:61)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
      at hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:66)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:76)
      at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:164)
      at winstone.FilterConfiguration.execute(FilterConfiguration.java:195)
      at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:368)
      at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:81)
      at winstone.FilterConfiguration.execute(FilterConfiguration.java:195)
      at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:368)
      at winstone.RequestDispatcher.forward(RequestDispatcher.java:333)
      at winstone.RequestHandlerThread.processRequest(RequestHandlerThread.java:244)
      at winstone.RequestHandlerThread.run(RequestHandlerThread.java:150)
      at java.lang.Thread.run(Unknown Source)

      I attached the file buildtestbed.zip, which contains a sample environment of my pom structure which I used to produce this error.

            cdsouza Cletus D'Souza
            hmense Holger Mense
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: