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

Git plugin throws NPE when setting up publisher

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: git-plugin
    • Labels:
      None
    • Environment:
      Jenkins 1.415
      Git plugin 1.1.9
      Ubuntu 10.10; git 1.7.1
    • Similar Issues:

      Description

      Trying to add a Git Publisher step to a job to tag on a promotion. When I hit the "add tag" or "add branch" option, under "Target remote name" it shows a "ERROR" link below. After I enter in a tag; the ERROR link is replaced with a 500 error and this stacktrace:

       Stacktrace:
      java.lang.NullPointerException
      	at hudson.plugins.git.util.GitUtils.fixupNames(GitUtils.java:198)
      	at hudson.plugins.git.GitSCM$DescriptorImpl.doGitRemoteNameCheck(GitSCM.java:1522)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      	at java.lang.reflect.Method.invoke(Method.java:597)
      	at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:282)
      	at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:149)
      	at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:88)
      	at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:103)
      	at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
      	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:561)
      	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:646)
      	at org.kohsuke.stapler.MetaClass$6.doDispatch(MetaClass.java:233)
      	at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
      	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:561)
      	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:646)
      	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:477)
      	at org.kohsuke.stapler.Stapler.service(Stapler.java:159)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:45)
      	at winstone.ServletConfiguration.execute(ServletConfiguration.java:249)
      	at winstone.RequestDispatcher.forward(RequestDispatcher.java:335)
      	at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:378)
      	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:94)
      	at hudson.plugins.greenballs.GreenBallFilter.doFilter(GreenBallFilter.java:52)
      	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:97)
      	at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:86)
      	at winstone.FilterConfiguration.execute(FilterConfiguration.java:195)
      	at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:368)
      	at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:47)
      	at winstone.FilterConfiguration.execute(FilterConfiguration.java:195)
      	at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:368)
      	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
      	at hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51)
      	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      	at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:166)
      	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      	at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
      	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      	at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)
      	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      	at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271)
      	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      	at org.acegisecurity.ui.basicauth.BasicProcessingFilter.doFilter(BasicProcessingFilter.java:173)
      	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      	at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
      	at hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:66)
      	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      	at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:76)
      	at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:164)
      	at winstone.FilterConfiguration.execute(FilterConfiguration.java:195)
      	at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:368)
      	at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:81)
      	at winstone.FilterConfiguration.execute(FilterConfiguration.java:195)
      	at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:368)
      	at winstone.RequestDispatcher.forward(RequestDispatcher.java:333)
      	at winstone.RequestHandlerThread.processRequest(RequestHandlerThread.java:244)
      	at winstone.RequestHandlerThread.run(RequestHandlerThread.java:150)
      	at java.lang.Thread.run(Thread.java:662) 

        Attachments

          Activity

          Hide
          dogfood dogfood added a comment -

          Integrated in plugins_git-plugin #181
          [FIXED JENKINS-9971] Fix NPE when validating remote for publish.

          Kevin Sawicki : 61bd032828366df80589dd2f2aa22f0709c8915a
          Files :

          • src/main/java/hudson/plugins/git/GitSCM.java
          • src/main/java/hudson/plugins/git/GitPublisher.java
          • src/main/resources/hudson/plugins/git/GitPublisher/config.jelly
          Show
          dogfood dogfood added a comment - Integrated in plugins_git-plugin #181 [FIXED JENKINS-9971] Fix NPE when validating remote for publish. Kevin Sawicki : 61bd032828366df80589dd2f2aa22f0709c8915a Files : src/main/java/hudson/plugins/git/GitSCM.java src/main/java/hudson/plugins/git/GitPublisher.java src/main/resources/hudson/plugins/git/GitPublisher/config.jelly
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Kevin Sawicki
          Path:
          src/main/java/hudson/plugins/git/GitPublisher.java
          src/main/java/hudson/plugins/git/GitSCM.java
          src/main/resources/hudson/plugins/git/GitPublisher/config.jelly
          http://jenkins-ci.org/commit/git-plugin/61bd032828366df80589dd2f2aa22f0709c8915a
          Log:
          [FIXED JENKINS-9971] Fix NPE when validating remote for publish.

          Add new validation to GitPublisher that checks the remote name
          is a valid repository name.

          Also update validatation in GitSCM to response null repo name
          and url parameter values.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Kevin Sawicki Path: src/main/java/hudson/plugins/git/GitPublisher.java src/main/java/hudson/plugins/git/GitSCM.java src/main/resources/hudson/plugins/git/GitPublisher/config.jelly http://jenkins-ci.org/commit/git-plugin/61bd032828366df80589dd2f2aa22f0709c8915a Log: [FIXED JENKINS-9971] Fix NPE when validating remote for publish. Add new validation to GitPublisher that checks the remote name is a valid repository name. Also update validatation in GitSCM to response null repo name and url parameter values.

            People

            • Assignee:
              kevinsawicki Kevin Sawicki
              Reporter:
              constantinexvi Andrew Paulin
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: