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

Single branch source multibranch pipeline fails to create on 2.264 and later

XMLWordPrintable

      I added a "Single source" branch source as the source for a multibranch pipeline to use the master branch of https://github.com/MarkEWaite/jenkins-bugs . I used a narrow refspec, honor refspec on initial clone, and a reference repository to keep the checkout process as fast as possible.

      The steps work without a stack trace with Jenkins 2.263 on Java 8.

      The steps failed with a stack trace with Jenkins 2.264, 2.265, and 2.266-SNAPSHOT.

      2020-11-08 05:00:33.510+0000 [id=1796]  WARNING o.e.j.s.h.ContextHandler$Context#log: Error while serving http://testing-a.markwaite.net:8080/job/Bugs-Pipeline-Checks/job/Single-SCM-source-GitHub/configSubmit
      java.lang.ClassNotFoundException: ["jenkins.scm.impl.SingleSCMSource","jenkins.branch.BranchSource"]
              at jenkins.telemetry.impl.java11.CatcherClassLoader.findClass(CatcherClassLoader.java:47)
              at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:589)
              at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
              at org.kohsuke.stapler.RequestImpl$TypePair.convertJSON(RequestImpl.java:669)
      Caused: java.lang.IllegalArgumentException: Class ["jenkins.scm.impl.SingleSCMSource","jenkins.branch.BranchSource"] is specified in JSON, but no such class found in jenkins.telemetry.impl.java11.CatcherClassLoader@58cdb77e
              at org.kohsuke.stapler.RequestImpl$TypePair.convertJSON(RequestImpl.java:674)
      Caused: java.lang.IllegalArgumentException: Failed to instantiate class jenkins.branch.BranchSource from {"stapler-class":["jenkins.scm.impl.SingleSCMSource","jenkins.branch.BranchSource"],"id":"bffd03ed-6b91-44ff-89ac-cd1ed4d73657","name":"master","":["0","0"],"scm":{"userRemoteConfigs":{"url":"https://github.com/MarkEWaite/jenkins-bugs","includeUser":"false","credentialsId":"MarkEWaite-github-username-password","name":"origin","refspec":"+refs/heads/master:refs/remotes/origin/master"},"branches":{"name":"*/master"},"gitTool":"Default","":"auto","extensions":{"noTags":true,"honorRefspec":true,"reference":"/var/lib/git/mwaite/bugs/jenkins-bugs.git","timeout":"","shallow":false,"depth":"","stapler-class":"hudson.plugins.git.extensions.impl.CloneOption","$class":"hudson.plugins.git.extensions.impl.CloneOption"},"stapler-class":"hudson.plugins.git.GitSCM","$class":"hudson.plugins.git.GitSCM"},"strategy":{"stapler-class":"jenkins.branch.DefaultBranchPropertyStrategy","$class":"jenkins.branch.DefaultBranchPropertyStrategy"},"kind":"jenkins.branch.BranchSource"}
              at org.kohsuke.stapler.RequestImpl$TypePair.convertJSON(RequestImpl.java:681)
              at org.kohsuke.stapler.RequestImpl.bindJSON(RequestImpl.java:478)
              at org.kohsuke.stapler.RequestImpl.bindJSON(RequestImpl.java:474)
              at org.kohsuke.stapler.RequestImpl.bindJSONToList(RequestImpl.java:512)
              at jenkins.branch.MultiBranchProject.submit(MultiBranchProject.java:896)
              at com.cloudbees.hudson.plugins.folder.AbstractFolder.doConfigSubmit(AbstractFolder.java:1363)
              at com.cloudbees.hudson.plugins.folder.computed.ComputedFolder.doConfigSubmit(ComputedFolder.java:414)
              at java.base/java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:710)
              at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:396)
      Caused: java.lang.reflect.InvocationTargetException
      

            Unassigned Unassigned
            markewaite Mark Waite
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: