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

GIT : Fatal : ClassCastException: hudson.scm.SCMRevisionState$None cannot be cast to org.jenkinsci.plugins.multiplescms.MultiSCMRevisionState

      Using Jenkins vers: 1.594
      Plugin vers: 0.4
      Git vers: 2.3.5

      I'm having trouble tracing the reproducibility on this, error copied below, but here's what I know so far:

      • My only experience with this is Git
      • Does not seem to affect brand new projects that have never been built, regardless if first config was singular or multi-scm
      • Does seem to affect projects that at first were singular SCM, then transition to Multi-SCM
      • If project was previously built and threw error, can config the project to have Multi-SCM selected, but with NO SCM chosen, this will throw a separate error, but then if you go back and re-set up with Git SCM chosen in Multi-SCM then it does work.
      • The value of "RevisionState" must be getting set, and reset somewhere to cause this to not-work, then eventually work, although I haven't found where, or what the correct combination is.

      ("singular" taken to mean just choosing Git SCM, NOT 1 repo of Git SCM within Multi-SCM option)

      FATAL: hudson.scm.SCMRevisionState$None cannot be cast to org.jenkinsci.plugins.multiplescms.MultiSCMRevisionState
      java.lang.ClassCastException: hudson.scm.SCMRevisionState$None cannot be cast to org.jenkinsci.plugins.multiplescms.MultiSCMRevisionState
      	at org.jenkinsci.plugins.multiplescms.MultiSCM.checkout(MultiSCM.java:106)
      	at hudson.scm.SCM.checkout(SCM.java:484)
      	at hudson.model.AbstractProject.checkout(AbstractProject.java:1265)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:622)
      	at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:528)
      	at com.tikal.jenkins.plugins.multijob.MultiJobBuild$MultiJobRunnerImpl.run(MultiJobBuild.java:134)
      	at hudson.model.Run.execute(Run.java:1759)
      	at com.tikal.jenkins.plugins.multijob.MultiJobBuild.run(MultiJobBuild.java:73)
      	at hudson.model.ResourceController.execute(ResourceController.java:89)
      	at hudson.model.Executor.run(Executor.java:240)
      

          [JENKINS-27638] GIT : Fatal : ClassCastException: hudson.scm.SCMRevisionState$None cannot be cast to org.jenkinsci.plugins.multiplescms.MultiSCMRevisionState

          Brantone added a comment - - edited

          Brantone added a comment - - edited Fixed in: https://github.com/jenkinsci/multiple-scms-plugin/pull/9 ... waiting on merge.

          Code changed in jenkins
          User: Brantone
          Path:
          src/main/java/org/jenkinsci/plugins/multiplescms/MultiSCM.java
          http://jenkins-ci.org/commit/multiple-scms-plugin/b25484f2510db17c0200342e29a567c0ecd7903a
          Log:
          In checkout(), catch ClassCastException for MultiSCMRevisionState

          [FIXED JENKINS-27638]

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Brantone Path: src/main/java/org/jenkinsci/plugins/multiplescms/MultiSCM.java http://jenkins-ci.org/commit/multiple-scms-plugin/b25484f2510db17c0200342e29a567c0ecd7903a Log: In checkout(), catch ClassCastException for MultiSCMRevisionState [FIXED JENKINS-27638]

          Neon Ngo added a comment -

          I am running Jenkins ver. 1.625.3, Git Plugin 2.3.5, Multiple SCMs plugin 0.4 and got the below error

          I selected Multiple SCMs and added two Git repos...

          FATAL: hudson.scm.SCMRevisionState$None cannot be cast to org.jenkinsci.plugins.multiplescms.MultiSCMRevisionState
          java.lang.ClassCastException: hudson.scm.SCMRevisionState$None cannot be cast to org.jenkinsci.plugins.multiplescms.MultiSCMRevisionState
          at org.jenkinsci.plugins.multiplescms.MultiSCM.checkout(MultiSCM.java:106)
          at hudson.scm.SCM.checkout(SCM.java:485)
          at hudson.model.AbstractProject.checkout(AbstractProject.java:1275)
          at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:610)
          at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
          at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:532)
          at hudson.model.Run.execute(Run.java:1741)
          at hudson.matrix.MatrixBuild.run(MatrixBuild.java:306)
          at hudson.model.ResourceController.execute(ResourceController.java:98)
          at hudson.model.Executor.run(Executor.java:408)
          Finished: FAILURE

          actually, I got the same ClassCastException when I only had one Git Repo under Multiple SCM repo.

          What plugin and version is this issue fixed under?

          Neon Ngo added a comment - I am running Jenkins ver. 1.625.3, Git Plugin 2.3.5, Multiple SCMs plugin 0.4 and got the below error I selected Multiple SCMs and added two Git repos... FATAL: hudson.scm.SCMRevisionState$None cannot be cast to org.jenkinsci.plugins.multiplescms.MultiSCMRevisionState java.lang.ClassCastException: hudson.scm.SCMRevisionState$None cannot be cast to org.jenkinsci.plugins.multiplescms.MultiSCMRevisionState at org.jenkinsci.plugins.multiplescms.MultiSCM.checkout(MultiSCM.java:106) at hudson.scm.SCM.checkout(SCM.java:485) at hudson.model.AbstractProject.checkout(AbstractProject.java:1275) at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:610) at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:532) at hudson.model.Run.execute(Run.java:1741) at hudson.matrix.MatrixBuild.run(MatrixBuild.java:306) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:408) Finished: FAILURE actually, I got the same ClassCastException when I only had one Git Repo under Multiple SCM repo. What plugin and version is this issue fixed under?

          Brantone added a comment -

          Was for 0.4, and 0.5 was released in July.

          Brantone added a comment - Was for 0.4, and 0.5 was released in July.

            brantone Brantone
            brantone Brantone
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: