java.lang.StringIndexOutOfBoundsException: String index out of range: 0

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

,
Expert 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.

,
via oracle.com by Unknown author

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.

Solutions on the web

via GitHub by kinglezhuang
, 1 year ago
String index out of range: 0
via YouTrack by Unknown author, 1 year ago
String index out of range: 0
via dreamincode.net by Unknown author, 1 year ago
via Oracle Community by 843797, 1 year ago
String index out of range: 3
via Stack Overflow by KoreMike
, 2 years ago
java.lang.StringIndexOutOfBoundsException: String index out of range: 0
at java.lang.String.charAt(String.java:658)
at djinni.generatorTools.package$.firstUpper(generator.scala:86)
at djinni.generatorTools.package$IdentStyle$$anonfun$2$$anonfun$apply$4.apply(generator.scala:106)
at djinni.generatorTools.package$IdentStyle$$anonfun$2$$anonfun$apply$4.apply(generator.scala:106)
at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:245)
at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:245)
at scala.collection.IndexedSeqOptimized$class.foreach(IndexedSeqOptimized.scala:33)
at scala.collection.mutable.ArrayOps$ofRef.foreach(ArrayOps.scala:186)
at scala.collection.TraversableLike$class.map(TraversableLike.scala:245)
at djinni.generatorTools.package$IdentStyle$$anonfun$2.apply(generator.scala:106)
at djinni.generatorTools.package$IdentStyle$$anonfun$2.apply(generator.scala:104)
at djinni.JavaGenerator$$anonfun$generateRecord$2$$anonfun$apply$7$$anonfun$apply$mcV$sp$25.apply(JavaGenerator.scala:260)
at djinni.JavaGenerator$$anonfun$generateRecord$2$$anonfun$apply$7$$anonfun$apply$mcV$sp$25.apply(JavaGenerator.scala:256)
at djinni.JavaGenerator$$anonfun$generateRecord$2$$anonfun$apply$7.apply$mcV$sp(JavaGenerator.scala:256)
at djinni.writer.package$IndentWriter.djinni$writer$IndentWriter$$nested_(writer.scala:70)
at djinni.writer.package$IndentWriter.nested(writer.scala:64)
at djinni.writer.package$IndentWriter.bracedEnd(writer.scala:80)
at djinni.writer.package$IndentWriter$$anonfun$braced$1.apply(writer.scala:84)
at djinni.writer.package$IndentWriter$$anonfun$braced$1.apply(writer.scala:84)
at djinni.JavaGenerator$$anonfun$generateRecord$2.apply(JavaGenerator.scala:228)
at djinni.JavaGenerator$$anonfun$generateRecord$2.apply(JavaGenerator.scala:217)
at djinni.JavaGenerator$$anonfun$writeJavaFile$1.apply(JavaGenerator.scala:62)
at djinni.JavaGenerator$$anonfun$writeJavaFile$1.apply(JavaGenerator.scala:53)
at djinni.Generator.createFile(generator.scala:246)
at djinni.Generator.createFile(generator.scala:254)
at djinni.JavaGenerator.writeJavaFile(JavaGenerator.scala:53)
at djinni.JavaGenerator.generateRecord(JavaGenerator.scala:217)
at djinni.Generator$$anonfun$generate$2.apply(generator.scala:323)
at djinni.Generator$$anonfun$generate$2.apply(generator.scala:319)
at djinni.Generator.generate(generator.scala:319)
at djinni.generatorTools.package$.generate(generator.scala:180)
at djinni.Main$.main(Main.scala:331)
at djinni.Main.main(Main.scala)

Users with the same issue

Once, 2 months ago
Once, 9 months ago
32257 times, 11 months ago
4 times, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
43 more bugmates

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