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

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

,

Thrown by the methods of the String class to indicate that an index is either negative, or greater than the size of the string itself. You are probably using the wrong index when accessing substring of the array.

,
via GitHub by Omertron

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

Solutions on the web

via Spring JIRA by Matej Spiller-Muys, 1 year ago
String index out of range: -1
via Spring JIRA by Matej Spiller-Muys, 1 year ago
String index out of range: -1
via Stack Overflow by Jordan Lee Burnes
, 1 year ago
via dreamincode.net by Unknown author, 2 years ago
via Eclipse Bugzilla by todd.gochenour, 1 year ago
String index out of range: -1
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.substring(String.java:1937)
at org.springframework.roo.support.util.FileUtils.backOneDirectory(FileUtils.java:163)
at org.springframework.roo.support.util.FileUtils.getFirstDirectory(FileUtils.java:151)
at org.springframework.roo.project.Path.getModulePath(Path.java:133)
at org.springframework.roo.project.maven.Pom.cachePhysicalPaths(Pom.java:115)
at org.springframework.roo.project.maven.Pom.(Pom.java:106)
at org.springframework.roo.project.maven.PomTest.getMinimalPom(PomTest.java:76)
at org.springframework.roo.project.maven.PomTest.testDefaultPackaging(PomTest.java:37)

Users with the same issue

8 times, 1 week ago
2 times, 2 weeks ago
4 times, 2 months ago
4803 times, 2 months ago
3 times, 2 months ago

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.