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

"Tag this Build" fails for 1.311+ with SVN Plugin

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • subversion-plugin
    • None
    • Platform: All, OS: Windows XP

      We are running with Subversion SCM and it looks like the tagging feature no
      longer works ("Tag this build".) After a clean restart of Hudson, below is the
      error message you get the first time you try to tag. Subsequent attempts don't
      display anything, it just resets the page. In neither case does the tag actually
      take place in SVN.

      I have tested this in 1.311 as well as 1.314 and the problem continues to
      exists. I haven't tried prior to 1.311 since I don't want to downgrade SVNkit in
      case there's workspace working copy version problems with the downgrade. If I
      had to guess i presume it's something to do with SVNkit upgrade of the new
      isolation of the SVN support in the recent builds?

      ====
      Tagging svn://.../trunk (rev.23689) to svn://.../tags/test

      tried to access field hudson.scm.AbstractScmTagAction.build from class
      hudson.scm.SubversionTagAction$TagWorkerThread

      java.lang.IllegalAccessError: tried to access field
      hudson.scm.AbstractScmTagAction.build from class
      hudson.scm.SubversionTagAction$TagWorkerThread
      at
      hudson.scm.SubversionTagAction$TagWorkerThread.perform(SubversionTagAction.java:204)
      at hudson.model.TaskThread.run(TaskThread.java:116)

      Completed
      ====

          [JENKINS-4018] "Tag this Build" fails for 1.311+ with SVN Plugin

          nico added a comment -

          I can reproduce this using (on Ubuntu)

          java.runtime.name OpenJDK Runtime Environment
          java.runtime.version 1.6.0_0-b14

          java.runtime.name Java(TM) SE Runtime Environment
          java.runtime.version 1.6.0_14-b08

          and 1.6.0_14 on Windows

          Even "Subsequent attempts don't display anything", adding a System.err to the
          catch(Throwable) in TagWorkerThread#perform() shows that this point is reached
          in subsequent attempts, but for some reason the message is not forwarded to the
          ui (and I don't even understand this behaviour - it seems that nothing is
          changed on disk by the first attempt).

          Changing the field-access of "build" to a call to getBuild() causes the tagging
          to work for me, but I'm getting the following stack-trace afterwards:

          WARNUNG: Caught exception evaluating: tags.entrySet. Reason:
          java.lang.ClassCastException: hudson.scm.SubversionSCM$SvnInfo cannot be cast to
          java.lang.String
          java.lang.ClassCastException: hudson.scm.SubversionSCM$SvnInfo cannot be cast to
          java.lang.String
          at java.lang.String.compareTo(String.java:92)
          at java.util.TreeMap.getEntry(TreeMap.java:328)
          at java.util.TreeMap.containsKey(TreeMap.java:209)
          at hudson.util.CopyOnWriteMap.containsKey(CopyOnWriteMap.java:81)
          at java.util.Collections$UnmodifiableMap.containsKey(Collections.java:1280)
          ...

          But this may simply be caused by me not properly understanding how to "debug"
          such a thing the "right" way (or hudson overwriting subversion.hpi each time
          it's restartet...)

          I deployed subversion-1.5-SNAPSHOT.hpi to the plugins-directory, touch'ed
          subversion.hpi.disabled, Plugin-Manager is showing 1.4 of the plugin as not active.

          nico added a comment - I can reproduce this using (on Ubuntu) java.runtime.name OpenJDK Runtime Environment java.runtime.version 1.6.0_0-b14 java.runtime.name Java(TM) SE Runtime Environment java.runtime.version 1.6.0_14-b08 and 1.6.0_14 on Windows Even "Subsequent attempts don't display anything", adding a System.err to the catch(Throwable) in TagWorkerThread#perform() shows that this point is reached in subsequent attempts, but for some reason the message is not forwarded to the ui (and I don't even understand this behaviour - it seems that nothing is changed on disk by the first attempt). Changing the field-access of "build" to a call to getBuild() causes the tagging to work for me, but I'm getting the following stack-trace afterwards: WARNUNG: Caught exception evaluating: tags.entrySet. Reason: java.lang.ClassCastException: hudson.scm.SubversionSCM$SvnInfo cannot be cast to java.lang.String java.lang.ClassCastException: hudson.scm.SubversionSCM$SvnInfo cannot be cast to java.lang.String at java.lang.String.compareTo(String.java:92) at java.util.TreeMap.getEntry(TreeMap.java:328) at java.util.TreeMap.containsKey(TreeMap.java:209) at hudson.util.CopyOnWriteMap.containsKey(CopyOnWriteMap.java:81) at java.util.Collections$UnmodifiableMap.containsKey(Collections.java:1280) ... But this may simply be caused by me not properly understanding how to "debug" such a thing the "right" way (or hudson overwriting subversion.hpi each time it's restartet...) I deployed subversion-1.5-SNAPSHOT.hpi to the plugins-directory, touch'ed subversion.hpi.disabled, Plugin-Manager is showing 1.4 of the plugin as not active.

          nico added a comment -

          Created an attachment (id=814)
          Patch, changing references to build by a call to getBuild()

          nico added a comment - Created an attachment (id=814) Patch, changing references to build by a call to getBuild()

          Code changed in hudson
          User: : mindless
          Path:
          trunk/hudson/plugins/subversion/src/main/java/hudson/scm/SubversionTagAction.java
          http://fisheye4.cenqua.com/changelog/hudson/?cs=20542
          Log:
          JENKINS-4018 some users report IllegalAccessError when SubversionTagAction
          references "build" field.. this has protected access so should be ok, but
          maybe some jvms have trouble with this now that subversion is a plugin.
          Changed build references to getBuild().

          SCM/JIRA link daemon added a comment - Code changed in hudson User: : mindless Path: trunk/hudson/plugins/subversion/src/main/java/hudson/scm/SubversionTagAction.java http://fisheye4.cenqua.com/changelog/hudson/?cs=20542 Log: JENKINS-4018 some users report IllegalAccessError when SubversionTagAction references "build" field.. this has protected access so should be ok, but maybe some jvms have trouble with this now that subversion is a plugin. Changed build references to getBuild().

          Flominator added a comment -

          I don't really understand the current status of this. It was included in trunk,
          right? Does that mean, it is also included in 1.320 or only in the nightly builds?

          Flominator added a comment - I don't really understand the current status of this. It was included in trunk, right? Does that mean, it is also included in 1.320 or only in the nightly builds?

          Alan Harder added a comment -

          it is waiting on the next release of the subversion plugin.. I just asked
          kohsuke and he'll release subversion plugin sometime before or with hudson 1.321.

          Alan Harder added a comment - it is waiting on the next release of the subversion plugin.. I just asked kohsuke and he'll release subversion plugin sometime before or with hudson 1.321.

          Alan Harder added a comment -
              • Issue 4262 has been marked as a duplicate of this issue. ***

          Alan Harder added a comment - Issue 4262 has been marked as a duplicate of this issue. ***

          kame added a comment -
              • Issue 4200 has been marked as a duplicate of this issue. ***

          kame added a comment - Issue 4200 has been marked as a duplicate of this issue. ***

          This is released as Subversion plugin 1.5 and will be Hudson 1.321.

          Kohsuke Kawaguchi added a comment - This is released as Subversion plugin 1.5 and will be Hudson 1.321.

          kame added a comment -

          Works with 1.320 upgrading the Subversion Plugin "by hand". Not sure it's
          recommended though.

          kame added a comment - Works with 1.320 upgrading the Subversion Plugin "by hand". Not sure it's recommended though.

          hoob added a comment -

          Confirmed fixed with Hudson 1.321; thanks.

          hoob added a comment - Confirmed fixed with Hudson 1.321; thanks.

            Unassigned Unassigned
            hoob hoob
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: