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

Coderanch | Singh Kuldeep | 4 years ago
  1. 0

    Hibernate-Struts indexoutofboudexception problem

    Coderanch | 4 years ago | Singh Kuldeep
    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

    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
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    How to Integrate SQLite *.db file and Hibernate when controlled by Spring

    Stack Overflow | 3 years ago | DavidZemon
    java.lang.IllegalStateException: Failed to load ApplicationContext
  6. 0

    StringIndexOutOfBoundsException importing dependent amp.

    Google Groups | 8 years ago | Damon Rand
    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:687)
    1 frame
  3. Hibernate
    Configuration.configure
    1. org.hibernate.mapping.Column.setName(Column.java:61)
    2. org.hibernate.cfg.HbmBinder.bindColumns(HbmBinder.java:1067)
    3. org.hibernate.cfg.HbmBinder.bindColumnsOrFormula(HbmBinder.java:1525)
    4. org.hibernate.cfg.HbmBinder.bindSimpleValue(HbmBinder.java:1121)
    5. org.hibernate.cfg.HbmBinder.bindSimpleId(HbmBinder.java:391)
    6. org.hibernate.cfg.HbmBinder.bindRootPersistentClassCommonValues(HbmBinder.java:334)
    7. org.hibernate.cfg.HbmBinder.bindRootClass(HbmBinder.java:273)
    8. org.hibernate.cfg.HbmBinder.bindRoot(HbmBinder.java:144)
    9. org.hibernate.cfg.Configuration.add(Configuration.java:688)
    10. org.hibernate.cfg.Configuration.addInputStream(Configuration.java:523)
    11. org.hibernate.cfg.Configuration.addResource(Configuration.java:585)
    12. org.hibernate.cfg.Configuration.parseMappingElement(Configuration.java:1606)
    13. org.hibernate.cfg.Configuration.parseSessionFactory(Configuration.java:1574)
    14. org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1553)
    15. org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1527)
    16. org.hibernate.cfg.Configuration.configure(Configuration.java:1447)
    17. org.hibernate.cfg.Configuration.configure(Configuration.java:1433)
    17 frames
  4. contact.controller
    ContactManager.add
    1. contact.controller.ContactManager.add(ContactManager.java:16)
    1 frame
  5. contact.view
    ContactAction.add
    1. contact.view.ContactAction.add(ContactAction.java:33)
    1 frame
  6. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    4. java.lang.reflect.Method.invoke(Method.java:597)
    4 frames
  7. XWork
    ValidationInterceptor.doIntercept
    1. com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:452)
    2. com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:291)
    3. com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:254)
    4. com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:176)
    5. com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
    6. com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
    7. com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:263)
    7 frames
  8. Struts2
    AnnotationValidationInterceptor.doIntercept
    1. org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:68)
    1 frame
  9. XWork
    DefaultActionInvocation.invoke
    1. com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
    2. com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
    3. com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:133)
    4. com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
    5. com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:207)
    6. com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
    7. com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
    8. com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:207)
    9. com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
    10. com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
    11. com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:190)
    12. com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
    12 frames
  10. Struts2
    MultiselectInterceptor.intercept
    1. org.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java:75)
    1 frame
  11. XWork
    DefaultActionInvocation.invoke
    1. com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
    1 frame
  12. Struts2
    CheckboxInterceptor.intercept
    1. org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:94)
    1 frame
  13. XWork
    DefaultActionInvocation.invoke
    1. com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
    1 frame
  14. Struts2
    FileUploadInterceptor.intercept
    1. org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:243)
    1 frame
  15. XWork
    DefaultActionInvocation.invoke
    1. com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
    2. com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:100)
    3. com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
    4. com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:141)
    5. com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
    5 frames
  16. Struts2
    DebuggingInterceptor.intercept
    1. org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:267)
    1 frame
  17. XWork
    DefaultActionInvocation.invoke
    1. com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
    2. com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:142)
    3. com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
    4. com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:166)
    5. com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
    6. com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
    7. com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:176)
    8. com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
    8 frames
  18. Struts2
    ServletConfigInterceptor.intercept
    1. org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164)
    1 frame
  19. XWork
    DefaultActionInvocation.invoke
    1. com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
    2. com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:190)
    3. com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
    4. com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:187)
    5. com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
    5 frames
  20. Struts2
    StrutsPrepareAndExecuteFilter.doFilter
    1. org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:52)
    2. org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:485)
    3. org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)
    4. org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:91)
    4 frames
  21. Glassfish Core
    CoyoteAdapter.service
    1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    3. org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
    4. org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
    5. org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
    6. org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
    7. org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    8. org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261)
    8 frames
  22. Grizzly HTTP
    JIoEndpoint$Worker.run
    1. org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
    2. org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:581)
    3. org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
    3 frames
  23. Java RT
    Thread.run
    1. java.lang.Thread.run(Thread.java:619)
    1 frame