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

Save ANY job configuration causes Git Plugin to throw NPE

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Critical
    • Resolution: Fixed
    • Component/s: core, git-plugin
    • Labels:
      None
    • Environment:
      Jenkins 1.537-SNAPSHOT
      Git Plugin 1.5.0
    • Similar Issues:

      Description

      After JENKINS-18629 fixed, Jenkins is getting to throw NPE when project config is submitted.

      javax.servlet.ServletException: java.lang.RuntimeException: Failed to instantiate class hudson.plugins.git.GitSCM from {"value":"2","userRemoteConfigs":{"url":"https://github.com/takezoe/gitbucket.git","name":"","refspec":""},"branches":{"name":"master"},"includedRegions":"","excludedRegions":"","excludedUsers":"","localBranch":"","relativeTargetDir":"","reference":"","scmName":"","gitConfigName":"","gitConfigEmail":"","pruneBranches":false,"skipTag":false,"clean":false,"remotePoll":false,"disableSubmodules":false,"recursiveSubmodules":false,"authorOrCommitter":false,"wipeOutWorkspace":false,"ignoreNotifyCommit":false,"useShallowClone":false,"":["hudson.plugins.git.util.DefaultBuildChooser","7"],"buildChooser":{"stapler-class<span class="code-quote">":"hudson.plugins.git.util.DefaultBuildChooser"},"gitTool":"Default","browser":{"stapler-class<span class="code-quote">":"hudson.plugins.git.browser.GithubWeb","url":"https://github.com/takezoe/gitbucket/"}}
      	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:777)
      	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:841)
      	at org.kohsuke.stapler.MetaClass$6.doDispatch(MetaClass.java:248)
      	at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
      	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:727)
      	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:841)
      	at org.kohsuke.stapler.MetaClass$6.doDispatch(MetaClass.java:248)
      	at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
      	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:727)
      	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:841)
      	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:630)
      	at org.kohsuke.stapler.Stapler.service(Stapler.java:224)
      	at javax.servlet.http.HttpServlet.service(Unknown Source)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Unknown Source)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(Unknown Source)
      	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:96)
      	at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:208)
      	at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:181)
      	at net.bull.javamelody.PluginMonitoringFilter.doFilter(PluginMonitoringFilter.java:86)
      	at org.jvnet.hudson.plugins.monitoring.HudsonMonitoringFilter.doFilter(HudsonMonitoringFilter.java:84)
      	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:99)
      	at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:88)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Unknown Source)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(Unknown Source)
      	at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:48)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Unknown Source)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(Unknown Source)
      	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 jenkins.security.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:117)
      	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:174)
      	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      	at jenkins.security.ApiTokenFilter.doFilter(ApiTokenFilter.java:64)
      	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:67)
      	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 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Unknown Source)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(Unknown Source)
      	at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:46)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Unknown Source)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(Unknown Source)
      	at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:81)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Unknown Source)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(Unknown Source)
      	at org.apache.catalina.core.StandardWrapperValve.invoke(Unknown Source)
      	at org.apache.catalina.core.StandardContextValve.invoke(Unknown Source)
      	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(Unknown Source)
      	at org.apache.catalina.core.StandardHostValve.invoke(Unknown Source)
      	at org.apache.catalina.valves.ErrorReportValve.invoke(Unknown Source)
      	at org.apache.catalina.core.StandardEngineValve.invoke(Unknown Source)
      	at org.apache.catalina.connector.CoyoteAdapter.service(Unknown Source)
      	at org.apache.coyote.ajp.AjpAprProcessor.process(Unknown Source)
      	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(Unknown Source)
      	at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(Unknown Source)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
      	at java.lang.Thread.run(Thread.java:662)
      Caused by: java.lang.RuntimeException: Failed to instantiate class hudson.plugins.git.GitSCM from {"value":"2","userRemoteConfigs":{"url":"https://github.com/takezoe/gitbucket.git","name":"","refspec":""},"branches":{"name":"master"},"includedRegions":"","excludedRegions":"","excludedUsers":"","localBranch":"","relativeTargetDir":"","reference":"","scmName":"","gitConfigName":"","gitConfigEmail":"","pruneBranches":false,"skipTag":false,"clean":false,"remotePoll":false,"disableSubmodules":false,"recursiveSubmodules":false,"authorOrCommitter":false,"wipeOutWorkspace":false,"ignoreNotifyCommit":false,"useShallowClone":false,"":["hudson.plugins.git.util.DefaultBuildChooser","7"],"buildChooser":{"stapler-class<span class="code-quote">":"hudson.plugins.git.util.DefaultBuildChooser"},"gitTool":"Default","browser":{"stapler-class<span class="code-quote">":"hudson.plugins.git.browser.GithubWeb","url":"https://github.com/takezoe/gitbucket/"}}
      	at hudson.model.Descriptor.newInstance(Descriptor.java:578)
      	at hudson.plugins.git.GitSCM$DescriptorImpl.newInstance(GitSCM.java:1498)
      	at hudson.plugins.git.GitSCM$DescriptorImpl.newInstance(GitSCM.java:1419)
      	at hudson.scm.SCMS.parseSCM(SCMS.java:63)
      	at hudson.model.AbstractProject.submit(AbstractProject.java:2002)
      	at hudson.model.Project.submit(Project.java:202)
      	at hudson.model.Job.doConfigSubmit(Job.java:1136)
      	at hudson.model.AbstractProject.doConfigSubmit(AbstractProject.java:787)
      	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:297)
      	at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:160)
      	at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:95)
      	at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:120)
      	at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
      	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:727)
      	... 67 more
      Caused by: java.lang.RuntimeException: Failed to instantiate class hudson.plugins.git.GitSCM from {"value":"2","userRemoteConfigs":{"url":"https://github.com/takezoe/gitbucket.git","name":"","refspec":""},"branches":{"name":"master"},"includedRegions":"","excludedRegions":"","excludedUsers":"","localBranch":"","relativeTargetDir":"","reference":"","scmName":"","gitConfigName":"","gitConfigEmail":"","pruneBranches":false,"skipTag":false,"clean":false,"remotePoll":false,"disableSubmodules":false,"recursiveSubmodules":false,"authorOrCommitter":false,"wipeOutWorkspace":false,"ignoreNotifyCommit":false,"useShallowClone":false,"":["hudson.plugins.git.util.DefaultBuildChooser","7"],"buildChooser":{"stapler-class<span class="code-quote">":"hudson.plugins.git.util.DefaultBuildChooser"},"gitTool":"Default","browser":{"stapler-class<span class="code-quote">":"hudson.plugins.git.browser.GithubWeb","url":"https://github.com/takezoe/gitbucket/"}}
      	at hudson.model.Descriptor.newInstance(Descriptor.java:578)
      	at hudson.plugins.git.GitSCM$DescriptorImpl.newInstance(GitSCM.java:1498)
      	at hudson.plugins.git.GitSCM$DescriptorImpl.newInstance(GitSCM.java:1419)
      	at hudson.model.Descriptor$1.instantiate(Descriptor.java:1046)
      	at org.kohsuke.stapler.RequestImpl.instantiate(RequestImpl.java:665)
      	at org.kohsuke.stapler.RequestImpl.access$100(RequestImpl.java:81)
      	at org.kohsuke.stapler.RequestImpl$TypePair.convertJSON(RequestImpl.java:587)
      	at org.kohsuke.stapler.RequestImpl.bindJSON(RequestImpl.java:400)
      	at org.kohsuke.stapler.RequestImpl.bindJSON(RequestImpl.java:396)
      	at hudson.model.Descriptor.newInstance(Descriptor.java:569)
      	... 84 more
      Caused by: java.lang.IllegalArgumentException: Failed to instantiate class hudson.plugins.git.GitSCM from {"value":"2","userRemoteConfigs":{"url":"https://github.com/takezoe/gitbucket.git","name":"","refspec":""},"branches":{"name":"master"},"includedRegions":"","excludedRegions":"","excludedUsers":"","localBranch":"","relativeTargetDir":"","reference":"","scmName":"","gitConfigName":"","gitConfigEmail":"","pruneBranches":false,"skipTag":false,"clean":false,"remotePoll":false,"disableSubmodules":false,"recursiveSubmodules":false,"authorOrCommitter":false,"wipeOutWorkspace":false,"ignoreNotifyCommit":false,"useShallowClone":false,"":["hudson.plugins.git.util.DefaultBuildChooser","7"],"buildChooser":{"stapler-class<span class="code-quote">":"hudson.plugins.git.util.DefaultBuildChooser"},"gitTool":"Default","browser":{"stapler-class<span class="code-quote">":"hudson.plugins.git.browser.GithubWeb","url":"https://github.com/takezoe/gitbucket/"}}
      	at org.kohsuke.stapler.RequestImpl$TypePair.convertJSON(RequestImpl.java:589)
      	at org.kohsuke.stapler.RequestImpl.bindJSON(RequestImpl.java:400)
      	at org.kohsuke.stapler.RequestImpl.bindJSON(RequestImpl.java:396)
      	at hudson.model.Descriptor.newInstance(Descriptor.java:569)
      	... 93 more
      Caused by: java.lang.IllegalArgumentException: Failed to convert the browser parameter of the constructor public hudson.plugins.git.GitSCM(java.lang.String,java.util.List,java.util.List,hudson.plugins.git.UserMergeOptions,java.lang.Boolean,java.util.Collection,boolean,boolean,hudson.plugins.git.util.BuildChooser,hudson.plugins.git.browser.GitRepositoryBrowser,java.lang.String,boolean,java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,boolean,boolean,boolean,boolean,java.lang.String,java.lang.String,boolean,java.lang.String,boolean,boolean)
      	at org.kohsuke.stapler.RequestImpl.instantiate(RequestImpl.java:686)
      	at org.kohsuke.stapler.RequestImpl.access$100(RequestImpl.java:81)
      	at org.kohsuke.stapler.RequestImpl$TypePair.convertJSON(RequestImpl.java:587)
      	... 96 more
      Caused by: java.lang.IllegalArgumentException: Failed to instantiate class hudson.plugins.git.browser.GitRepositoryBrowser from {"stapler-class":"hudson.plugins.git.browser.GithubWeb","url":"https://github.com/takezoe/gitbucket/"}
      	at org.kohsuke.stapler.RequestImpl$TypePair.convertJSON(RequestImpl.java:589)
      	at org.kohsuke.stapler.RequestImpl.bindJSON(RequestImpl.java:400)
      	at org.kohsuke.stapler.RequestImpl.instantiate(RequestImpl.java:684)
      	... 98 more
      Caused by: java.lang.IllegalArgumentException: java.net.MalformedURLException
      	at org.kohsuke.stapler.RequestImpl.invokeConstructor(RequestImpl.java:462)
      	at org.kohsuke.stapler.RequestImpl.bindParameters(RequestImpl.java:392)
      	at org.kohsuke.stapler.RequestImpl.bindParameters(RequestImpl.java:363)
      	at hudson.plugins.git.browser.GithubWeb$GithubWebDescriptor.newInstance(GithubWeb.java:104)
      	at hudson.plugins.git.browser.GithubWeb$GithubWebDescriptor.newInstance(GithubWeb.java:96)
      	at hudson.model.Descriptor$1.instantiate(Descriptor.java:1046)
      	at org.kohsuke.stapler.RequestImpl.instantiate(RequestImpl.java:665)
      	at org.kohsuke.stapler.RequestImpl.access$100(RequestImpl.java:81)
      	at org.kohsuke.stapler.RequestImpl$TypePair.convertJSON(RequestImpl.java:587)
      	... 100 more
      Caused by: java.net.MalformedURLException
      	at java.net.URL.<init>(URL.java:601)
      	at java.net.URL.<init>(URL.java:464)
      	at java.net.URL.<init>(URL.java:413)
      	at hudson.plugins.git.browser.GithubWeb.<init>(GithubWeb.java:29)
      	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
      	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
      	at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
      	at org.kohsuke.stapler.RequestImpl.invokeConstructor(RequestImpl.java:447)
      	... 108 more
      

        Attachments

          Issue Links

            Activity

            Hide
            jeroenthora Jeroen Thora added a comment -

            Yes, i found that options later last night thanks!

            Show
            jeroenthora Jeroen Thora added a comment - Yes, i found that options later last night thanks!
            Hide
            mavlyutov Marat Mavlyutov added a comment -

            @igorkostenko just disable 'GitHub API Plugin' and 'GitHub plugin'

            Show
            mavlyutov Marat Mavlyutov added a comment - @igorkostenko just disable 'GitHub API Plugin' and 'GitHub plugin'
            Hide
            pmount Peter Mount added a comment -

            @sogabe Thanks, just created JENKINS-20205 for the periodic-reincarnation-plugin bug.

            Show
            pmount Peter Mount added a comment - @sogabe Thanks, just created JENKINS-20205 for the periodic-reincarnation-plugin bug.
            Hide
            uknowwho Jay Zh added a comment -

            I just downloaded Jenkins today and bumped into this problem. When will the fix be ready to download? -Thanks

            Show
            uknowwho Jay Zh added a comment - I just downloaded Jenkins today and bumped into this problem. When will the fix be ready to download? -Thanks
            Hide
            hujirong Jirong Hu added a comment -

            I am getting this error in our Jenkins DEV server (Jenkins ver. 1.617 on Windows 2008R2). Uninstall and reinstall the GitHub Plugin (1.14.0) can fix the issue, for the first save in Configure, but from the 2nd time, same issue comes back. I am trying to configure the SonarQube installation.

            Show
            hujirong Jirong Hu added a comment - I am getting this error in our Jenkins DEV server (Jenkins ver. 1.617 on Windows 2008R2). Uninstall and reinstall the GitHub Plugin (1.14.0) can fix the issue, for the first save in Configure, but from the 2nd time, same issue comes back. I am trying to configure the SonarQube installation.

              People

              • Assignee:
                ndeloof Nicolas De Loof
                Reporter:
                sogabe sogabe
              • Votes:
                5 Vote for this issue
                Watchers:
                19 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: