java.lang.StringIndexOutOfBoundsException

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.

  • we ran into this: > git checkout -f a6ecfa813a4c9a5699df4ec39cfdd596852b8d71 # timeout=10 > git branch -a -v --no-abbrev # timeout=10 FATAL: String index out of range: -1 java.lang.StringIndexOutOfBoundsException: String index out of range: -1 at java.lang.String.substring(String.java:1931) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.parseBranches(CliGitAPIImpl.java:1825) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.getBranches(CliGitAPIImpl.java:1847) at hudson.plugins.git.GitAPI.getBranches(GitAPI.java:195) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$9.execute(CliGitAPIImpl.java:1969) at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:152) at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:145) at hudson.remoting.UserRequest.perform(UserRequest.java:120) at hudson.remoting.UserRequest.perform(UserRequest.java:48) at hudson.remoting.Request$2.run(Request.java:332) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) at ......remote call to jenkins-node-1(Native Method) at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1416) at hudson.remoting.UserResponse.retrieve(UserRequest.java:220) at hudson.remoting.Channel.call(Channel.java:781) at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.execute(RemoteGitImpl.java:145) at sun.reflect.GeneratedMethodAccessor208.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.invoke(RemoteGitImpl.java:131) at com.sun.proxy.$Proxy65.execute(Unknown Source) at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1135) 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.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:531) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:410) -> turned out to be a DOS line ending in a commit message “...^M” - which leads to parsing an empty line here ==== versions: jenkins-ci: Jenkins ver. 1.656 Git client plugin 1.19.6 Git plugin 2.4.4
    via by Frank Geusch,
  • we ran into this: > git checkout -f a6ecfa813a4c9a5699df4ec39cfdd596852b8d71 # timeout=10 > git branch -a -v --no-abbrev # timeout=10 FATAL: String index out of range: -1 java.lang.StringIndexOutOfBoundsException: String index out of range: -1 at java.lang.String.substring(String.java:1931) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.parseBranches(CliGitAPIImpl.java:1825) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.getBranches(CliGitAPIImpl.java:1847) at hudson.plugins.git.GitAPI.getBranches(GitAPI.java:195) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$9.execute(CliGitAPIImpl.java:1969) at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:152) at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:145) at hudson.remoting.UserRequest.perform(UserRequest.java:120) at hudson.remoting.UserRequest.perform(UserRequest.java:48) at hudson.remoting.Request$2.run(Request.java:332) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) at ......remote call to jenkins-node-1(Native Method) at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1416) at hudson.remoting.UserResponse.retrieve(UserRequest.java:220) at hudson.remoting.Channel.call(Channel.java:781) at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.execute(RemoteGitImpl.java:145) at sun.reflect.GeneratedMethodAccessor208.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.invoke(RemoteGitImpl.java:131) at com.sun.proxy.$Proxy65.execute(Unknown Source) at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1135) 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.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:531) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:410) -> turned out to be a DOS line ending in a commit message “...^M” - which leads to parsing an empty line here ==== versions: jenkins-ci: Jenkins ver. 1.656 Git client plugin 1.19.6 Git plugin 2.4.4
    via by Frank Geusch,
  • Spring Security: StringIndexOutOfBoundsException
    via by Unknown author,
  • My 4.8.3 configuration is using LDAP Authentication. I cannot import a migration bundle from a 4.8.3 BI Server that has a public schedule with generated content. Reproduce: 1) Create a public schedule that can execute Inventory List and add that report to be executed (as the admin user). -- It doesn't matter what you name the report when scheduling the content, I named mine "CurtisInv space.html"; It shows up in the import log as 'Importing file name =[ Inventory ]' 2) Export using the migrator 3) Reset 5.0 server repository 3a) Delete all contents of pentaho-solutions/system/jackrabbit/repository/ 3b) Rerun database scripts: create_repository, create_jcr 4) Start 5.0 server 5) Log in as admin -- Sets up the repository 6) Stop 5.0 server 7) Run migrator for import against 5.0 server ------ At this point you will find the following exception in the migration.log: 2014-01-22 14:22:01,322 INFO [org.pentaho.platform.migration.utils.SOutObserver] [STARTING]: Starting generated content import 2014-01-22 14:22:01,324 INFO [org.pentaho.platform.migration.utils.SOutObserver] [PROGRESS]: Processing Generated Contents for user [u1] 2014-01-22 14:22:01,324 INFO [org.pentaho.platform.migration.utils.SOutObserver] [PROGRESS]: Processing background executed and private scheduled contents 2014-01-22 14:22:01,324 INFO [org.pentaho.platform.migration.utils.SOutObserver] [PROGRESS]: Processing generated contents for subscription of Inventory.prpt content 2014-01-22 14:22:01,325 INFO [org.pentaho.platform.migration.utils.SOutObserver] [PROGRESS]: Importing file name =[ Inventory ]0 of 3 to /home/u1/MigratedContents folder 2014-01-22 14:22:01,325 INFO [org.pentaho.platform.migration.utils.SOutObserver] [PROGRESS]: Importing dependent generated content 0 of 11 to /home/u1/MigratedContents folder 2014-01-22 14:22:01,326 ERROR [org.pentaho.platform.migration.utils.SOutObserver] [EXCEPTION]: Error importing generated contents for user: u1 java.lang.StringIndexOutOfBoundsException: String index out of range: -1 at java.lang.String.substring(String.java:1931) at org.pentaho.migration.v50.agents.MigrationAgentGeneratedContent.importFile(MigrationAgentGeneratedContent.java:212) at org.pentaho.migration.v50.agents.MigrationAgentGeneratedContent.importDependentFiles(MigrationAgentGeneratedContent.java:195) at org.pentaho.migration.v50.agents.MigrationAgentGeneratedContent.performMigration(MigrationAgentGeneratedContent.java:156) at org.pentaho.platform.migration.PlatformMigrator$1.run(PlatformMigrator.java:153) at java.lang.Thread.run(Thread.java:662)
    via by Curtis Boyden,
    • java.lang.StringIndexOutOfBoundsException: String index out of range: -1 at java.lang.String.substring(String.java:1931) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.parseBranches(CliGitAPIImpl.java:1825) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.getBranches(CliGitAPIImpl.java:1847) at hudson.plugins.git.GitAPI.getBranches(GitAPI.java:195) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$9.execute(CliGitAPIImpl.java:1969) at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:152) at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:145) at hudson.remoting.UserRequest.perform(UserRequest.java:120) at hudson.remoting.UserRequest.perform(UserRequest.java:48) at hudson.remoting.Request$2.run(Request.java:332) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745)

    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