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

Jenkins JIRA | dsheth | 9 years ago
tip
Do you find the tips below useful? Click on the to mark them and say thanks to rp and rafael . Or join the community to write better ones.
  1. 0

    When attempting to deploy a war to Tomcat, everything works fine from the Master. However, if a Slave attempts the same task, the following error is received: FATAL: String index out of range: -1 java.lang.StringIndexOutOfBoundsException: String index out of range: -1 at java.lang.String.substring(String.java:1938) at org.apache.tools.ant.launch.Locator.getResourceSource(Locator.java:122) at org.apache.tools.ant.launch.Locator.getClassSource(Locator.java:90) at org.apache.tools.ant.Project.setAntLib(Project.java:313) at org.apache.tools.ant.Project.initProperties(Project.java:309) at org.apache.tools.ant.Project.init(Project.java:295) at org.codehaus.cargo.util.AntUtils.createProject(AntUtils.java:149) at org.codehaus.cargo.util.AntUtils.<init>(AntUtils.java:55) at org.codehaus.cargo.util.DefaultFileHandler.<init>(DefaultFileHandler.java:75) at org.codehaus.cargo.generic.configuration.DefaultConfigurationFactory.<init>(DefaultConfigurationFactory.java:47) at hudson.plugins.deploy.CargoContainerAdapter$1.invoke(CargoContainerAdapter.java:52) at hudson.plugins.deploy.CargoContainerAdapter$1.invoke(CargoContainerAdapter.java:46) at hudson.FilePath$FileCallableWrapper.call(FilePath.java:1176) at hudson.remoting.UserRequest.perform(UserRequest.java:69) at hudson.remoting.UserRequest.perform(UserRequest.java:23) at hudson.remoting.Request$2.run(Request.java:213) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907) at java.lang.Thread.run(Thread.java:619)

    Jenkins JIRA | 9 years ago | dsheth
    java.lang.StringIndexOutOfBoundsException: String index out of range: -1
  2. 0

    When attempting to deploy a war to Tomcat, everything works fine from the Master. However, if a Slave attempts the same task, the following error is received: FATAL: String index out of range: -1 java.lang.StringIndexOutOfBoundsException: String index out of range: -1 at java.lang.String.substring(String.java:1938) at org.apache.tools.ant.launch.Locator.getResourceSource(Locator.java:122) at org.apache.tools.ant.launch.Locator.getClassSource(Locator.java:90) at org.apache.tools.ant.Project.setAntLib(Project.java:313) at org.apache.tools.ant.Project.initProperties(Project.java:309) at org.apache.tools.ant.Project.init(Project.java:295) at org.codehaus.cargo.util.AntUtils.createProject(AntUtils.java:149) at org.codehaus.cargo.util.AntUtils.<init>(AntUtils.java:55) at org.codehaus.cargo.util.DefaultFileHandler.<init>(DefaultFileHandler.java:75) at org.codehaus.cargo.generic.configuration.DefaultConfigurationFactory.<init>(DefaultConfigurationFactory.java:47) at hudson.plugins.deploy.CargoContainerAdapter$1.invoke(CargoContainerAdapter.java:52) at hudson.plugins.deploy.CargoContainerAdapter$1.invoke(CargoContainerAdapter.java:46) at hudson.FilePath$FileCallableWrapper.call(FilePath.java:1176) at hudson.remoting.UserRequest.perform(UserRequest.java:69) at hudson.remoting.UserRequest.perform(UserRequest.java:23) at hudson.remoting.Request$2.run(Request.java:213) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907) at java.lang.Thread.run(Thread.java:619)

    Jenkins JIRA | 9 years ago | dsheth
    java.lang.StringIndexOutOfBoundsException: String index out of range: -1
  3. 0
    samebug tip
    You need to make sure that capitalisation of the case for the plugin in the properties file is exactly: "AllocinePlugin" and not "allocineplugin"
    via GitHub by Omertron
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0
    samebug 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
  6. 0

    Maven2 String index out of range: -1 on getCommonBasedir during rewrite-poms-for-release

    Stack Overflow | 6 years ago | Chris Kannon
    java.lang.StringIndexOutOfBoundsException: String index out of range: -1

  1. osvzs 1 times, last 2 weeks ago
  2. Indri Yunita 7 times, last 1 month ago
  3. Pilleo 1 times, last 1 month ago
  4. Andreas Häber 2 times, last 2 months ago
  5. QrCeric 1 times, last 2 months ago
25 more registered users
59 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: -1

    at java.lang.String.substring()
  2. Java RT
    String.substring
    1. java.lang.String.substring(String.java:1938)
    1 frame
  3. Apache Ant Launcher
    Locator.getClassSource
    1. org.apache.tools.ant.launch.Locator.getResourceSource(Locator.java:122)
    2. org.apache.tools.ant.launch.Locator.getClassSource(Locator.java:90)
    2 frames
  4. Ant
    Project.init
    1. org.apache.tools.ant.Project.setAntLib(Project.java:313)
    2. org.apache.tools.ant.Project.initProperties(Project.java:309)
    3. org.apache.tools.ant.Project.init(Project.java:295)
    3 frames
  5. Cargo Core Uberjar
    DefaultFileHandler.<init>
    1. org.codehaus.cargo.util.AntUtils.createProject(AntUtils.java:149)
    2. org.codehaus.cargo.util.AntUtils.<init>(AntUtils.java:55)
    3. org.codehaus.cargo.util.DefaultFileHandler.<init>(DefaultFileHandler.java:75)
    3 frames