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

Subversion Plug in 2.5 causes sporadic problems

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Critical Critical
    • blamesubversion-plugin
    • None
    • Jenkins 1.596, subversion-plugin 2.5, multijob-plgin 1.16

      Some SVN Updates work, some fail with following message:

      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:725)
      at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:860)
      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-26318] Subversion Plug in 2.5 causes sporadic problems

          Daniel Beck added a comment -

          Why do you think this issue has anything to do with the BlameSubversion plugin? If GitHub is right, the BlameSubversion project has no changes for 3 years. BlameSubversion also does not seem to do any custom class loading.

          Because it's a terrible idea to copy a class from another plugin, as that sets you up for trouble like this. Since Subversion plugin's existed first, BlameSubversion is the copy, and hence (no pun intended) to blame.

          Daniel Beck added a comment - Why do you think this issue has anything to do with the BlameSubversion plugin? If GitHub is right, the BlameSubversion project has no changes for 3 years. BlameSubversion also does not seem to do any custom class loading. Because it's a terrible idea to copy a class from another plugin, as that sets you up for trouble like this. Since Subversion plugin's existed first, BlameSubversion is the copy, and hence (no pun intended) to blame.

          Slawomir Czarko added a comment - - edited

          Why do you think this issue has anything to do with the BlameSubversion plugin? If GitHub is right, the BlameSubversion project has no changes for 3 years. BlameSubversion also does not seem to do any custom class loading.

          Because the problem doesn't appear with a custom version of BlameSubversion plugin where I've renamed SVNRevisionState class from BlameSubversion plugin to BlameSVNRevisionState.

          If anybody's interested the modified version of the plugin is here - https://github.com/ezjenkins/BlameSubversion-plugin

          Slawomir Czarko added a comment - - edited Why do you think this issue has anything to do with the BlameSubversion plugin? If GitHub is right, the BlameSubversion project has no changes for 3 years. BlameSubversion also does not seem to do any custom class loading. Because the problem doesn't appear with a custom version of BlameSubversion plugin where I've renamed SVNRevisionState class from BlameSubversion plugin to BlameSVNRevisionState. If anybody's interested the modified version of the plugin is here - https://github.com/ezjenkins/BlameSubversion-plugin

          I created PR 1 a while ago to provide compatibility with the blame subversion plugin, and svnkit 1.8.

          Steven Christou added a comment - I created PR 1 a while ago to provide compatibility with the blame subversion plugin, and svnkit 1.8.

          Slawomir Czarko added a comment - pull request

          Dmitriy Belyaev added a comment - - edited

          I hope they will do test\check\merge on your pull request as soon as possible.

          Dmitriy Belyaev added a comment - - edited I hope they will do test\check\merge on your pull request as soon as possible.

          Stephen Bade added a comment - - edited

          I have had this issue for over 2 years (cannot be cast error) in my production Jenkins. Over the Christmas break I did a update to the latest Java and Jenkins and all plugins, and finally found that this was the cause of the issue. Does someone have a .jpi file with this fix available? (from https://github.com/ezjenkins/BlameSubversion-plugin)

          Stephen Bade added a comment - - edited I have had this issue for over 2 years (cannot be cast error) in my production Jenkins. Over the Christmas break I did a update to the latest Java and Jenkins and all plugins, and finally found that this was the cause of the issue. Does someone have a .jpi file with this fix available? (from https://github.com/ezjenkins/BlameSubversion-plugin ) Or pointers on instructions to create the plugin? I tried building from: https://github.com/ezjenkins/BlameSubversion-plugin.git , no luck yet. That made a '.hpl' file that I assume is for Hudson, not Jenkins.

          .hpi file works with Jenkins as well.

          Btw, I stopped using this plug-in altogether about half a year ago. I don't remember what was the exact reason but it was still causing problems even with the patches.

          Slawomir Czarko added a comment - .hpi file works with Jenkins as well. Btw, I stopped using this plug-in altogether about half a year ago. I don't remember what was the exact reason but it was still causing problems even with the patches.

          sbade hpi works in Jenkins by default. Try to install your hpi file via "Manage Jenkins \ Manage Plugins \ Advanced \ Upload Plugin"

          Dmitriy Belyaev added a comment - sbade hpi works in Jenkins by default. Try to install your hpi file via "Manage Jenkins \ Manage Plugins \ Advanced \ Upload Plugin"

          Stephen Bade added a comment -

          Thanks for the tips! I found that my downstream jobs can still send emails to culprits without this plugin - the upstream build launches several downsream test jobs with the parameterized trigger plugin with the option to pass SVN revisions. I still would like an EVN var in the downstream job to print the SVN revision, but this is working. I may try this plugin again when it is more stable.
          This plugin is a great idea but it would be nice to have some kind of stability info in the plugin index that to help people avoid trouble. This might be hard to manage though.

          Stephen Bade added a comment - Thanks for the tips! I found that my downstream jobs can still send emails to culprits without this plugin - the upstream build launches several downsream test jobs with the parameterized trigger plugin with the option to pass SVN revisions. I still would like an EVN var in the downstream job to print the SVN revision, but this is working. I may try this plugin again when it is more stable. This plugin is a great idea but it would be nice to have some kind of stability info in the plugin index that to help people avoid trouble. This might be hard to manage though.

          Stephen Bade added a comment - - edited

          My last comment about passing SVN revisions turned out to not work after all.
          For my flow I do need this plugin. (build job launches multiple test jobs, test jobs update to the same SVN revision and sends emails to culprits)

          My flow is fixed now - I did a build (mvn package) using source from https://github.com/ezjenkins/BlameSubversion-plugin.git
          Thanks for the fix!

          If this helps anyone I put a copy of my build's .hpi file at:
          http://solidcode.org/downloads/BlameSubversion.hpi
          (sorry - website is very out of date).
          Hopefully the official plugin will be fixed soon.

          Stephen Bade added a comment - - edited My last comment about passing SVN revisions turned out to not work after all. For my flow I do need this plugin. (build job launches multiple test jobs, test jobs update to the same SVN revision and sends emails to culprits) My flow is fixed now - I did a build (mvn package) using source from https://github.com/ezjenkins/BlameSubversion-plugin.git Thanks for the fix! If this helps anyone I put a copy of my build's .hpi file at: http://solidcode.org/downloads/BlameSubversion.hpi (sorry - website is very out of date). Hopefully the official plugin will be fixed soon.

            schristou Steven Christou
            cgrb Christian Grobauer
            Votes:
            21 Vote for this issue
            Watchers:
            32 Start watching this issue

              Created:
              Updated: