• Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • core
    • None
    • Platform: All, OS: Linux

      I wanted to make a New Job with similar settings to an existing one, so I used
      the "Copy existing job" and changed the settings for the new job.

      Trying to build this new project made Hudson fail with a NullPointerException
      when trying to find the root module.

      Looking in the config.xml file, I see that it still refers to the old project in
      the <rootModule> element. This doesn't appear anywhere on the web config page.

          [JENKINS-588] Copying a job doesn't update rootModule

          I think I fixed this in 1.110, but it's not obvious to me why the scenario you
          explained to me would cause your problem.

          If you could check the latest snapshot, that would be great. Or if you have the
          complete stack trace of NPE, that would be also very helpful.

          Kohsuke Kawaguchi added a comment - I think I fixed this in 1.110, but it's not obvious to me why the scenario you explained to me would cause your problem. If you could check the latest snapshot, that would be great. Or if you have the complete stack trace of NPE, that would be also very helpful.

          tal added a comment -

          I've just upgraded to 109 (but not trunk) and reproduced it:

          1. I created a new job.
          2. I used the Copy feature to copy an existing one (I'm trying to break a large
          build into smaller sub-modules).
          3. I edited the remote svnroot to the new location (sub-directory) and changed
          the root pom to 'pom.xml'.
          4. Saved.

          At this point, Hudson tried to check out everything from the old svn location. I
          did "Reload Configuration from Disk" (even though I hadn't edited anything
          manually) and started the build again and this time it got it from the right place.

          After checking it all out and listing the maven sub-modules correctly, the
          console output page showed this error:

          ERROR: Processing failed due to a bug in the code. Please report thus to
          users@hudson.dev.java.net
          java.lang.NullPointerException
          at hudson.maven.MavenModuleSetBuild$RunnerImpl.doRun(MavenModuleSetBuild.java:230)
          at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:127)
          at hudson.model.Run.run(Run.java:559)
          at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:132)
          at hudson.model.Executor.run(Executor.java:59)
          FATAL: null
          java.lang.NullPointerException
          at hudson.maven.MavenModuleSetBuild$RunnerImpl.doRun(MavenModuleSetBuild.java:230)
          at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:127)
          at hudson.model.Run.run(Run.java:559)
          at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:132)
          at hudson.model.Executor.run(Executor.java:59)

          The config.xml has:

          <rootModule>
          <groupId>org.gria</groupId>
          <artifactId>base</artifactId>
          </rootModule>

          This is the root of the job I copied, not the new one.

          tal added a comment - I've just upgraded to 109 (but not trunk) and reproduced it: 1. I created a new job. 2. I used the Copy feature to copy an existing one (I'm trying to break a large build into smaller sub-modules). 3. I edited the remote svnroot to the new location (sub-directory) and changed the root pom to 'pom.xml'. 4. Saved. At this point, Hudson tried to check out everything from the old svn location. I did "Reload Configuration from Disk" (even though I hadn't edited anything manually) and started the build again and this time it got it from the right place. After checking it all out and listing the maven sub-modules correctly, the console output page showed this error: ERROR: Processing failed due to a bug in the code. Please report thus to users@hudson.dev.java.net java.lang.NullPointerException at hudson.maven.MavenModuleSetBuild$RunnerImpl.doRun(MavenModuleSetBuild.java:230) at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:127) at hudson.model.Run.run(Run.java:559) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:132) at hudson.model.Executor.run(Executor.java:59) FATAL: null java.lang.NullPointerException at hudson.maven.MavenModuleSetBuild$RunnerImpl.doRun(MavenModuleSetBuild.java:230) at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:127) at hudson.model.Run.run(Run.java:559) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:132) at hudson.model.Executor.run(Executor.java:59) The config.xml has: <rootModule> <groupId>org.gria</groupId> <artifactId>base</artifactId> </rootModule> This is the root of the job I copied, not the new one.

          tal added a comment -

          I still get the same problem with 115.

          The job's config.xml says:

          <rootModule>
          <groupId>...old group...</groupId>
          <artifactId>...old artifact ID...</artifactId>
          </rootModule>

          When I try to build, I get:

          Parsing POMs
          ERROR: Processing failed due to a bug in the code. Please report thus to
          users@hudson.dev.java.net
          java.lang.NullPointerException
          at hudson.maven.MavenModuleSetBuild$RunnerImpl.doRun(MavenModuleSetBuild.java:231)
          at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:127)
          at hudson.model.Run.run(Run.java:562)
          at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:133)
          at hudson.model.Executor.run(Executor.java:59)
          FATAL: null
          java.lang.NullPointerException
          at hudson.maven.MavenModuleSetBuild$RunnerImpl.doRun(MavenModuleSetBuild.java:231)
          at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:127)
          at hudson.model.Run.run(Run.java:562)
          at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:133)
          at hudson.model.Executor.run(Executor.java:59)

          tal added a comment - I still get the same problem with 115. The job's config.xml says: <rootModule> <groupId>...old group...</groupId> <artifactId>...old artifact ID...</artifactId> </rootModule> When I try to build, I get: Parsing POMs ERROR: Processing failed due to a bug in the code. Please report thus to users@hudson.dev.java.net java.lang.NullPointerException at hudson.maven.MavenModuleSetBuild$RunnerImpl.doRun(MavenModuleSetBuild.java:231) at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:127) at hudson.model.Run.run(Run.java:562) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:133) at hudson.model.Executor.run(Executor.java:59) FATAL: null java.lang.NullPointerException at hudson.maven.MavenModuleSetBuild$RunnerImpl.doRun(MavenModuleSetBuild.java:231) at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:127) at hudson.model.Run.run(Run.java:562) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:133) at hudson.model.Executor.run(Executor.java:59)

          Should be fixed for 1.117. If you can try the latest snapshot, that would be great.

          Kohsuke Kawaguchi added a comment - Should be fixed for 1.117. If you can try the latest snapshot, that would be great.

            Unassigned Unassigned
            tal tal
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: