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

NullPointerException during polling when using git inverse branch choosing strategy

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Component/s: git-plugin
    • Labels:
      None
    • Similar Issues:

      Description

      When using the git inverse branch choosing strategy (to exclude named branches) and polling a git repo, I see the following NullPointerException in the Git Polling Log:

      Mar 04, 2014 3:24:29 PM hudson.triggers.SCMTrigger$Runner runPolling
      SEVERE: Failed to record SCM polling for hudson.model.FreeStyleProject@4c06e5bd[job-name]
      java.lang.NullPointerException
              at hudson.plugins.git.util.InverseBuildChooser.getCandidateRevisions(InverseBuildChooser.java:45)
              at hudson.plugins.git.GitSCM.compareRemoteRevisionWithImpl(GitSCM.java:536)
              at hudson.plugins.git.GitSCM.compareRemoteRevisionWith(GitSCM.java:455)
              at hudson.scm.SCM._compareRemoteRevisionWith(SCM.java:356)
              at hudson.scm.SCM.poll(SCM.java:373)
              at hudson.model.AbstractProject.pollWithWorkspace(AbstractProject.java:1605)
              at hudson.model.AbstractProject._poll(AbstractProject.java:1575)
              at hudson.model.AbstractProject.poll(AbstractProject.java:1493)
              at hudson.triggers.SCMTrigger$Runner.runPolling(SCMTrigger.java:462)
              at hudson.triggers.SCMTrigger$Runner.run(SCMTrigger.java:491)
              at hudson.util.SequentialExecutionQueue$QueueEntry.run(SequentialExecutionQueue.java:118)
              at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
              at java.util.concurrent.FutureTask.run(FutureTask.java:262)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
              at java.lang.Thread.run(Thread.java:744)
      

      The project config is attached to this ticket:

      Unable to embed resource: config.xml of type application/xml

      I believe the cause is git plugin revision 4fc7f44. This NPE occurs in version 2.0.3 of the plugin but does not in version 2.0.1. (I have not tested 2.0.2, but I suspect it behaves the same as 2.0.3.)

      A possible workaround is to enable the "Force polling with workspace" option (see JENKINS-21264), but I have not confirmed if this works.

      Proposed fix in GitHub pull request #208.

        Attachments

          Activity

            People

            • Assignee:
              ndeloof Nicolas De Loof
              Reporter:
              samumbach Sam Umbach
            • Votes:
              2 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: