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

Hibernate JIRA | Sebastiao Gazolla C Jr | 10 years ago
tip
Do you find the tips below useful? Click on the to mark them and say thanks to rafael . Or join the community to write better ones.
  1. 0

    hdm2java generating .java files (reverse engineering from database) Throws java.lang.StringIndexOutOfBoundsException when I try to connect large schemas from Informix Databse. (Tests with few tables works fine.) BUILD FAILED C:\eclipse33\hibernate_ant\build.xml:23: java.lang.StringIndexOutOfBoundsException: String index out of range: 256 at org.hibernate.tool.ant.HibernateToolTask.reportException(HibernateToolTask.java:226) at org.hibernate.tool.ant.HibernateToolTask.execute(HibernateToolTask.java:189) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105) at org.apache.tools.ant.Task.perform(Task.java:348) at org.apache.tools.ant.Target.execute(Target.java:357) at org.apache.tools.ant.Target.performTasks(Target.java:385) at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329) at org.apache.tools.ant.Project.executeTarget(Project.java:1298) at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41) at org.apache.tools.ant.Project.executeTargets(Project.java:1181) at org.apache.tools.ant.Main.runBuild(Main.java:698) at org.apache.tools.ant.Main.startAnt(Main.java:199) at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257) at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104) Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: 256 at java.lang.String.charAt(String.java:687) at com.informix.jdbc.IfxDatabaseMetaData.getColumns(IfxDatabaseMetaData.java:3457) at org.hibernate.cfg.reveng.dialect.JDBCMetaDataDialect.getColumns(JDBCMetaDataDialect.java:124) at org.hibernate.cfg.reveng.JDBCReader.processBasicColumns(JDBCReader.java:555) at org.hibernate.cfg.reveng.JDBCReader.readDatabaseSchema(JDBCReader.java:85) at org.hibernate.cfg.reveng.JDBCReader.readDatabaseSchema(JDBCReader.java:837) at org.hibernate.cfg.JDBCBinder.readDatabaseSchema(JDBCBinder.java:115) at org.hibernate.cfg.JDBCBinder.readFromDatabase(JDBCBinder.java:88) at org.hibernate.cfg.JDBCMetaDataConfiguration.readFromJDBC(JDBCMetaDataConfiguration.java:40) at org.hibernate.tool.ant.JDBCConfigurationTask.doConfiguration(JDBCConfigurationTask.java:81) at org.hibernate.tool.ant.ConfigurationTask.getConfiguration(ConfigurationTask.java:55) at org.hibernate.tool.ant.HibernateToolTask.getConfiguration(HibernateToolTask.java:302) at org.hibernate.tool.ant.HibernateToolTask.getProperties(HibernateToolTask.java:318) at org.hibernate.tool.ant.ExporterTask.configureExporter(ExporterTask.java:94) at org.hibernate.tool.ant.Hbm2JavaExporterTask.configureExporter(Hbm2JavaExporterTask.java:34) at org.hibernate.tool.ant.ExporterTask.execute(ExporterTask.java:39) at org.hibernate.tool.ant.HibernateToolTask.execute(HibernateToolTask.java:186) ... 17 more --- Nested Exception --- java.lang.StringIndexOutOfBoundsException: String index out of range: 256 at java.lang.String.charAt(String.java:687) at com.informix.jdbc.IfxDatabaseMetaData.getColumns(IfxDatabaseMetaData.java:3457) at org.hibernate.cfg.reveng.dialect.JDBCMetaDataDialect.getColumns(JDBCMetaDataDialect.java:124) at org.hibernate.cfg.reveng.JDBCReader.processBasicColumns(JDBCReader.java:555) at org.hibernate.cfg.reveng.JDBCReader.readDatabaseSchema(JDBCReader.java:85) at org.hibernate.cfg.reveng.JDBCReader.readDatabaseSchema(JDBCReader.java:837) at org.hibernate.cfg.JDBCBinder.readDatabaseSchema(JDBCBinder.java:115) at org.hibernate.cfg.JDBCBinder.readFromDatabase(JDBCBinder.java:88) at org.hibernate.cfg.JDBCMetaDataConfiguration.readFromJDBC(JDBCMetaDataConfiguration.java:40) at org.hibernate.tool.ant.JDBCConfigurationTask.doConfiguration(JDBCConfigurationTask.java:81) at org.hibernate.tool.ant.ConfigurationTask.getConfiguration(ConfigurationTask.java:55) at org.hibernate.tool.ant.HibernateToolTask.getConfiguration(HibernateToolTask.java:302) at org.hibernate.tool.ant.HibernateToolTask.getProperties(HibernateToolTask.java:318) at org.hibernate.tool.ant.ExporterTask.configureExporter(ExporterTask.java:94) at org.hibernate.tool.ant.Hbm2JavaExporterTask.configureExporter(Hbm2JavaExporterTask.java:34) at org.hibernate.tool.ant.ExporterTask.execute(ExporterTask.java:39) at org.hibernate.tool.ant.HibernateToolTask.execute(HibernateToolTask.java:186) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105) at org.apache.tools.ant.Task.perform(Task.java:348) at org.apache.tools.ant.Target.execute(Target.java:357) at org.apache.tools.ant.Target.performTasks(Target.java:385) at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329) at org.apache.tools.ant.Project.executeTarget(Project.java:1298) at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41) at org.apache.tools.ant.Project.executeTargets(Project.java:1181) at org.apache.tools.ant.Main.runBuild(Main.java:698) at org.apache.tools.ant.Main.startAnt(Main.java:199) at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257) at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)

    Hibernate JIRA | 10 years ago | Sebastiao Gazolla C Jr
    java.lang.StringIndexOutOfBoundsException: String index out of range: 256
  2. 0

    hdm2java generating .java files (reverse engineering from database) Throws java.lang.StringIndexOutOfBoundsException when I try to connect large schemas from Informix Databse. (Tests with few tables works fine.) BUILD FAILED C:\eclipse33\hibernate_ant\build.xml:23: java.lang.StringIndexOutOfBoundsException: String index out of range: 256 at org.hibernate.tool.ant.HibernateToolTask.reportException(HibernateToolTask.java:226) at org.hibernate.tool.ant.HibernateToolTask.execute(HibernateToolTask.java:189) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105) at org.apache.tools.ant.Task.perform(Task.java:348) at org.apache.tools.ant.Target.execute(Target.java:357) at org.apache.tools.ant.Target.performTasks(Target.java:385) at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329) at org.apache.tools.ant.Project.executeTarget(Project.java:1298) at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41) at org.apache.tools.ant.Project.executeTargets(Project.java:1181) at org.apache.tools.ant.Main.runBuild(Main.java:698) at org.apache.tools.ant.Main.startAnt(Main.java:199) at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257) at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104) Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: 256 at java.lang.String.charAt(String.java:687) at com.informix.jdbc.IfxDatabaseMetaData.getColumns(IfxDatabaseMetaData.java:3457) at org.hibernate.cfg.reveng.dialect.JDBCMetaDataDialect.getColumns(JDBCMetaDataDialect.java:124) at org.hibernate.cfg.reveng.JDBCReader.processBasicColumns(JDBCReader.java:555) at org.hibernate.cfg.reveng.JDBCReader.readDatabaseSchema(JDBCReader.java:85) at org.hibernate.cfg.reveng.JDBCReader.readDatabaseSchema(JDBCReader.java:837) at org.hibernate.cfg.JDBCBinder.readDatabaseSchema(JDBCBinder.java:115) at org.hibernate.cfg.JDBCBinder.readFromDatabase(JDBCBinder.java:88) at org.hibernate.cfg.JDBCMetaDataConfiguration.readFromJDBC(JDBCMetaDataConfiguration.java:40) at org.hibernate.tool.ant.JDBCConfigurationTask.doConfiguration(JDBCConfigurationTask.java:81) at org.hibernate.tool.ant.ConfigurationTask.getConfiguration(ConfigurationTask.java:55) at org.hibernate.tool.ant.HibernateToolTask.getConfiguration(HibernateToolTask.java:302) at org.hibernate.tool.ant.HibernateToolTask.getProperties(HibernateToolTask.java:318) at org.hibernate.tool.ant.ExporterTask.configureExporter(ExporterTask.java:94) at org.hibernate.tool.ant.Hbm2JavaExporterTask.configureExporter(Hbm2JavaExporterTask.java:34) at org.hibernate.tool.ant.ExporterTask.execute(ExporterTask.java:39) at org.hibernate.tool.ant.HibernateToolTask.execute(HibernateToolTask.java:186) ... 17 more --- Nested Exception --- java.lang.StringIndexOutOfBoundsException: String index out of range: 256 at java.lang.String.charAt(String.java:687) at com.informix.jdbc.IfxDatabaseMetaData.getColumns(IfxDatabaseMetaData.java:3457) at org.hibernate.cfg.reveng.dialect.JDBCMetaDataDialect.getColumns(JDBCMetaDataDialect.java:124) at org.hibernate.cfg.reveng.JDBCReader.processBasicColumns(JDBCReader.java:555) at org.hibernate.cfg.reveng.JDBCReader.readDatabaseSchema(JDBCReader.java:85) at org.hibernate.cfg.reveng.JDBCReader.readDatabaseSchema(JDBCReader.java:837) at org.hibernate.cfg.JDBCBinder.readDatabaseSchema(JDBCBinder.java:115) at org.hibernate.cfg.JDBCBinder.readFromDatabase(JDBCBinder.java:88) at org.hibernate.cfg.JDBCMetaDataConfiguration.readFromJDBC(JDBCMetaDataConfiguration.java:40) at org.hibernate.tool.ant.JDBCConfigurationTask.doConfiguration(JDBCConfigurationTask.java:81) at org.hibernate.tool.ant.ConfigurationTask.getConfiguration(ConfigurationTask.java:55) at org.hibernate.tool.ant.HibernateToolTask.getConfiguration(HibernateToolTask.java:302) at org.hibernate.tool.ant.HibernateToolTask.getProperties(HibernateToolTask.java:318) at org.hibernate.tool.ant.ExporterTask.configureExporter(ExporterTask.java:94) at org.hibernate.tool.ant.Hbm2JavaExporterTask.configureExporter(Hbm2JavaExporterTask.java:34) at org.hibernate.tool.ant.ExporterTask.execute(ExporterTask.java:39) at org.hibernate.tool.ant.HibernateToolTask.execute(HibernateToolTask.java:186) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105) at org.apache.tools.ant.Task.perform(Task.java:348) at org.apache.tools.ant.Target.execute(Target.java:357) at org.apache.tools.ant.Target.performTasks(Target.java:385) at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329) at org.apache.tools.ant.Project.executeTarget(Project.java:1298) at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41) at org.apache.tools.ant.Project.executeTargets(Project.java:1181) at org.apache.tools.ant.Main.runBuild(Main.java:698) at org.apache.tools.ant.Main.startAnt(Main.java:199) at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257) at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)

    Hibernate JIRA | 10 years ago | Sebastiao Gazolla C Jr
    java.lang.StringIndexOutOfBoundsException: String index out of range: 256
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0
    samebug 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.
  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
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: 256

    at java.lang.String.charAt()
  2. Java RT
    String.charAt
    1. java.lang.String.charAt(String.java:687)
    1 frame
  3. com.informix.jdbc
    IfxDatabaseMetaData.getColumns
    1. com.informix.jdbc.IfxDatabaseMetaData.getColumns(IfxDatabaseMetaData.java:3457)
    1 frame
  4. Hibernate Tools
    JDBCReader.readDatabaseSchema
    1. org.hibernate.cfg.reveng.dialect.JDBCMetaDataDialect.getColumns(JDBCMetaDataDialect.java:124)
    2. org.hibernate.cfg.reveng.JDBCReader.processBasicColumns(JDBCReader.java:555)
    3. org.hibernate.cfg.reveng.JDBCReader.readDatabaseSchema(JDBCReader.java:85)
    4. org.hibernate.cfg.reveng.JDBCReader.readDatabaseSchema(JDBCReader.java:837)
    4 frames
  5. Hibernate
    JDBCMetaDataConfiguration.readFromJDBC
    1. org.hibernate.cfg.JDBCBinder.readDatabaseSchema(JDBCBinder.java:115)
    2. org.hibernate.cfg.JDBCBinder.readFromDatabase(JDBCBinder.java:88)
    3. org.hibernate.cfg.JDBCMetaDataConfiguration.readFromJDBC(JDBCMetaDataConfiguration.java:40)
    3 frames
  6. A Hibernate O/RM Module
    HibernateToolTask.execute
    1. org.hibernate.tool.ant.JDBCConfigurationTask.doConfiguration(JDBCConfigurationTask.java:81)
    2. org.hibernate.tool.ant.ConfigurationTask.getConfiguration(ConfigurationTask.java:55)
    3. org.hibernate.tool.ant.HibernateToolTask.getConfiguration(HibernateToolTask.java:302)
    4. org.hibernate.tool.ant.HibernateToolTask.getProperties(HibernateToolTask.java:318)
    5. org.hibernate.tool.ant.ExporterTask.configureExporter(ExporterTask.java:94)
    6. org.hibernate.tool.ant.Hbm2JavaExporterTask.configureExporter(Hbm2JavaExporterTask.java:34)
    7. org.hibernate.tool.ant.ExporterTask.execute(ExporterTask.java:39)
    8. org.hibernate.tool.ant.HibernateToolTask.execute(HibernateToolTask.java:186)
    8 frames
  7. Ant
    UnknownElement.execute
    1. org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
    1 frame
  8. 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
  9. Ant
    Main.startAnt
    1. org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
    2. org.apache.tools.ant.Task.perform(Task.java:348)
    3. org.apache.tools.ant.Target.execute(Target.java:357)
    4. org.apache.tools.ant.Target.performTasks(Target.java:385)
    5. org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
    6. org.apache.tools.ant.Project.executeTarget(Project.java:1298)
    7. org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
    8. org.apache.tools.ant.Project.executeTargets(Project.java:1181)
    9. org.apache.tools.ant.Main.runBuild(Main.java:698)
    10. org.apache.tools.ant.Main.startAnt(Main.java:199)
    10 frames
  10. Apache Ant Launcher
    Launcher.main
    1. org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
    2. org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
    2 frames