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

NullPointerException during polling when using git inverse branch choosing strategy

    XMLWordPrintable

    Details

    • 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

          Hide
          markewaite Mark Waite added a comment -

          Fixed in git-plugin 2.2.1 released 12 Apr 2014

          Show
          markewaite Mark Waite added a comment - Fixed in git-plugin 2.2.1 released 12 Apr 2014
          Hide
          jperry Jay Perry added a comment -

          I currently running into this

          Started on Dec 22, 2014 12:59:00 PM
          Using strategy: Inverse
          [poll] Last Built Revision: Revision 87279712b25ea4b4fdefc47021c16f3a5108b448 (refs/remotes/origin/master)
          using GIT_SSH to set credentials 
           > git ls-remote -h git@bitbucket.org:company/myapp.git master # timeout=10
          FATAL: hudson.plugins.git.GitException: Error performing command: git ls-remote -h git@bitbucket.org:company/myapp.git master
          hudson.util.IOException2: hudson.plugins.git.GitException: Error performing command: git ls-remote -h git@bitbucket.org:company/myapp.git master
          	at hudson.plugins.git.GitSCM.compareRemoteRevisionWith(GitSCM.java:518)
          	at hudson.scm.SCM.compareRemoteRevisionWith(SCM.java:384)
          	at hudson.scm.SCM.poll(SCM.java:401)
          	at hudson.model.AbstractProject._poll(AbstractProject.java:1429)
          

          I am using Jenkins 1.580.1 and git plugin 2.3.2. I do not get this when running master as it only happens with the Inverse setting. Please help as it prevents my builds from running. Thanks in advance.

          Show
          jperry Jay Perry added a comment - I currently running into this Started on Dec 22, 2014 12:59:00 PM Using strategy: Inverse [poll] Last Built Revision: Revision 87279712b25ea4b4fdefc47021c16f3a5108b448 (refs/remotes/origin/master) using GIT_SSH to set credentials > git ls-remote -h git@bitbucket.org:company/myapp.git master # timeout=10 FATAL: hudson.plugins.git.GitException: Error performing command: git ls-remote -h git@bitbucket.org:company/myapp.git master hudson.util.IOException2: hudson.plugins.git.GitException: Error performing command: git ls-remote -h git@bitbucket.org:company/myapp.git master at hudson.plugins.git.GitSCM.compareRemoteRevisionWith(GitSCM.java:518) at hudson.scm.SCM.compareRemoteRevisionWith(SCM.java:384) at hudson.scm.SCM.poll(SCM.java:401) at hudson.model.AbstractProject._poll(AbstractProject.java:1429) I am using Jenkins 1.580.1 and git plugin 2.3.2. I do not get this when running master as it only happens with the Inverse setting. Please help as it prevents my builds from running. Thanks in advance.
          Hide
          jperry Jay Perry added a comment -

          git client plugin is 1.13.0 too

          Show
          jperry Jay Perry added a comment - git client plugin is 1.13.0 too
          Hide
          markewaite Mark Waite added a comment -

          Jay Perry that is not a null pointer exception, so I think it belongs somewhere other than attached to this closed bug. I'd first suggest that you ask the Jenkins user mailing list for help. If they are unable to help, then you'll need to submit a new bug report. You might also try using https to access your bitbucket repository rather than ssh. There has been at least one case where a private bitbucket repository is accessible from the plugin by one protocol and not by another.

          Show
          markewaite Mark Waite added a comment - Jay Perry that is not a null pointer exception, so I think it belongs somewhere other than attached to this closed bug. I'd first suggest that you ask the Jenkins user mailing list for help. If they are unable to help, then you'll need to submit a new bug report. You might also try using https to access your bitbucket repository rather than ssh. There has been at least one case where a private bitbucket repository is accessible from the plugin by one protocol and not by another.
          Hide
          jperry Jay Perry added a comment -

          Thanks Mark. I'll try the mailing list.

          Show
          jperry Jay Perry added a comment - Thanks Mark. I'll try the mailing list.

            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: