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

Having no previous build causes the build to fail with a NullPointerException

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • tfs-plugin
    • None

      If you have no immediately previous build (it has been deleted) then a new build will fail with the following error:

      FATAL: null
      java.lang.NullPointerException
      at hudson.plugins.tfs.util.BuildWorkspaceConfigurationRetriever.getLatestForNode(BuildWorkspaceConfigurationRetriever.java:25)
      at hudson.plugins.tfs.TeamFoundationServerScm.checkout(TeamFoundationServerScm.java:155)
      at hudson.model.AbstractProject.checkout(AbstractProject.java:1104)
      at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:479)
      at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:411)
      at hudson.model.Run.run(Run.java:1280)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
      at hudson.model.ResourceController.execute(ResourceController.java:88)
      at hudson.model.Executor.run(Executor.java:139)

      To reproduce:

      1) Do a build
      2) Delete this build
      3) Do another build
      4) This build will immediately fail with the previous error.

            redsolo redsolo
            jsoet jsoet
            Votes:
            4 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: