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

NullPointerException with jgit on Git Plugin 2.0 beta

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • git-plugin
    • 64 bit Debian Linux "testing" running Jenkins 1.509.2 in winstone container running on Oracle JDK 7

      Steps I used to see the issue:

      • installed Git Client plugin 1.1.1 and restarted Jenkins
      • downloaded and installed Git Plugin 2.0 beta and restarted Jenkins
      • executed several successful builds without changing configurations
      • confirmed those builds were correctly responding to build hooks
      • use configuration page to delete git as executable, add jgit
      • submitted another change to git repository, watched hooks activate

      No build from Jenkins, and a null pointer exception is in the log file.

      SEVERE: Failed to record SCM polling for hudson.model.FreeStyleProject@21d1ff77[p4-port-linux-Merge]
      java.lang.NullPointerException
      at org.jenkinsci.plugins.gitclient.trilead.TrileadSessionFactory.getSession(TrileadSessionFactory.java:34)
      at org.eclipse.jgit.transport.SshTransport.getSession(SshTransport.java:121)
      at org.eclipse.jgit.transport.TransportGitSsh$SshFetchConnection.<init>(TransportGitSsh.java:248)
      at org.eclipse.jgit.transport.TransportGitSsh.openFetch(TransportGitSsh.java:147)
      at org.eclipse.jgit.transport.FetchProcess.executeImp(FetchProcess.java:136)
      at org.eclipse.jgit.transport.FetchProcess.execute(FetchProcess.java:122)
      at org.eclipse.jgit.transport.Transport.fetch(Transport.java:1105)
      at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:128)
      at org.jenkinsci.plugins.gitclient.JGitAPIImpl.fetch(JGitAPIImpl.java:299)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:606)
      at hudson.remoting.RemoteInvocationHandler$RPCRequest.perform(RemoteInvocationHandler.java:275)
      at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:256)
      at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:215)
      at hudson.remoting.UserRequest.perform(UserRequest.java:118)
      at hudson.remoting.UserRequest.perform(UserRequest.java:48)
      at hudson.remoting.Request$2.run(Request.java:326)
      at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
      at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
      at java.util.concurrent.FutureTask.run(FutureTask.java:166)
      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:724)

          [JENKINS-18957] NullPointerException with jgit on Git Plugin 2.0 beta

          Mark Waite created issue -

          Mark Waite added a comment -

          If I click the "Build Now" button on that job, it reports the null pointer exception:

          Started by user anonymous
          Building remotely on fc-nagios-a in workspace /var/lib/jenkins/mwaite6-slave/workspace/p4-port-linux-Merge
          selected Git installation does not exists. Using Default
          Fetching changes from the remote Git repository
          FATAL: null
          java.lang.NullPointerException
          at org.jenkinsci.plugins.gitclient.trilead.TrileadSessionFactory.getSession(TrileadSessionFactory.java:34)
          at org.eclipse.jgit.transport.SshTransport.getSession(SshTransport.java:121)
          at org.eclipse.jgit.transport.TransportGitSsh$SshFetchConnection.<init>(TransportGitSsh.java:248)
          at org.eclipse.jgit.transport.TransportGitSsh.openFetch(TransportGitSsh.java:147)
          at org.eclipse.jgit.transport.FetchProcess.executeImp(FetchProcess.java:136)
          at org.eclipse.jgit.transport.FetchProcess.execute(FetchProcess.java:122)
          at org.eclipse.jgit.transport.Transport.fetch(Transport.java:1105)
          at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:128)
          at org.jenkinsci.plugins.gitclient.JGitAPIImpl.fetch(JGitAPIImpl.java:299)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke(Method.java:606)
          at hudson.remoting.RemoteInvocationHandler$RPCRequest.perform(RemoteInvocationHandler.java:275)
          at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:256)
          at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:215)
          at hudson.remoting.UserRequest.perform(UserRequest.java:118)
          at hudson.remoting.UserRequest.perform(UserRequest.java:48)
          at hudson.remoting.Request$2.run(Request.java:326)
          at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
          at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
          at java.util.concurrent.FutureTask.run(FutureTask.java:166)
          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:724)

          Mark Waite added a comment - If I click the "Build Now" button on that job, it reports the null pointer exception: Started by user anonymous Building remotely on fc-nagios-a in workspace /var/lib/jenkins/mwaite6-slave/workspace/p4-port-linux-Merge selected Git installation does not exists. Using Default Fetching changes from the remote Git repository FATAL: null java.lang.NullPointerException at org.jenkinsci.plugins.gitclient.trilead.TrileadSessionFactory.getSession(TrileadSessionFactory.java:34) at org.eclipse.jgit.transport.SshTransport.getSession(SshTransport.java:121) at org.eclipse.jgit.transport.TransportGitSsh$SshFetchConnection.<init>(TransportGitSsh.java:248) at org.eclipse.jgit.transport.TransportGitSsh.openFetch(TransportGitSsh.java:147) at org.eclipse.jgit.transport.FetchProcess.executeImp(FetchProcess.java:136) at org.eclipse.jgit.transport.FetchProcess.execute(FetchProcess.java:122) at org.eclipse.jgit.transport.Transport.fetch(Transport.java:1105) at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:128) at org.jenkinsci.plugins.gitclient.JGitAPIImpl.fetch(JGitAPIImpl.java:299) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at hudson.remoting.RemoteInvocationHandler$RPCRequest.perform(RemoteInvocationHandler.java:275) at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:256) at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:215) at hudson.remoting.UserRequest.perform(UserRequest.java:118) at hudson.remoting.UserRequest.perform(UserRequest.java:48) at hudson.remoting.Request$2.run(Request.java:326) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) 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:724)

          Mark Waite added a comment -

          When I select "Build Now" on another job, it includes the message in its output:

          selected Git installation does not exists. Using Default

          That surprises me, since the "JGit" implementation is the only available implementation on my Jenkins server currently, and it is built into Jenkins.

          Mark Waite added a comment - When I select "Build Now" on another job, it includes the message in its output: selected Git installation does not exists. Using Default That surprises me, since the "JGit" implementation is the only available implementation on my Jenkins server currently, and it is built into Jenkins.

          Mark Waite added a comment -

          If I then define a Git command line provider in the global configurations and adjust the problem job to use that command line provider, the job works again.

          Mark Waite added a comment - If I then define a Git command line provider in the global configurations and adjust the problem job to use that command line provider, the job works again.

          Mark Waite added a comment -

          There is a simpler way to show the same (or a similar) stack trace:

          • Define a new job using Git as the SCM
          • Assign an ssh repository URL like ssh://mwaite@somehost/git/myrepo.git

          The stack trace reports a null pointer exception visible in the web browser:

          Status Code: 500

          Exception: java.lang.NullPointerException
          Stacktrace:
          javax.servlet.ServletException: java.lang.NullPointerException
          at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:719)
          at org.kohsuke.stapler.Stapler.invoke(Stapler.java:770)
          at org.kohsuke.stapler.MetaClass$6.doDispatch(MetaClass.java:241)
          at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
          at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:677)
          at org.kohsuke.stapler.Stapler.invoke(Stapler.java:770)
          at org.kohsuke.stapler.MetaClass$6.doDispatch(MetaClass.java:241)
          at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
          at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:677)
          at org.kohsuke.stapler.Stapler.invoke(Stapler.java:770)
          at org.kohsuke.stapler.Stapler.invoke(Stapler.java:583)
          at org.kohsuke.stapler.Stapler.service(Stapler.java:214)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:45)
          at winstone.ServletConfiguration.execute(ServletConfiguration.java:248)
          at winstone.RequestDispatcher.forward(RequestDispatcher.java:333)
          at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:376)
          at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:95)
          at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:87)
          at winstone.FilterConfiguration.execute(FilterConfiguration.java:194)
          at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:366)
          at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:48)
          at winstone.FilterConfiguration.execute(FilterConfiguration.java:194)
          at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:366)
          at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
          at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:76)
          at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:164)
          at winstone.FilterConfiguration.execute(FilterConfiguration.java:194)
          at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:366)
          at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:50)
          at winstone.FilterConfiguration.execute(FilterConfiguration.java:194)
          at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:366)
          at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:81)
          at winstone.FilterConfiguration.execute(FilterConfiguration.java:194)
          at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:366)
          at winstone.RequestDispatcher.forward(RequestDispatcher.java:331)
          at winstone.RequestHandlerThread.processRequest(RequestHandlerThread.java:227)
          at winstone.RequestHandlerThread.run(RequestHandlerThread.java:150)
          at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
          at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
          at java.util.concurrent.FutureTask.run(FutureTask.java:166)
          at winstone.BoundedExecutorService$1.run(BoundedExecutorService.java:77)
          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:724)
          Caused by: java.lang.NullPointerException
          at org.jenkinsci.plugins.gitclient.trilead.TrileadSessionFactory.getSession(TrileadSessionFactory.java:34)
          at org.eclipse.jgit.transport.SshTransport.getSession(SshTransport.java:121)
          at org.eclipse.jgit.transport.TransportGitSsh$SshFetchConnection.<init>(TransportGitSsh.java:248)
          at org.eclipse.jgit.transport.TransportGitSsh.openFetch(TransportGitSsh.java:147)
          at org.jenkinsci.plugins.gitclient.JGitAPIImpl.getHeadRev(JGitAPIImpl.java:313)
          at hudson.plugins.git.UserRemoteConfig$DescriptorImpl.doCheckUrl(UserRemoteConfig.java:85)
          at sun.reflect.GeneratedMethodAccessor754.invoke(Unknown Source)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke(Method.java:606)
          at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:288)
          at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:151)
          at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:90)
          at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:111)
          at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
          at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:677)
          ... 43 more

          Generated by Stapler at Thu Aug 01 07:34:06 MDT 2013

          Mark Waite added a comment - There is a simpler way to show the same (or a similar) stack trace: Define a new job using Git as the SCM Assign an ssh repository URL like ssh://mwaite@somehost/git/myrepo.git The stack trace reports a null pointer exception visible in the web browser: Status Code: 500 Exception: java.lang.NullPointerException Stacktrace: javax.servlet.ServletException: java.lang.NullPointerException at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:719) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:770) at org.kohsuke.stapler.MetaClass$6.doDispatch(MetaClass.java:241) at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53) at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:677) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:770) at org.kohsuke.stapler.MetaClass$6.doDispatch(MetaClass.java:241) at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53) at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:677) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:770) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:583) at org.kohsuke.stapler.Stapler.service(Stapler.java:214) at javax.servlet.http.HttpServlet.service(HttpServlet.java:45) at winstone.ServletConfiguration.execute(ServletConfiguration.java:248) at winstone.RequestDispatcher.forward(RequestDispatcher.java:333) at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:376) at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:95) at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:87) at winstone.FilterConfiguration.execute(FilterConfiguration.java:194) at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:366) at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:48) at winstone.FilterConfiguration.execute(FilterConfiguration.java:194) at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:366) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84) at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:76) at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:164) at winstone.FilterConfiguration.execute(FilterConfiguration.java:194) at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:366) at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:50) at winstone.FilterConfiguration.execute(FilterConfiguration.java:194) at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:366) at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:81) at winstone.FilterConfiguration.execute(FilterConfiguration.java:194) at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:366) at winstone.RequestDispatcher.forward(RequestDispatcher.java:331) at winstone.RequestHandlerThread.processRequest(RequestHandlerThread.java:227) at winstone.RequestHandlerThread.run(RequestHandlerThread.java:150) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at winstone.BoundedExecutorService$1.run(BoundedExecutorService.java:77) 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:724) Caused by: java.lang.NullPointerException at org.jenkinsci.plugins.gitclient.trilead.TrileadSessionFactory.getSession(TrileadSessionFactory.java:34) at org.eclipse.jgit.transport.SshTransport.getSession(SshTransport.java:121) at org.eclipse.jgit.transport.TransportGitSsh$SshFetchConnection.<init>(TransportGitSsh.java:248) at org.eclipse.jgit.transport.TransportGitSsh.openFetch(TransportGitSsh.java:147) at org.jenkinsci.plugins.gitclient.JGitAPIImpl.getHeadRev(JGitAPIImpl.java:313) at hudson.plugins.git.UserRemoteConfig$DescriptorImpl.doCheckUrl(UserRemoteConfig.java:85) at sun.reflect.GeneratedMethodAccessor754.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:288) at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:151) at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:90) at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:111) at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53) at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:677) ... 43 more Generated by Stapler at Thu Aug 01 07:34:06 MDT 2013

          Nikolas Falco added a comment -

          mee too with:

          • jenkins 1.526
          • Jenkins GIT client plugin 1.1.2
          • Jenkins GIT plugin 1.4.0

          the only solution is revert to 1.0.7

          Nikolas Falco added a comment - mee too with: jenkins 1.526 Jenkins GIT client plugin 1.1.2 Jenkins GIT plugin 1.4.0 the only solution is revert to 1.0.7

          Mark Waite added a comment - - edited

          I can't duplicate the problem with Jenkins 1.526, git client plugin 1.1.2, and git plugin 1.4.0. Can you provide more details (like a stack trace)?

          I did the following steps as part of my attempt to duplicate the problem:

          • install Jenkins 1.509.2
          • update to git client plugin 1.1.2 and git plugin 1.4.0
          • define a new job "job1" using the git plugin with an ssh URL
          • build "job1"
          • upgrade to Jenkins 1.526
          • define a new job "job2" using the git plugin with an ssh URL
          • build "job2"
          • build "job1" again

          Can you compare my steps with your steps and see if there are any obvious ways we differ?

          I was definitely not setting any command line arguments or environment variables to force the use of JGit from within the git 1.4.0 plugin, since my experience with JGit in the 1.4.0 plugin confirmed that it was not ready for production use.

          Mark Waite added a comment - - edited I can't duplicate the problem with Jenkins 1.526, git client plugin 1.1.2, and git plugin 1.4.0. Can you provide more details (like a stack trace)? I did the following steps as part of my attempt to duplicate the problem: install Jenkins 1.509.2 update to git client plugin 1.1.2 and git plugin 1.4.0 define a new job "job1" using the git plugin with an ssh URL build "job1" upgrade to Jenkins 1.526 define a new job "job2" using the git plugin with an ssh URL build "job2" build "job1" again Can you compare my steps with your steps and see if there are any obvious ways we differ? I was definitely not setting any command line arguments or environment variables to force the use of JGit from within the git 1.4.0 plugin, since my experience with JGit in the 1.4.0 plugin confirmed that it was not ready for production use.

          Nikolas Falco added a comment -

          No problem with a newer installation.

          I can not use plugin > 1.0.7 in production environment. I have also uninstall and reinstall plugin but nothing. Every old/new job has same problem on build (and polling):
          Building on master in workspace /home/builder/.jenkins/jobs/job1/workspace
          Checkout:workspace / /home/builder/.jenkins/jobs/job1/workspace - hudson.remoting.LocalChannel@57a3c2bf
          Using strategy: Default
          Cloning the remote Git repository
          [WARNING] JGit doesn't support reference repository. This flag is ignored.
          FATAL: null
          java.lang.NullPointerException
          at org.jenkinsci.plugins.gitclient.trilead.TrileadSessionFactory.getSession(TrileadSessionFactory.java:31)
          at org.eclipse.jgit.transport.SshTransport.getSession(SshTransport.java:121)
          at org.eclipse.jgit.transport.TransportGitSsh$SshFetchConnection.<init>(TransportGitSsh.java:248)
          at org.eclipse.jgit.transport.TransportGitSsh.openFetch(TransportGitSsh.java:147)
          at org.eclipse.jgit.transport.FetchProcess.executeImp(FetchProcess.java:136)
          at org.eclipse.jgit.transport.FetchProcess.execute(FetchProcess.java:122)
          at org.eclipse.jgit.transport.Transport.fetch(Transport.java:1105)
          at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:128)
          at org.eclipse.jgit.api.CloneCommand.fetch(CloneCommand.java:178)
          at org.eclipse.jgit.api.CloneCommand.call(CloneCommand.java:125)
          at org.jenkinsci.plugins.gitclient.JGitAPIImpl$3.execute(JGitAPIImpl.java:643)
          at org.jenkinsci.plugins.gitclient.AbstractGitAPIImpl.clone(AbstractGitAPIImpl.java:57)
          at org.jenkinsci.plugins.gitclient.JGitAPIImpl.clone(JGitAPIImpl.java:98)
          at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:1006)
          at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:942)
          at hudson.FilePath.act(FilePath.java:906)
          at hudson.FilePath.act(FilePath.java:879)
          at hudson.plugins.git.GitSCM.determineRevisionToBuild(GitSCM.java:942)
          at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1108)
          at org.jenkinsci.plugins.multiplescms.MultiSCM.checkout(MultiSCM.java:117)
          at hudson.model.AbstractProject.checkout(AbstractProject.java:1406)
          at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:676)
          at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88)
          at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:581)
          at hudson.model.Run.execute(Run.java:1597)
          at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
          at hudson.model.ResourceController.execute(ResourceController.java:88)
          at hudson.model.Executor.run(Executor.java:247)

          Nikolas Falco added a comment - No problem with a newer installation. I can not use plugin > 1.0.7 in production environment. I have also uninstall and reinstall plugin but nothing. Every old/new job has same problem on build (and polling): Building on master in workspace /home/builder/.jenkins/jobs/job1/workspace Checkout:workspace / /home/builder/.jenkins/jobs/job1/workspace - hudson.remoting.LocalChannel@57a3c2bf Using strategy: Default Cloning the remote Git repository [WARNING] JGit doesn't support reference repository. This flag is ignored. FATAL: null java.lang.NullPointerException at org.jenkinsci.plugins.gitclient.trilead.TrileadSessionFactory.getSession(TrileadSessionFactory.java:31) at org.eclipse.jgit.transport.SshTransport.getSession(SshTransport.java:121) at org.eclipse.jgit.transport.TransportGitSsh$SshFetchConnection.<init>(TransportGitSsh.java:248) at org.eclipse.jgit.transport.TransportGitSsh.openFetch(TransportGitSsh.java:147) at org.eclipse.jgit.transport.FetchProcess.executeImp(FetchProcess.java:136) at org.eclipse.jgit.transport.FetchProcess.execute(FetchProcess.java:122) at org.eclipse.jgit.transport.Transport.fetch(Transport.java:1105) at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:128) at org.eclipse.jgit.api.CloneCommand.fetch(CloneCommand.java:178) at org.eclipse.jgit.api.CloneCommand.call(CloneCommand.java:125) at org.jenkinsci.plugins.gitclient.JGitAPIImpl$3.execute(JGitAPIImpl.java:643) at org.jenkinsci.plugins.gitclient.AbstractGitAPIImpl.clone(AbstractGitAPIImpl.java:57) at org.jenkinsci.plugins.gitclient.JGitAPIImpl.clone(JGitAPIImpl.java:98) at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:1006) at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:942) at hudson.FilePath.act(FilePath.java:906) at hudson.FilePath.act(FilePath.java:879) at hudson.plugins.git.GitSCM.determineRevisionToBuild(GitSCM.java:942) at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1108) at org.jenkinsci.plugins.multiplescms.MultiSCM.checkout(MultiSCM.java:117) at hudson.model.AbstractProject.checkout(AbstractProject.java:1406) at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:676) at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:581) at hudson.model.Run.execute(Run.java:1597) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:247)

          Nikolas Falco added a comment -

          The previous installation was under windows 7.
          To debug the problem I do another new installation under Ubuntu 12.10 linux develop machine and I have got the problem.

          Debugging in the working case the to org.eclipse.jgit.api.FetchCommand do the normal work, in the second case (not working) a call to org.jenkinsci.plugins.gitclient.trilead.TrileadSessionFactory.getSession was done where the credentialprovider passed from FetchCommand in the firm is null.

          Nikolas Falco added a comment - The previous installation was under windows 7. To debug the problem I do another new installation under Ubuntu 12.10 linux develop machine and I have got the problem. Debugging in the working case the to org.eclipse.jgit.api.FetchCommand do the normal work, in the second case (not working) a call to org.jenkinsci.plugins.gitclient.trilead.TrileadSessionFactory.getSession was done where the credentialprovider passed from FetchCommand in the firm is null.

          Mark Waite added a comment -

          The default for git plugin 1.4.0 and git client 1.1.2 is to use the git command line implementation rather than using the jgit implementation (at least as far as I understand it). However, your stack trace shows jgit is being used rather than the git command line implementation. Your stack trace also shows the multiSCM plugin in the stack trace, while the original stack trace does not show that.

          You might try disabling or removing the MultiSCM plugin to see if that fixes the issue.

          You might also check that there are no settings in your Jenkins startup file which cause it to switch from using the default git command line implementation.

          Mark Waite added a comment - The default for git plugin 1.4.0 and git client 1.1.2 is to use the git command line implementation rather than using the jgit implementation (at least as far as I understand it). However, your stack trace shows jgit is being used rather than the git command line implementation. Your stack trace also shows the multiSCM plugin in the stack trace, while the original stack trace does not show that. You might try disabling or removing the MultiSCM plugin to see if that fixes the issue. You might also check that there are no settings in your Jenkins startup file which cause it to switch from using the default git command line implementation.

            ndeloof Nicolas De Loof
            markewaite Mark Waite
            Votes:
            2 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: