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

Save ANY job configuration causes Git Plugin to throw NPE

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • core, git-plugin
    • None
    • Jenkins 1.537-SNAPSHOT
      Git Plugin 1.5.0

      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
      

            ndeloof Nicolas De Loof
            sogabe sogabe
            Votes:
            5 Vote for this issue
            Watchers:
            18 Start watching this issue

              Created:
              Updated:
              Resolved: