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

Hibernate JIRA | Loren Rosen | 1 decade ago
  1. 0

    If you have a line in a hibernate mapping file like this: <property name="" /> the result is this error message: Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: 0 at java.lang.String.charAt(String.java:444) at org.hibernate.mapping.Column.setName(Column.java:60) at org.hibernate.cfg.HbmBinder.bindColumns(HbmBinder.java:1033) at org.hibernate.cfg.HbmBinder.bindColumnsOrFormula(HbmBinder.java:1437) at org.hibernate.cfg.HbmBinder.bindSimpleValue(HbmBinder.java:1069) at org.hibernate.cfg.HbmBinder.createClassProperties(HbmBinder.java:1982) at org.hibernate.cfg.HbmBinder.createClassProperties(HbmBinder.java:1940) at org.hibernate.cfg.HbmBinder.bindRootPersistentClassCommonValues(HbmBinder.java:324) at org.hibernate.cfg.HbmBinder.bindRootClass(HbmBinder.java:238) at org.hibernate.cfg.HbmBinder.bindRoot(HbmBinder.java:109) at org.hibernate.cfg.Configuration.add(Configuration.java:385) at org.hibernate.cfg.Configuration.addInputStream(Configuration.java:426) at org.hibernate.cfg.Configuration.addResource(Configuration.java:481) at org.hibernate.cfg.Configuration.parseMappingElement(Configuration.java:1443) at org.hibernate.cfg.Configuration.parseSessionFactory(Configuration.java:1411) at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1392) at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1368) at org.hibernate.cfg.Configuration.configure(Configuration.java:1288) at org.hibernate.cfg.Configuration.configure(Configuration.java:1274) at com.loren.SimpleExample.startHibernate(SimpleExample.java:37) at com.loren.SimpleExample.main(SimpleExample.java:45) The user should get a clearer error message, not a strack trace that looks like an internal hibernate programming error.

    Hibernate JIRA | 1 decade ago | Loren Rosen
    java.lang.StringIndexOutOfBoundsException: String index out of range: 0
  2. 0

    If you have a line in a hibernate mapping file like this: <property name="" /> the result is this error message: Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: 0 at java.lang.String.charAt(String.java:444) at org.hibernate.mapping.Column.setName(Column.java:60) at org.hibernate.cfg.HbmBinder.bindColumns(HbmBinder.java:1033) at org.hibernate.cfg.HbmBinder.bindColumnsOrFormula(HbmBinder.java:1437) at org.hibernate.cfg.HbmBinder.bindSimpleValue(HbmBinder.java:1069) at org.hibernate.cfg.HbmBinder.createClassProperties(HbmBinder.java:1982) at org.hibernate.cfg.HbmBinder.createClassProperties(HbmBinder.java:1940) at org.hibernate.cfg.HbmBinder.bindRootPersistentClassCommonValues(HbmBinder.java:324) at org.hibernate.cfg.HbmBinder.bindRootClass(HbmBinder.java:238) at org.hibernate.cfg.HbmBinder.bindRoot(HbmBinder.java:109) at org.hibernate.cfg.Configuration.add(Configuration.java:385) at org.hibernate.cfg.Configuration.addInputStream(Configuration.java:426) at org.hibernate.cfg.Configuration.addResource(Configuration.java:481) at org.hibernate.cfg.Configuration.parseMappingElement(Configuration.java:1443) at org.hibernate.cfg.Configuration.parseSessionFactory(Configuration.java:1411) at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1392) at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1368) at org.hibernate.cfg.Configuration.configure(Configuration.java:1288) at org.hibernate.cfg.Configuration.configure(Configuration.java:1274) at com.loren.SimpleExample.startHibernate(SimpleExample.java:37) at com.loren.SimpleExample.main(SimpleExample.java:45) The user should get a clearer error message, not a strack trace that looks like an internal hibernate programming error.

    Hibernate JIRA | 1 decade ago | Loren Rosen
    java.lang.StringIndexOutOfBoundsException: String index out of range: 0
  3. 0

    Hibernate-Struts indexoutofboudexception problem

    Coderanch | 4 years ago | Singh Kuldeep
    java.lang.StringIndexOutOfBoundsException: String index out of range: 0
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Error in running OAF page from server:

    Oracle Community | 5 years ago | AntonyRaj
    java.lang.StringIndexOutOfBoundsException: String index out of range: 0
  6. 0

    500 Internal Server Error

    Oracle Community | 1 decade ago | GcG-Italia
    java.lang.StringIndexOutOfBoundsException: String index out of range: 0

  1. harshg 2 times, last 2 months ago
  2. balintn 4 times, last 3 months ago
  3. poroszd 1 times, last 3 months ago
  4. Stefan Braune 1 times, last 5 months ago
  5. mauritius 1 times, last 5 months ago
6 more registered users
18 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: 0

    at java.lang.String.charAt()
  2. Java RT
    String.charAt
    1. java.lang.String.charAt(String.java:444)
    1 frame
  3. Hibernate
    Configuration.configure
    1. org.hibernate.mapping.Column.setName(Column.java:60)
    2. org.hibernate.cfg.HbmBinder.bindColumns(HbmBinder.java:1033)
    3. org.hibernate.cfg.HbmBinder.bindColumnsOrFormula(HbmBinder.java:1437)
    4. org.hibernate.cfg.HbmBinder.bindSimpleValue(HbmBinder.java:1069)
    5. org.hibernate.cfg.HbmBinder.createClassProperties(HbmBinder.java:1982)
    6. org.hibernate.cfg.HbmBinder.createClassProperties(HbmBinder.java:1940)
    7. org.hibernate.cfg.HbmBinder.bindRootPersistentClassCommonValues(HbmBinder.java:324)
    8. org.hibernate.cfg.HbmBinder.bindRootClass(HbmBinder.java:238)
    9. org.hibernate.cfg.HbmBinder.bindRoot(HbmBinder.java:109)
    10. org.hibernate.cfg.Configuration.add(Configuration.java:385)
    11. org.hibernate.cfg.Configuration.addInputStream(Configuration.java:426)
    12. org.hibernate.cfg.Configuration.addResource(Configuration.java:481)
    13. org.hibernate.cfg.Configuration.parseMappingElement(Configuration.java:1443)
    14. org.hibernate.cfg.Configuration.parseSessionFactory(Configuration.java:1411)
    15. org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1392)
    16. org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1368)
    17. org.hibernate.cfg.Configuration.configure(Configuration.java:1288)
    18. org.hibernate.cfg.Configuration.configure(Configuration.java:1274)
    18 frames
  4. com.loren
    SimpleExample.main
    1. com.loren.SimpleExample.startHibernate(SimpleExample.java:37)
    2. com.loren.SimpleExample.main(SimpleExample.java:45)
    2 frames