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

Saving/Applying multi-branch job config causes NullPointerException hudson.scm.SCMS.parseSCM

    Details

    • Similar Issues:

      Description

      While saving a "multi-branch" job configuration the Exception occurs (even when there is no change). But the projects auto created (one per branch) are saveable.

      javax.servlet.ServletException: java.lang.NullPointerException
      at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:796)
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
      at org.kohsuke.stapler.MetaClass$5.doDispatch(MetaClass.java:233)
      at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
      at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746)
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:649)
      at org.kohsuke.stapler.Stapler.service(Stapler.java:238)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
      at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:812)
      at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669)
      at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:135)
      at com.smartcodeltd.jenkinsci.plugin.assetbundler.filters.LessCSS.doFilter(LessCSS.java:47)
      at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:132)
      at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:126)
      at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
      at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:49)
      at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
      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 jenkins.security.BasicHeaderProcessor.doFilter(BasicHeaderProcessor.java:93)
      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:171)
      at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
      at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:49)
      at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
      at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:82)
      at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
      at org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30)
      at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
      at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
      at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
      at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:553)
      at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
      at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
      at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
      at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
      at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
      at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
      at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
      at org.eclipse.jetty.server.Server.handle(Server.java:499)
      at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)
      at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)
      at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544)
      at winstone.BoundedExecutorService$1.run(BoundedExecutorService.java:77)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      at java.lang.Thread.run(Thread.java:745)
      Caused by: java.lang.NullPointerException
      at hudson.scm.SCMS.parseSCM(SCMS.java:60)
      at hudson.model.AbstractProject.submit(AbstractProject.java:1864)
      at hudson.model.Project.submit(Project.java:230)
      at hudson.model.Job.doConfigSubmit(Job.java:1229)
      at hudson.model.AbstractProject.doConfigSubmit(AbstractProject.java:795)
      at com.github.mjdetullio.jenkins.plugins.multibranch.AbstractMultiBranchProject.submit(AbstractMultiBranchProject.java:539)
      at com.cloudbees.hudson.plugins.folder.AbstractFolder.doConfigSubmit(AbstractFolder.java:713)
      at com.cloudbees.hudson.plugins.folder.computed.ComputedFolder.doConfigSubmit(ComputedFolder.java:225)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:497)
      at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:324)
      at org.kohsuke.stapler.interceptor.RequirePOST$Processor.invoke(RequirePOST.java:52)
      at org.kohsuke.stapler.PreInvokeInterceptedFunction.invoke(PreInvokeInterceptedFunction.java:26)
      at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:167)
      at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:100)
      at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:124)
      at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
      at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746)
      ... 60 more

        Attachments

        1. 1.jpg
          1.jpg
          98 kB
        2. 2.jpg
          2.jpg
          207 kB

          Issue Links

            Activity

            bbernardin BERNARDIN Benoit created issue -
            Hide
            elhabib_med Mohamed El Habib added a comment -

            i have the same error with jenkins 2.9

            Show
            elhabib_med Mohamed El Habib added a comment - i have the same error with jenkins 2.9
            szasza Szabolcs Palmer made changes -
            Field Original Value New Value
            Environment Jenkins 1.638
            Multi-Branch Project Plugin 0.4.2
            SCM API Plugin 1.2
            Git Client Plugin 1.19.6
            Git Plugin 2.4.4
            Linux 12.04
            Jenkins 1.638 + 2.9
            Multi-Branch Project Plugin 0.4.2
            SCM API Plugin 1.2
            Git Client Plugin 1.19.6
            Git Plugin 2.4.4
            Linux 12.04
            szasza Szabolcs Palmer made changes -
            Environment Jenkins 1.638 + 2.9
            Multi-Branch Project Plugin 0.4.2
            SCM API Plugin 1.2
            Git Client Plugin 1.19.6
            Git Plugin 2.4.4
            Linux 12.04
            Jenkins 1.638 + 2.9
            Multi-Branch Project Plugin 0.4.2
            SCM API Plugin 1.2
            Git Client Plugin 1.19.6
            Git Plugin 2.4.4
            Linux 12.04 + Ubuntu 14.04
            bbernardin BERNARDIN Benoit made changes -
            Environment Jenkins 1.638 + 2.9
            Multi-Branch Project Plugin 0.4.2
            SCM API Plugin 1.2
            Git Client Plugin 1.19.6
            Git Plugin 2.4.4
            Linux 12.04 + Ubuntu 14.04
            Jenkins 2.9
            Multi-Branch Project Plugin 0.4.2
            SCM API Plugin 1.2
            Git Client Plugin 1.19.6
            Git Plugin 2.4.4
            Linux 12.04 + Ubuntu 14.04
            bbernardin BERNARDIN Benoit made changes -
            Environment Jenkins 2.9
            Multi-Branch Project Plugin 0.4.2
            SCM API Plugin 1.2
            Git Client Plugin 1.19.6
            Git Plugin 2.4.4
            Linux 12.04 + Ubuntu 14.04
            Jenkins 2.9
            Multi-Branch Project Plugin 0.4.2
            SCM API Plugin 1.2
            Git Client Plugin 1.19.6
            Git Plugin 2.4.4
            Ubuntu 12.04 & 14.04
            Hide
            kor Kor Wipe added a comment -

            Same error also with Jenkins 2.10.

            Show
            kor Kor Wipe added a comment - Same error also with Jenkins 2.10.
            petzoldf Fabian Petzold made changes -
            Environment Jenkins 2.9
            Multi-Branch Project Plugin 0.4.2
            SCM API Plugin 1.2
            Git Client Plugin 1.19.6
            Git Plugin 2.4.4
            Ubuntu 12.04 & 14.04
            Jenkins 2.9 & Jenkins 2.10
            Multi-Branch Project Plugin 0.4.2
            SCM API Plugin 1.2
            Git Client Plugin 1.19.6
            Git Plugin 2.4.4
            Ubuntu 12.04 & 14.04 & 16.04
            Hide
            orrc Christopher Orr added a comment -

            This started happening — we believe — after upgrading from Jenkins 2.8 to 2.10. We haven't yet managed to narrow down which plugins were also upgraded at this point.

            Show
            orrc Christopher Orr added a comment - This started happening — we believe — after upgrading from Jenkins 2.8 to 2.10. We haven't yet managed to narrow down which plugins were also upgraded at this point.
            Hide
            situm situm tech added a comment -

            Same here!

            Jenkins ver. 2.10
            Multi-Branch Project Plugin 0.4.2
            SCM API Plugin 1.2

            Show
            situm situm tech added a comment - Same here! Jenkins ver. 2.10 Multi-Branch Project Plugin 0.4.2 SCM API Plugin 1.2
            Hide
            oleg_nenashev Oleg Nenashev added a comment -
            Show
            oleg_nenashev Oleg Nenashev added a comment - It's regression due to the JENKINS-35098 fix by Jesse Glick . https://github.com/jenkinsci/jenkins/commit/d33df0f2e4cbe5a6e35f34ece96059826aa7471d . Reassigning to the core
            oleg_nenashev Oleg Nenashev made changes -
            Component/s core [ 15593 ]
            Component/s multi-branch-project-plugin [ 21127 ]
            Component/s scm-api-plugin [ 18054 ]
            oleg_nenashev Oleg Nenashev made changes -
            Labels regression
            oleg_nenashev Oleg Nenashev made changes -
            Assignee Matthew DeTullio [ mjdetullio ] Oleg Nenashev [ oleg_nenashev ]
            oleg_nenashev Oleg Nenashev made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            Hide
            oleg_nenashev Oleg Nenashev added a comment -
            Show
            oleg_nenashev Oleg Nenashev added a comment - Pull request: https://github.com/jenkinsci/jenkins/pull/2422
            Hide
            jglick Jesse Glick added a comment -

            Probably another symptom of JENKINS-35906.

            Show
            jglick Jesse Glick added a comment - Probably another symptom of JENKINS-35906 .
            jglick Jesse Glick made changes -
            Link This issue duplicates JENKINS-35906 [ JENKINS-35906 ]
            Hide
            jglick Jesse Glick added a comment -

            It is not really a core bug, though a core change resulted in the bug. This crazy code is failing to define a NullSCM the way it should (CC Matthew DeTullio). So the call to templateProject.doConfigSubmit is passing an invalid form.

            Show
            jglick Jesse Glick added a comment - It is not really a core bug, though a core change resulted in the bug. This crazy code is failing to define a NullSCM the way it should (CC Matthew DeTullio ). So the call to templateProject.doConfigSubmit is passing an invalid form.
            jglick Jesse Glick made changes -
            Component/s multi-branch-project-plugin [ 21127 ]
            Assignee Oleg Nenashev [ oleg_nenashev ] Jesse Glick [ jglick ]
            Hide
            mjdetullio Matthew DeTullio added a comment -

            Crazy code indeed. Shouldn't be too hard to add more crazy code there to fix it.

            Show
            mjdetullio Matthew DeTullio added a comment - Crazy code indeed. Shouldn't be too hard to add more crazy code there to fix it.
            Hide
            molk Marcus Olk added a comment -

            Same here:

            Jenkins ver. 2.11
            Multi-Branch Project Plugin 0.4.2
            Folders Plugin 5.12
            SCM API Plugin 1.2
            GitPlugin 2.5.0

            mjdetullio Matthew DeTullio
            Crazy code indeed. Shouldn't be too hard to add more crazy code there to fix it.

            Any idea when to expect a crazy coded fix? I know: it's ready when it's ready ...

            Show
            molk Marcus Olk added a comment - Same here: Jenkins ver. 2.11 Multi-Branch Project Plugin 0.4.2 Folders Plugin 5.12 SCM API Plugin 1.2 GitPlugin 2.5.0 mjdetullio Matthew DeTullio Crazy code indeed. Shouldn't be too hard to add more crazy code there to fix it. Any idea when to expect a crazy coded fix ? I know: it's ready when it's ready ...
            Hide
            oleg_nenashev Oleg Nenashev added a comment -

            Closing as a Duplicate

            Show
            oleg_nenashev Oleg Nenashev added a comment - Closing as a Duplicate
            oleg_nenashev Oleg Nenashev made changes -
            Status In Progress [ 3 ] Resolved [ 5 ]
            Resolution Duplicate [ 3 ]
            Hide
            oleg_nenashev Oleg Nenashev added a comment -

            https://github.com/jenkinsci/jenkins/pull/2426 has been integrated into the core. To be released in 2.12

            Show
            oleg_nenashev Oleg Nenashev added a comment - https://github.com/jenkinsci/jenkins/pull/2426 has been integrated into the core. To be released in 2.12
            mjdetullio Matthew DeTullio made changes -
            Link This issue is duplicated by JENKINS-36025 [ JENKINS-36025 ]
            Show
            mjdetullio Matthew DeTullio added a comment - Also fixed retroactively with https://github.com/jenkinsci/multi-branch-project-plugin/commit/93ac3771f550230f18d7f7f0eb99983db6d38d52 , part of 0.5 release
            rtyler R. Tyler Croy made changes -
            Workflow JNJira [ 172686 ] JNJira + In-Review [ 199307 ]
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Jesse Glick
            Path:
            core/src/main/java/hudson/scm/SCMS.java
            http://jenkins-ci.org/commit/jenkins/27d8f06f1baabb320cc86527250bed5a7dacf85e
            Log:
            JENKINS-35906 Ensure that SCMDescriptor.newInstance overrides are honored (#2426)

            • [FIXED JENKINS-35906] Ensure that SCMDescriptor.newInstance overrides are honored.
            • [FIXED JENKINS-36043] Work around fragile form submission design in multi-branch-project-plugin.

            (cherry picked from commit 1d176d1f19bfc717ffc335046539ffdd079efdf4)

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: core/src/main/java/hudson/scm/SCMS.java http://jenkins-ci.org/commit/jenkins/27d8f06f1baabb320cc86527250bed5a7dacf85e Log: JENKINS-35906 Ensure that SCMDescriptor.newInstance overrides are honored (#2426) [FIXED JENKINS-35906] Ensure that SCMDescriptor.newInstance overrides are honored. [FIXED JENKINS-36043] Work around fragile form submission design in multi-branch-project-plugin. (cherry picked from commit 1d176d1f19bfc717ffc335046539ffdd079efdf4)

              People

              • Assignee:
                jglick Jesse Glick
                Reporter:
                bbernardin BERNARDIN Benoit
              • Votes:
                8 Vote for this issue
                Watchers:
                15 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: