The latest update of the Subversion plugin causes a class cast exception in the Multiple SCM plugin. If subversion is selected as one of the SCM sources in the multiple scm plugin a class cast exception generates the attached logs when updating or checking out new code.

      For the moment we have rolled back our Subversion plugin to 2.4.5 to work around this issue.

          [JENKINS-26303] Not compatible with Subversion plugin 2.5

          I consider this to be a critical bug since it make the plugin not work.

          Per Arnold Blaasmo added a comment - I consider this to be a critical bug since it make the plugin not work.

          Issue confirmed. Plugin not working ATM.

          Alexander Ziller added a comment - Issue confirmed. Plugin not working ATM.

          I see that there is this pull request against MultiSCM which might fix
          the problem:

          https://github.com/jenkinsci/multiple-scms-plugin/pull/6

          I'm not sure though if the Subversion 2.5 plugin has introduced new bugs
          which caused this breakage.

          Craig Rodrigues added a comment - I see that there is this pull request against MultiSCM which might fix the problem: https://github.com/jenkinsci/multiple-scms-plugin/pull/6 I'm not sure though if the Subversion 2.5 plugin has introduced new bugs which caused this breakage.

          I submitted this fix to the MultiSCM plugin:

          https://github.com/jenkinsci/multiple-scms-plugin/pull/7

          I have a build of the plugin with my fix here:
          https://people.freebsd.org/~rodrigc/JENKINS-26303/

          Can you try it and provide feedbacK?

          Craig Rodrigues added a comment - I submitted this fix to the MultiSCM plugin: https://github.com/jenkinsci/multiple-scms-plugin/pull/7 I have a build of the plugin with my fix here: https://people.freebsd.org/~rodrigc/JENKINS-26303/ Can you try it and provide feedbacK?

          Per Arnold Blaasmo added a comment - - edited

          I have tested your plugin fix, and it works now.

          Per Arnold Blaasmo added a comment - - edited I have tested your plugin fix, and it works now.

          Chris Tea added a comment -

          I tried this fix, it did fix the exception, but somehow I found the changelog was missing for multi-scm build.

          In the xml of one multi-scm build, there were no items for changeSet.
          <changeSet>
          <kind>Multi[git, svn]</kind>
          </changeSet>

          Any idea?

          Chris Tea added a comment - I tried this fix, it did fix the exception, but somehow I found the changelog was missing for multi-scm build. In the xml of one multi-scm build, there were no items for changeSet. <changeSet> <kind>Multi [git, svn] </kind> </changeSet> Any idea?

          Can you provide a sample job with multiple SCM's configured which shows the problem?

          Does your problem sound similar to what this pull request is trying to fix:

          https://github.com/jenkinsci/multiple-scms-plugin/pull/8

          Craig Rodrigues added a comment - Can you provide a sample job with multiple SCM's configured which shows the problem? Does your problem sound similar to what this pull request is trying to fix: https://github.com/jenkinsci/multiple-scms-plugin/pull/8

          Chris Tea added a comment - - edited

          I have attached a sample. In my multi-scm setting, there is one git and two svn sources. But GIT's changelog is not missing. Only the svn changelog is missing. So I am not sure the pull request can completely fix this issue.

          Chris Tea added a comment - - edited I have attached a sample. In my multi-scm setting, there is one git and two svn sources. But GIT's changelog is not missing. Only the svn changelog is missing. So I am not sure the pull request can completely fix this issue.

          Code changed in jenkins
          User: Craig Rodrigues
          Path:
          src/main/java/org/jenkinsci/plugins/multiplescms/MultiSCM.java
          http://jenkins-ci.org/commit/multiple-scms-plugin/1e7d7bd69f923d1a78a9a03a1beb24aab0dcc7e5
          Log:
          Do not add a SCMRevisionState of type MultiSCMRevisionState
          to the MultiSCMRevisionState variable associated with the overal job.

          When a MultiSCM.checkout() is done, the list of SCMs is iterated
          over. For each SCM in the list, we obtain the SCMRevisionState
          for that SCM and pass it down to the checkout() method for each SCM.
          For a Subversion checkout, the Subversion plugin
          downcasts the revision revision state to SVNRevisionState.

          Without this fix, a revision state of type MultiSCMRevisionState
          was being passed down into the Subversion plugin. This was
          causing a ClassCastException to be thrown.

          [FIXED JENKINS-26303]

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Craig Rodrigues Path: src/main/java/org/jenkinsci/plugins/multiplescms/MultiSCM.java http://jenkins-ci.org/commit/multiple-scms-plugin/1e7d7bd69f923d1a78a9a03a1beb24aab0dcc7e5 Log: Do not add a SCMRevisionState of type MultiSCMRevisionState to the MultiSCMRevisionState variable associated with the overal job. When a MultiSCM.checkout() is done, the list of SCMs is iterated over. For each SCM in the list, we obtain the SCMRevisionState for that SCM and pass it down to the checkout() method for each SCM. For a Subversion checkout, the Subversion plugin downcasts the revision revision state to SVNRevisionState. Without this fix, a revision state of type MultiSCMRevisionState was being passed down into the Subversion plugin. This was causing a ClassCastException to be thrown. [FIXED JENKINS-26303]

          Brantone added a comment -

          I have a sneaking suspicion this also solves a similar problem for multi-Git that seems to appear (my current theory is happens on projects that had previous builds, as opposed to brand new projects):

          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)
          

          Will test out fix.

          Brantone added a comment - I have a sneaking suspicion this also solves a similar problem for multi-Git that seems to appear (my current theory is happens on projects that had previous builds, as opposed to brand new projects): 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) Will test out fix.

          I released version 0.4 of the Multiple SCMs plugin, so you can give that a try and report back here if it fixes your problem.

          Craig Rodrigues added a comment - I released version 0.4 of the Multiple SCMs plugin, so you can give that a try and report back here if it fixes your problem.

          Brantone added a comment -

          Oh, I do have the latest version, I thought the commit was just after release, not prior
          Drat, back to the drawing board ... but it does seem somewhat related on casting.

          Brantone added a comment - Oh, I do have the latest version, I thought the commit was just after release, not prior Drat, back to the drawing board ... but it does seem somewhat related on casting.

          Andrei Costescu added a comment - - edited

          I still have this after updating plugins today (Jenkins 1.608, Multiple SCMs plugin 0.4, Subversion Plug-in 2.5):

          At revision 5763
          FATAL: org.jenkinsci.plugins.multiplescms.MultiSCMRevisionState cannot be cast to hudson.scm.SVNRevisionState
          java.lang.ClassCastException: org.jenkinsci.plugins.multiplescms.MultiSCMRevisionState cannot be cast to hudson.scm.SVNRevisionState
          	at hudson.scm.SubversionSCM.calcChangeLog(SubversionSCM.java:725)
          	at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:860)
          	at org.jenkinsci.plugins.multiplescms.MultiSCM.checkout(MultiSCM.java:122)
          	at hudson.scm.SCM.checkout(SCM.java:484)
          	at hudson.model.AbstractProject.checkout(AbstractProject.java:1270)
          	at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:609)
          	at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
          	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:531)
          	at hudson.model.Run.execute(Run.java:1741)
          	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
          	at hudson.model.ResourceController.execute(ResourceController.java:98)
          	at hudson.model.Executor.run(Executor.java:374)

          Andrei Costescu added a comment - - edited I still have this after updating plugins today (Jenkins 1.608, Multiple SCMs plugin 0.4, Subversion Plug-in 2.5): At revision 5763 FATAL: org.jenkinsci.plugins.multiplescms.MultiSCMRevisionState cannot be cast to hudson.scm.SVNRevisionState java.lang.ClassCastException: org.jenkinsci.plugins.multiplescms.MultiSCMRevisionState cannot be cast to hudson.scm.SVNRevisionState at hudson.scm.SubversionSCM.calcChangeLog(SubversionSCM.java:725) at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:860) at org.jenkinsci.plugins.multiplescms.MultiSCM.checkout(MultiSCM.java:122) at hudson.scm.SCM.checkout(SCM.java:484) at hudson.model.AbstractProject.checkout(AbstractProject.java:1270) at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:609) at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:531) at hudson.model.Run.execute(Run.java:1741) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:374)

          Should I reopen the issue? As far as I understand the configuration I tried should have worked (contains the fix) right?
          (I see all linked duplicate cases are closed now as well)

          Andrei Costescu added a comment - Should I reopen the issue? As far as I understand the configuration I tried should have worked (contains the fix) right? (I see all linked duplicate cases are closed now as well)

          LuFrija added a comment -

          Have the same here, jenkins 1596.2, subversion plugin 2.5 and mulitplescm plugin 0.3.

          [bit off-topic: strangely if I upgrade the multiple scm plugin to 0.5 then all the jobs using it are not visible anymore in Jenkins. If I revert then they are visible again]

          However, I replicated the very same job on a different installation of Jenkins (same versions: 1596.2, subversion 2.5 and mulitplescm 0.3, later upgraded to 0.5) and it worked fine. I now have the same suspect as Brantone, that existing projects that had already some build are affected by the bug, new projects are not.

          LuFrija added a comment - Have the same here, jenkins 1596.2, subversion plugin 2.5 and mulitplescm plugin 0.3. [bit off-topic: strangely if I upgrade the multiple scm plugin to 0.5 then all the jobs using it are not visible anymore in Jenkins. If I revert then they are visible again] However, I replicated the very same job on a different installation of Jenkins (same versions: 1596.2, subversion 2.5 and mulitplescm 0.3, later upgraded to 0.5) and it worked fine. I now have the same suspect as Brantone, that existing projects that had already some build are affected by the bug, new projects are not.

          rocco: can you look at the XML for a job created with multiple-scms 0.3, and the XML for an identical job created on a server using multiple-scms 0.5?
          Are there any differences?

          multiple-scms isn't really maintained. I applied some fixes to keep the plugin on life-support and somewhat working for my needs.

          The Jenkins developers are recommending that for complicated workflows, people should investigate using the workflow plugin.
          I understand that this is not practical for people who have many existing jobs which using plugins like multiple-scms,
          but I thought I would mention it, in case that is a possibility.

          Craig Rodrigues added a comment - rocco : can you look at the XML for a job created with multiple-scms 0.3, and the XML for an identical job created on a server using multiple-scms 0.5? Are there any differences? multiple-scms isn't really maintained. I applied some fixes to keep the plugin on life-support and somewhat working for my needs. The Jenkins developers are recommending that for complicated workflows, people should investigate using the workflow plugin. I understand that this is not practical for people who have many existing jobs which using plugins like multiple-scms, but I thought I would mention it, in case that is a possibility.

          LuFrija added a comment -

          Hi Craig

          I had a look but there aren't any differences beside the multiple-scm plugin version. I'll try to move to subversion plugin 2.5.1 and see whether this helps.

          LuFrija added a comment - Hi Craig I had a look but there aren't any differences beside the multiple-scm plugin version. I'll try to move to subversion plugin 2.5.1 and see whether this helps.

          Dave Taddei added a comment -

          This now appears to occur with Subversion plugin 2.5.2 also

          00:00:04.041 FATAL: org.jenkinsci.plugins.multiplescms.MultiSCMRevisionState cannot be cast to hudson.scm.SVNRevisionState
          00:00:04.041 java.lang.ClassCastException: org.jenkinsci.plugins.multiplescms.MultiSCMRevisionState cannot be cast to hudson.scm.SVNRevisionState
          00:00:04.042 at hudson.scm.SubversionSCM.calcChangeLog(SubversionSCM.java:726)
          00:00:04.042 at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:861)
          00:00:04.042 at org.jenkinsci.plugins.multiplescms.MultiSCM.checkout(MultiSCM.java:129)
          00:00:04.042 at hudson.scm.SCM.checkout(SCM.java:485)
          00:00:04.042 at hudson.model.AbstractProject.checkout(AbstractProject.java:1284)
          00:00:04.042 at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:610)
          00:00:04.042 at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
          00:00:04.042 at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:532)
          00:00:04.042 at hudson.model.Run.execute(Run.java:1741)
          00:00:04.042 at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:531)
          00:00:04.042 at hudson.model.ResourceController.execute(ResourceController.java:98)
          00:00:04.042 at hudson.model.Executor.run(Executor.java:381)

          Dave Taddei added a comment - This now appears to occur with Subversion plugin 2.5.2 also 00:00:04.041 FATAL: org.jenkinsci.plugins.multiplescms.MultiSCMRevisionState cannot be cast to hudson.scm.SVNRevisionState 00:00:04.041 java.lang.ClassCastException: org.jenkinsci.plugins.multiplescms.MultiSCMRevisionState cannot be cast to hudson.scm.SVNRevisionState 00:00:04.042 at hudson.scm.SubversionSCM.calcChangeLog(SubversionSCM.java:726) 00:00:04.042 at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:861) 00:00:04.042 at org.jenkinsci.plugins.multiplescms.MultiSCM.checkout(MultiSCM.java:129) 00:00:04.042 at hudson.scm.SCM.checkout(SCM.java:485) 00:00:04.042 at hudson.model.AbstractProject.checkout(AbstractProject.java:1284) 00:00:04.042 at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:610) 00:00:04.042 at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86) 00:00:04.042 at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:532) 00:00:04.042 at hudson.model.Run.execute(Run.java:1741) 00:00:04.042 at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:531) 00:00:04.042 at hudson.model.ResourceController.execute(ResourceController.java:98) 00:00:04.042 at hudson.model.Executor.run(Executor.java:381)

          Yariv Sheizaf added a comment -

          I get the following error using version 2.5.2 :

          FATAL: hudson.scm.SVNRevisionState cannot be cast to hudson.scm.SVNRevisionState
          java.lang.ClassCastException: hudson.scm.SVNRevisionState cannot be cast to hudson.scm.SVNRevisionState
          at hudson.scm.SubversionSCM.calcChangeLog(SubversionSCM.java:726)
          at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:861)
          at hudson.scm.SCM.checkout(SCM.java:485)
          at hudson.model.AbstractProject.checkout(AbstractProject.java:1282)
          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:1744)
          at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
          at hudson.model.ResourceController.execute(ResourceController.java:98)
          at hudson.model.Executor.run(Executor.java:374)

          Yariv Sheizaf added a comment - I get the following error using version 2.5.2 : FATAL: hudson.scm.SVNRevisionState cannot be cast to hudson.scm.SVNRevisionState java.lang.ClassCastException: hudson.scm.SVNRevisionState cannot be cast to hudson.scm.SVNRevisionState at hudson.scm.SubversionSCM.calcChangeLog(SubversionSCM.java:726) at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:861) at hudson.scm.SCM.checkout(SCM.java:485) at hudson.model.AbstractProject.checkout(AbstractProject.java:1282) 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:1744) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:374)

          Dave Taddei added a comment -

          This now works for me.

          If you installed the MultiSCM plugin first, then update the subversion plugin then a restart of the server is required.

          If you installed subversion plugin first then the MultiSCM plugin it appears to work without a restart.

          Thanks!

          Dave Taddei added a comment - This now works for me. If you installed the MultiSCM plugin first, then update the subversion plugin then a restart of the server is required. If you installed subversion plugin first then the MultiSCM plugin it appears to work without a restart. Thanks!

          Peter Pakos added a comment - - edited

          It does not work for us with Jenkins 1.629 and Subversion plugin 2.5.3 which had to be reverted back to 2.4.5.

          Peter Pakos added a comment - - edited It does not work for us with Jenkins 1.629 and Subversion plugin 2.5.3 which had to be reverted back to 2.4.5.

          Dave Taddei added a comment -

          I have not been able to reproduce this bug with more recent versions of jenkins, multi-scm and svn plugin.

          Dave Taddei added a comment - I have not been able to reproduce this bug with more recent versions of jenkins, multi-scm and svn plugin.

          Peter Pakos added a comment -

          drtaddei, could you please confirm which versions of jenkins, multi-scm and svn plugin you have tried and seen this fully working?

          Peter Pakos added a comment - drtaddei , could you please confirm which versions of jenkins, multi-scm and svn plugin you have tried and seen this fully working?

          Peter Pakos added a comment -

          It's still happening for us with the most recent versions of Jenkins and the plugins.

          drtaddei, what versions have you tried it with?

          Peter Pakos added a comment - It's still happening for us with the most recent versions of Jenkins and the plugins. drtaddei , what versions have you tried it with?

          Dave Taddei added a comment -

          we are now on 2.15, multi-scm 0.6, subversion 2.6, also this bug should not be assigned to me

          Dave Taddei added a comment - we are now on 2.15, multi-scm 0.6, subversion 2.6, also this bug should not be assigned to me

          Cannot reproduce: Jenkins 2.16, multiple-scms 0.6, Subversion Plug-in 2.6

          Craig Rodrigues added a comment - Cannot reproduce: Jenkins 2.16, multiple-scms 0.6, Subversion Plug-in 2.6

            Unassigned Unassigned
            drtaddei Dave Taddei
            Votes:
            9 Vote for this issue
            Watchers:
            15 Start watching this issue

              Created:
              Updated:
              Resolved: