java.lang.StringIndexOutOfBoundsException

If you like a tip written by other Samebug users, mark is as helpful! Marks help our algorithm provide you better solutions and also help other users.
tip

You need to make sure that capitalisation of the case for the plugin in the
properties file is exactly: "AllocinePlugin" and not "allocineplugin"

tip

This is a bug when using Micromax devices with VideoView. You can either exclude these devices or look at this workaround: http://stackoverflow.com/a/31942841/4347859

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

  • I have a job that polls a bunch of git and mercurial repos and indexes them for code cross referencing site. Ever since upgrading Jenkins to 1.650 for a security issue, it's been failing with the below error. I've tried juggling various versions of the plugins around; I am unwilling to roll back the Jenkins version for security concerns. It's not repo specific. For example, if the list is repo1, repo2, and repo3 and it bombs on repo2 I can remove repo2 and it'll now bomb on repo1, which didn't have an issue on the first try. It's also not mercurial specific, as it'll do the same on a git repo. a mercurial example: 13:49:45 pulling from https://hg.mozilla.org/build/buildbot 13:49:45 no changes found 13:49:45 [buildbot] $ hg update --clean --rev default 13:49:45 0 files updated, 0 files merged, 0 files removed, 0 files unresolved 13:49:45 [buildbot] $ hg log --rev . --template {node} 13:49:45 [buildbot] $ hg log --rev . --template {rev} 13:49:45 FATAL: String index out of range: -1 13:49:45 java.lang.StringIndexOutOfBoundsException: String index out of range: -1 13:49:45 at java.lang.String.substring(String.java:1931) 13:49:45 at org.jenkinsci.plugins.multiplescms.MultiSCMRevisionState.keyFor(MultiSCMRevisionState.java:41) 13:49:45 at org.jenkinsci.plugins.multiplescms.MultiSCMRevisionState.get(MultiSCMRevisionState.java:30) 13:49:45 at org.jenkinsci.plugins.multiplescms.MultiSCM.checkout(MultiSCM.java:141) 13:49:45 at hudson.scm.SCM.checkout(SCM.java:485) 13:49:45 at hudson.model.AbstractProject.checkout(AbstractProject.java:1269) 13:49:45 at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:607) 13:49:45 at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86) 13:49:45 at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529) 13:49:45 at hudson.model.Run.execute(Run.java:1738) 13:49:45 at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) 13:49:45 at hudson.model.ResourceController.execute(ResourceController.java:98) 13:49:45 at hudson.model.Executor.run(Executor.java:410) and for a git repo: 14:56:25 Cloning repository https://github.com/mozilla/build-cloud-tools 14:56:25 > git init /data/dxr_data/build/cloud-tools # timeout=10 14:56:25 Fetching upstream changes from https://github.com/mozilla/build-cloud-tools 14:56:25 > git --version # timeout=10 14:56:25 > git -c core.askpass=true fetch --tags --progress https://github.com/mozilla/build-cloud-tools +refs/heads/*:refs/remotes/origin/* 14:56:27 > git config remote.origin.url https://github.com/mozilla/build-cloud-tools # timeout=10 14:56:27 > git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # timeout=10 14:56:27 > git config remote.origin.url https://github.com/mozilla/build-cloud-tools # timeout=10 14:56:27 Fetching upstream changes from https://github.com/mozilla/build-cloud-tools 14:56:27 > git -c core.askpass=true fetch --tags --progress https://github.com/mozilla/build-cloud-tools +refs/heads/*:refs/remotes/origin/* 14:56:27 Seen branch in repository origin/ami-udaprews050916 14:56:27 Seen branch in repository origin/ami-update 14:56:27 Seen branch in repository origin/bz1267913 14:56:27 Seen branch in repository origin/master 14:56:27 Seen 4 remote branches 14:56:27 Checking out Revision f608764128705acea53ff8c6a42482f09038c6b2 (origin/master) 14:56:27 > git config core.sparsecheckout # timeout=10 14:56:27 > git checkout -f f608764128705acea53ff8c6a42482f09038c6b2 14:56:28 > git rev-list ce85bd66ca6fb1c7eae4ddbca4a3a9d0305a60d2 # timeout=10 14:56:28 FATAL: String index out of range: -1 14:56:28 java.lang.StringIndexOutOfBoundsException: String index out of range: -1 14:56:28 at java.lang.String.substring(String.java:1931) 14:56:28 at org.jenkinsci.plugins.multiplescms.MultiSCMRevisionState.keyFor(MultiSCMRevisionState.java:41) 14:56:28 at org.jenkinsci.plugins.multiplescms.MultiSCMRevisionState.get(MultiSCMRevisionState.java:30) 14:56:28 at org.jenkinsci.plugins.multiplescms.MultiSCM.checkout(MultiSCM.java:141) 14:56:28 at hudson.scm.SCM.checkout(SCM.java:485) 14:56:28 at hudson.model.AbstractProject.checkout(AbstractProject.java:1269) 14:56:28 at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:607) 14:56:28 at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86) 14:56:28 at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529) 14:56:28 at hudson.model.Run.execute(Run.java:1738) 14:56:28 at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) 14:56:28 at hudson.model.ResourceController.execute(ResourceController.java:98) 14:56:28 at hudson.model.Executor.run(Executor.java:410)
    via by Kendall Libby,
  • I have a job that polls a bunch of git and mercurial repos and indexes them for code cross referencing site. Ever since upgrading Jenkins to 1.650 for a security issue, it's been failing with the below error. I've tried juggling various versions of the plugins around; I am unwilling to roll back the Jenkins version for security concerns. It's not repo specific. For example, if the list is repo1, repo2, and repo3 and it bombs on repo2 I can remove repo2 and it'll now bomb on repo1, which didn't have an issue on the first try. It's also not mercurial specific, as it'll do the same on a git repo. a mercurial example: 13:49:45 pulling from https://hg.mozilla.org/build/buildbot 13:49:45 no changes found 13:49:45 [buildbot] $ hg update --clean --rev default 13:49:45 0 files updated, 0 files merged, 0 files removed, 0 files unresolved 13:49:45 [buildbot] $ hg log --rev . --template {node} 13:49:45 [buildbot] $ hg log --rev . --template {rev} 13:49:45 FATAL: String index out of range: -1 13:49:45 java.lang.StringIndexOutOfBoundsException: String index out of range: -1 13:49:45 at java.lang.String.substring(String.java:1931) 13:49:45 at org.jenkinsci.plugins.multiplescms.MultiSCMRevisionState.keyFor(MultiSCMRevisionState.java:41) 13:49:45 at org.jenkinsci.plugins.multiplescms.MultiSCMRevisionState.get(MultiSCMRevisionState.java:30) 13:49:45 at org.jenkinsci.plugins.multiplescms.MultiSCM.checkout(MultiSCM.java:141) 13:49:45 at hudson.scm.SCM.checkout(SCM.java:485) 13:49:45 at hudson.model.AbstractProject.checkout(AbstractProject.java:1269) 13:49:45 at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:607) 13:49:45 at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86) 13:49:45 at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529) 13:49:45 at hudson.model.Run.execute(Run.java:1738) 13:49:45 at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) 13:49:45 at hudson.model.ResourceController.execute(ResourceController.java:98) 13:49:45 at hudson.model.Executor.run(Executor.java:410) and for a git repo: 14:56:25 Cloning repository https://github.com/mozilla/build-cloud-tools 14:56:25 > git init /data/dxr_data/build/cloud-tools # timeout=10 14:56:25 Fetching upstream changes from https://github.com/mozilla/build-cloud-tools 14:56:25 > git --version # timeout=10 14:56:25 > git -c core.askpass=true fetch --tags --progress https://github.com/mozilla/build-cloud-tools +refs/heads/*:refs/remotes/origin/* 14:56:27 > git config remote.origin.url https://github.com/mozilla/build-cloud-tools # timeout=10 14:56:27 > git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # timeout=10 14:56:27 > git config remote.origin.url https://github.com/mozilla/build-cloud-tools # timeout=10 14:56:27 Fetching upstream changes from https://github.com/mozilla/build-cloud-tools 14:56:27 > git -c core.askpass=true fetch --tags --progress https://github.com/mozilla/build-cloud-tools +refs/heads/*:refs/remotes/origin/* 14:56:27 Seen branch in repository origin/ami-udaprews050916 14:56:27 Seen branch in repository origin/ami-update 14:56:27 Seen branch in repository origin/bz1267913 14:56:27 Seen branch in repository origin/master 14:56:27 Seen 4 remote branches 14:56:27 Checking out Revision f608764128705acea53ff8c6a42482f09038c6b2 (origin/master) 14:56:27 > git config core.sparsecheckout # timeout=10 14:56:27 > git checkout -f f608764128705acea53ff8c6a42482f09038c6b2 14:56:28 > git rev-list ce85bd66ca6fb1c7eae4ddbca4a3a9d0305a60d2 # timeout=10 14:56:28 FATAL: String index out of range: -1 14:56:28 java.lang.StringIndexOutOfBoundsException: String index out of range: -1 14:56:28 at java.lang.String.substring(String.java:1931) 14:56:28 at org.jenkinsci.plugins.multiplescms.MultiSCMRevisionState.keyFor(MultiSCMRevisionState.java:41) 14:56:28 at org.jenkinsci.plugins.multiplescms.MultiSCMRevisionState.get(MultiSCMRevisionState.java:30) 14:56:28 at org.jenkinsci.plugins.multiplescms.MultiSCM.checkout(MultiSCM.java:141) 14:56:28 at hudson.scm.SCM.checkout(SCM.java:485) 14:56:28 at hudson.model.AbstractProject.checkout(AbstractProject.java:1269) 14:56:28 at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:607) 14:56:28 at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86) 14:56:28 at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529) 14:56:28 at hudson.model.Run.execute(Run.java:1738) 14:56:28 at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) 14:56:28 at hudson.model.ResourceController.execute(ResourceController.java:98) 14:56:28 at hudson.model.Executor.run(Executor.java:410)
    via by Kendall Libby,
  • Spring Security: StringIndexOutOfBoundsException
    via by Unknown author,
    • java.lang.StringIndexOutOfBoundsException: String index out of range: -1 at java.lang.String.substring(String.java:1931) at org.jenkinsci.plugins.multiplescms.MultiSCMRevisionState.keyFor(MultiSCMRevisionState.java:41) at org.jenkinsci.plugins.multiplescms.MultiSCMRevisionState.get(MultiSCMRevisionState.java:30) at org.jenkinsci.plugins.multiplescms.MultiSCM.checkout(MultiSCM.java:141) at hudson.scm.SCM.checkout(SCM.java:485) at hudson.model.AbstractProject.checkout(AbstractProject.java:1269) at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:607) at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529) at hudson.model.Run.execute(Run.java:1738) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:410)

    Users with the same issue

    eti22
    3 times, last one,
    RoiOtero
    4 times, last one,
    zsamboki
    1 times, last one,
    osvzs
    2 times, last one,
    richard77
    2 times, last one,
    92 more bugmates