java.lang.StringIndexOutOfBoundsException: String index out of range: -7

Jenkins JIRA | Kevin Cross | 3 years ago
  1. 0

    I upgraded to Jenkins 1.554.1 with Subversion plugin 2.4 yesterday and I am seeing this and similar in the build logs of some jobs trying to checkout code from subversion: {code} FATAL: String index out of range: -7 java.lang.StringIndexOutOfBoundsException: String index out of range: -7 at java.lang.String.substring(String.java:1875) at hudson.scm.DirAwareSVNXMLLogHandler.sendToHandler(DirAwareSVNXMLLogHandler.java:111) at hudson.scm.DirAwareSVNXMLLogHandler.handleLogEntry(DirAwareSVNXMLLogHandler.java:82) 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:1414) at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:671) at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:580) at hudson.model.Run.execute(Run.java:1676) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:529) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:231) {code} Note that the index is not always -7. When the job is rerun the next build does the checkout no problem. I am aware of JENKINS-22199 and this looks very similar but JENKINS-22199 is meant to have been fixed in Subversion plugin 2.3.

    Jenkins JIRA | 3 years ago | Kevin Cross
    java.lang.StringIndexOutOfBoundsException: String index out of range: -7
  2. 0

    I upgraded to Jenkins 1.554.1 with Subversion plugin 2.4 yesterday and I am seeing this and similar in the build logs of some jobs trying to checkout code from subversion: {code} FATAL: String index out of range: -7 java.lang.StringIndexOutOfBoundsException: String index out of range: -7 at java.lang.String.substring(String.java:1875) at hudson.scm.DirAwareSVNXMLLogHandler.sendToHandler(DirAwareSVNXMLLogHandler.java:111) at hudson.scm.DirAwareSVNXMLLogHandler.handleLogEntry(DirAwareSVNXMLLogHandler.java:82) 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:1414) at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:671) at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:580) at hudson.model.Run.execute(Run.java:1676) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:529) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:231) {code} Note that the index is not always -7. When the job is rerun the next build does the checkout no problem. I am aware of JENKINS-22199 and this looks very similar but JENKINS-22199 is meant to have been fixed in Subversion plugin 2.3.

    Jenkins JIRA | 3 years ago | Kevin Cross
    java.lang.StringIndexOutOfBoundsException: String index out of range: -7
  3. 0

    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)

    Jenkins JIRA | 2 years ago | Stefan Puiu
    java.lang.StringIndexOutOfBoundsException: String index out of range: -1
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    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)

    Jenkins JIRA | 2 years ago | Stefan Puiu
    java.lang.StringIndexOutOfBoundsException: String index out of range: -1
  6. 0

    parsing coveralls response seams to cause exception

    GitHub | 2 years ago | chpache
    java.lang.StringIndexOutOfBoundsException: String index out of range: -7

  1. richard77 2 times, last 1 day ago
  2. kjhdofjosvs 2 times, last 5 days ago
  3. archenroot 17 times, last 2 weeks ago
  4. Alexandru Popa 2 times, last 3 weeks ago
  5. poroszd 3 times, last 4 weeks ago
18 more registered users
58 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.lang.StringIndexOutOfBoundsException

    String index out of range: -7

    at java.lang.String.substring()
  2. Java RT
    String.substring
    1. java.lang.String.substring(String.java:1875)
    1 frame
  3. Hudson
    DirAwareSVNXMLLogHandler.handleLogEntry
    1. hudson.scm.DirAwareSVNXMLLogHandler.sendToHandler(DirAwareSVNXMLLogHandler.java:111)
    2. hudson.scm.DirAwareSVNXMLLogHandler.handleLogEntry(DirAwareSVNXMLLogHandler.java:82)
    2 frames
  4. SVNKit Library
    SVNLogClient.doLog
    1. org.tmatesoft.svn.core.internal.wc2.compat.SvnCodec$7.receive(SvnCodec.java:167)
    2. org.tmatesoft.svn.core.internal.wc2.compat.SvnCodec$7.receive(SvnCodec.java:164)
    3. org.tmatesoft.svn.core.wc2.SvnReceivingOperation.receive(SvnReceivingOperation.java:78)
    4. org.tmatesoft.svn.core.internal.wc2.remote.SvnRemoteLog.handleLogEntry(SvnRemoteLog.java:199)
    5. org.tmatesoft.svn.core.internal.io.svn.SVNRepositoryImpl.logImpl(SVNRepositoryImpl.java:827)
    6. org.tmatesoft.svn.core.io.SVNRepository.log(SVNRepository.java:1035)
    7. org.tmatesoft.svn.core.internal.wc2.remote.SvnRemoteLog.run(SvnRemoteLog.java:181)
    8. org.tmatesoft.svn.core.internal.wc2.remote.SvnRemoteLog.run(SvnRemoteLog.java:35)
    9. org.tmatesoft.svn.core.internal.wc2.SvnOperationRunner.run(SvnOperationRunner.java:20)
    10. org.tmatesoft.svn.core.wc2.SvnOperationFactory.run(SvnOperationFactory.java:1238)
    11. org.tmatesoft.svn.core.wc2.SvnOperation.run(SvnOperation.java:294)
    12. org.tmatesoft.svn.core.wc.SVNLogClient.doLog(SVNLogClient.java:967)
    13. org.tmatesoft.svn.core.wc.SVNLogClient.doLog(SVNLogClient.java:872)
    13 frames
  5. Hudson
    AbstractBuild$AbstractBuildExecution.defaultCheckout
    1. hudson.scm.SubversionChangeLogBuilder.buildModule(SubversionChangeLogBuilder.java:179)
    2. hudson.scm.SubversionChangeLogBuilder.run(SubversionChangeLogBuilder.java:118)
    3. hudson.scm.SubversionSCM.calcChangeLog(SubversionSCM.java:735)
    4. hudson.scm.SubversionSCM.checkout(SubversionSCM.java:873)
    5. hudson.model.AbstractProject.checkout(AbstractProject.java:1414)
    6. hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:671)
    6 frames
  6. jenkins.scm
    SCMCheckoutStrategy.checkout
    1. jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88)
    1 frame
  7. Hudson
    Run.execute
    1. hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:580)
    2. hudson.model.Run.execute(Run.java:1676)
    2 frames
  8. Hudson Maven Embedder
    MavenModuleSetBuild.run
    1. hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:529)
    1 frame
  9. Hudson
    Executor.run
    1. hudson.model.ResourceController.execute(ResourceController.java:88)
    2. hudson.model.Executor.run(Executor.java:231)
    2 frames