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 created issue -
          Brantone made changes -
          Description Original: 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)


          {code}
          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)
          {code}
          New: 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)




          {code}
          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)
          {code}
          Brantone made changes -
          Link New: This issue is related to JENKINS-28334 [ JENKINS-28334 ]

          Brantone added a comment - - edited

          Brantone added a comment - - edited Fixed in: https://github.com/jenkinsci/multiple-scms-plugin/pull/9 ... waiting on merge.
          Brantone made changes -
          Assignee Original: Kevin Bell [ kbell ] New: Brantone [ brantone ]
          Brantone made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]

          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]
          Craig Rodrigues made changes -
          Link New: This issue is duplicated by JENKINS-21169 [ JENKINS-21169 ]
          Jesse Glick made changes -
          Link New: This issue is related to JENKINS-29425 [ JENKINS-29425 ]
          Brantone made changes -
          Status Original: Resolved [ 5 ] New: Closed [ 6 ]

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

              Created:
              Updated:
              Resolved: