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 Hibernate JIRA by Tim Schafer, 1 year ago
String index out of range: 0
via Google Groups by rtdewi0, 10 months ago
via Google Groups by rtdewi0, 10 months ago
via Stack Overflow by Jaguar
, 1 year ago
String index out of range: 1
via Appcelerator JIRA by Ingo Muschenetz, 1 year ago
java.lang.StringIndexOutOfBoundsException: String index out of range: 0
at java.lang.String.charAt(Unknown Source)
at net.sf.hibernate.type.CharacterType.get(CharacterType.java:19)
at net.sf.hibernate.type.NullableType.nullSafeGet(NullableType.java:59)
at net.sf.hibernate.type.NullableType.nullSafeGet(NullableType.java:51)
at net.sf.hibernate.type.ComponentType.nullSafeGet(ComponentType.java:139)
at net.sf.hibernate.collection.CollectionPersister.readElement(CollectionPersister.java:377)
at net.sf.hibernate.collection.Set.readFrom(Set.java:242)
at net.sf.hibernate.loader.Loader.doFind(Loader.java:175)
at net.sf.hibernate.loader.Loader.loadCollection(Loader.java:602)
at net.sf.hibernate.loader.CollectionLoader.initialize(CollectionLoader.java:82)
at net.sf.hibernate.impl.SessionImpl.initialize(SessionImpl.java:2897)
at net.sf.hibernate.collection.PersistentCollection.getInitialValue(PersistentCollection.java:128)
at net.sf.hibernate.type.PersistentCollectionType.getCollection(PersistentCollectionType.java:74)
at net.sf.hibernate.type.PersistentCollectionType.resolveIdentifier(PersistentCollectionType.java:177)
at net.sf.hibernate.impl.SessionImpl.initializeEntity(SessionImpl.java:1959)
at net.sf.hibernate.loader.Loader.doFind(Loader.java:196)
at net.sf.hibernate.loader.Loader.loadEntity(Loader.java:587)
at net.sf.hibernate.loader.EntityLoader.load(EntityLoader.java:42)
at net.sf.hibernate.persister.EntityPersister.load(EntityPersister.java:396)
at net.sf.hibernate.impl.SessionImpl.doLoad(SessionImpl.java:1889)
at net.sf.hibernate.impl.SessionImpl.doLoadByClass(SessionImpl.java:1757)
at net.sf.hibernate.impl.SessionImpl.internalLoad(SessionImpl.java:1716)
at net.sf.hibernate.type.ManyToOneType.resolveIdentifier(ManyToOneType.java:62)
at net.sf.hibernate.type.EntityType.nullSafeGet(EntityType.java:109)
at net.sf.hibernate.impl.IteratorImpl.postNext(IteratorImpl.java:57)
at net.sf.hibernate.impl.IteratorImpl.next(IteratorImpl.java:70)
at test.TestHibernate.main(TestHibernate.java:94)

Users with the same issue

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

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