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

Thrown by String methods to indicate that an index is either negative or greater than the size of the string. For some methods such as the charAt method, this exception also is thrown when the index is equal to the size of the string.


rafael

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

  • codegen fails on Windows
    via GitHub by radius314
    ,
  • 测试用例不能运行
    via GitHub by kalashnicov
    ,
  • SEVERE: Failed Loading plugin scm-sync-configuration hudson.util.IOException2: Unable to load hudson.plugins.scm_sync_configuration.ScmSyncConfigurationPlugin from scm-sync-configuration at hudson.ClassicPluginStrategy.load(ClassicPluginStrategy.java:332) at hudson.PluginManager$2$1$1.run(PluginManager.java:333) at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:146) at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:259) at jenkins.model.Jenkins$7.runTask(Jenkins.java:875) at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:187) at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:94) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662) Caused by: java.lang.ExceptionInInitializerError at hudson.plugins.scm_sync_configuration.ScmSyncConfigurationPlugin.<clinit>(ScmSyncConfigurationPlugin.java:46) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at java.lang.Class.newInstance0(Class.java:355) at java.lang.Class.newInstance(Class.java:308) at hudson.ClassicPluginStrategy.load(ClassicPluginStrategy.java:326) ... 9 more Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: 1 at java.lang.String.charAt(String.java:686) at java.util.regex.Matcher.appendReplacement(Matcher.java:703) at java.util.regex.Matcher.replaceAll(Matcher.java:813) at java.lang.String.replaceAll(String.java:2189) at hudson.plugins.scm_sync_configuration.strategies.model.PatternsEntityMatcher$1.apply(PatternsEntityMatcher.java:20) at hudson.plugins.scm_sync_configuration.strategies.model.PatternsEntityMatcher$1.apply(PatternsEntityMatcher.java:18) at com.google.common.collect.Iterators$8.next(Iterators.java:812) at java.util.AbstractCollection.toArray(AbstractCollection.java:171) at hudson.plugins.scm_sync_configuration.strategies.model.PatternsEntityMatcher.<init>(PatternsEntityMatcher.java:27) at hudson.plugins.scm_sync_configuration.strategies.model.ClassAndFileConfigurationEntityMatcher.<init>(ClassAndFileConfigurationEntityMatcher.java:13) at hudson.plugins.scm_sync_configuration.strategies.impl.JobConfigScmSyncStrategy.<clinit>(JobConfigScmSyncStrategy.java:29) ... 17 more
    via by cforce,
    • java.lang.StringIndexOutOfBoundsException: String index out of range: 1 at java.lang.String.charAt(String.java:686) at java.util.regex.Matcher.appendReplacement(Matcher.java:703) at java.util.regex.Matcher.replaceAll(Matcher.java:813) at java.lang.String.replaceAll(String.java:2189) at hudson.plugins.xshell.XShellBuilder.perform(XShellBuilder.java:70) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19) at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:601) at hudson.model.Build$RunnerImpl.build(Build.java:174) at hudson.model.Build$RunnerImpl.doRun(Build.java:138) at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:416) at hudson.model.Run.run(Run.java:1273) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:129)

    Users with the same issue

    poroszd
    12 times, last one,
    olle.hallin
    1 times, last one,
    linxiaolong
    1 times, last one,
    jokester
    1 times, last one,
    tyson925
    1 times, last one,
    27 more bugmates