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

SVN: string index out of range: -1 at hudson.scm.DirAwareSVNXMLLogHandler.sendToHandler(DirAwareSVNXMLLogHandler.java:121)

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      We're building multiple projects checked out of SVN using Jenkins. Every once in a while they fail with this exception:

      FATAL: String index out of range: -1
      java.lang.StringIndexOutOfBoundsException: String index out of range: -1

      For one particular project, which is quite small and involves checking out one item, half of the builds fail. Even when this exception is raised, the checkout seems successful (I compare the output to successful builds). Maybe it fails while trying to determine the list of changes? The checkout strategy is 'always check out a fresh copy'; for build triggers, I've set 'poll SCM' @midnight and 'trigger remotely'. IIRC the exception also happens for builds triggered remotely.

      Let me know if you need more info. Both the SVN and Jenkins servers are internal to the company. I've attached the XML file I get by querying the plugin list using 'http://<jenkins>/pluginManager/api/xml?depth=1' in a browser (based on http://stackoverflow.com/questions/9815273/how-to-get-a-list-of-installed-jenkins-plugins-with-name-and-version-pair)

      Checking out <repo> at revision '2014-10-08T03:18:06.153 -0500'
      A License
      AU build_deb.sh
      A debug
      [...]
      A test/python/gb_json_tester.py
      A test/python/test_simpleCmd.py
      A test/python/test_cmds.py
      U .
      At revision 126377
      FATAL: String index out of range: -1

      java.lang.StringIndexOutOfBoundsException: String index out of range: -1
      at java.lang.String.substring(String.java:1875)
      at hudson.scm.DirAwareSVNXMLLogHandler.sendToHandler(DirAwareSVNXMLLogHandler.java:121)
      at hudson.scm.DirAwareSVNXMLLogHandler.handleLogEntry(DirAwareSVNXMLLogHandler.java:83)
      at org.tmatesoft.svn.core.internal.wc2.compat.SvnCodec$7.receive(SvnCodec.java:167)
      at org.tmatesoft.svn.core.internal.wc2.compat.SvnCodec$7.receive(SvnCodec.java:164)
      at org.tmatesoft.svn.core.wc2.SvnReceivingOperation.receive(SvnReceivingOperation.java:78)
      at org.tmatesoft.svn.core.internal.wc2.remote.SvnRemoteLog.handleLogEntry(SvnRemoteLog.java:199)
      at org.tmatesoft.svn.core.internal.io.svn.SVNRepositoryImpl.logImpl(SVNRepositoryImpl.java:827)
      at org.tmatesoft.svn.core.io.SVNRepository.log(SVNRepository.java:1035)
      at org.tmatesoft.svn.core.internal.wc2.remote.SvnRemoteLog.run(SvnRemoteLog.java:181)
      at org.tmatesoft.svn.core.internal.wc2.remote.SvnRemoteLog.run(SvnRemoteLog.java:35)
      at org.tmatesoft.svn.core.internal.wc2.SvnOperationRunner.run(SvnOperationRunner.java:20)
      at org.tmatesoft.svn.core.wc2.SvnOperationFactory.run(SvnOperationFactory.java:1238)
      at org.tmatesoft.svn.core.wc2.SvnOperation.run(SvnOperation.java:294)
      at org.tmatesoft.svn.core.wc.SVNLogClient.doLog(SVNLogClient.java:967)
      at org.tmatesoft.svn.core.wc.SVNLogClient.doLog(SVNLogClient.java:872)
      at hudson.scm.SubversionChangeLogBuilder.buildModule(SubversionChangeLogBuilder.java:179)
      at hudson.scm.SubversionChangeLogBuilder.run(SubversionChangeLogBuilder.java:118)
      at hudson.scm.SubversionSCM.calcChangeLog(SubversionSCM.java:735)
      at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:873)
      at hudson.model.AbstractProject.checkout(AbstractProject.java:1254)
      at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:624)
      at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
      at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:530)
      at hudson.model.Run.execute(Run.java:1740)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      at hudson.model.ResourceController.execute(ResourceController.java:88)
      at hudson.model.Executor.run(Executor.java:234)

        Attachments

          Issue Links

            Activity

            fencekicker Stefan Puiu created issue -
            Hide
            fencekicker Stefan Puiu added a comment -

            After a bit of digging, I've found https://issues.jenkins-ci.org/browse/JENKINS-23146. Will get our Jenkins admins to install SVN plugin 2.4.3 and mark this as duplicate if that works. The symptoms match - we merge code into this particular branch, that's why the build fails every time using poll SCM, but succeeds if I build manually when there are no changes...

            Show
            fencekicker Stefan Puiu added a comment - After a bit of digging, I've found https://issues.jenkins-ci.org/browse/JENKINS-23146 . Will get our Jenkins admins to install SVN plugin 2.4.3 and mark this as duplicate if that works. The symptoms match - we merge code into this particular branch, that's why the build fails every time using poll SCM, but succeeds if I build manually when there are no changes...
            Hide
            danielbeck Daniel Beck added a comment -

            Yeah, JENKINS-23146 is the same issue as this.

            Show
            danielbeck Daniel Beck added a comment - Yeah, JENKINS-23146 is the same issue as this.
            danielbeck Daniel Beck made changes -
            Field Original Value New Value
            Resolution Duplicate [ 3 ]
            Status Open [ 1 ] Resolved [ 5 ]
            danielbeck Daniel Beck made changes -
            Link This issue duplicates JENKINS-23146 [ JENKINS-23146 ]
            rtyler R. Tyler Croy made changes -
            Workflow JNJira [ 158941 ] JNJira + In-Review [ 195935 ]

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              fencekicker Stefan Puiu
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: