java.lang.StringIndexOutOfBoundsException: String index out of range: -2

Hibernate JIRA | Brett Meyer | 3 years ago
  1. 0

    {quote} java.lang.StringIndexOutOfBoundsException: String index out of range: -2 at java.lang.String.substring(String.java:1875) at org.hibernate.persister.entity.AbstractEntityPersister.generateGeneratedValuesSelectString(AbstractEntityPersister.java:1722) at org.hibernate.persister.entity.AbstractEntityPersister.generateInsertGeneratedValuesSelectString(AbstractEntityPersister.java:1691) at org.hibernate.persister.entity.AbstractEntityPersister.doLateInit(AbstractEntityPersister.java:3988) at org.hibernate.persister.entity.AbstractEntityPersister.postInstantiate(AbstractEntityPersister.java:4008) at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:479) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1856) at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:854) at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:1) at org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl.withTccl(ClassLoaderServiceImpl.java:396) at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:846) at org.hibernate.jpa.test.BaseEntityManagerFunctionalTestCase.buildEntityManagerFactory(BaseEntityManagerFunctionalTestCase.java:96) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27) at org.junit.internal.runners.statements.FailOnTimeout$StatementThread.run(FailOnTimeout.java:74) {quote}

    Hibernate JIRA | 3 years ago | Brett Meyer
    java.lang.StringIndexOutOfBoundsException: String index out of range: -2
  2. 0

    {quote} java.lang.StringIndexOutOfBoundsException: String index out of range: -2 at java.lang.String.substring(String.java:1875) at org.hibernate.persister.entity.AbstractEntityPersister.generateGeneratedValuesSelectString(AbstractEntityPersister.java:1722) at org.hibernate.persister.entity.AbstractEntityPersister.generateInsertGeneratedValuesSelectString(AbstractEntityPersister.java:1691) at org.hibernate.persister.entity.AbstractEntityPersister.doLateInit(AbstractEntityPersister.java:3988) at org.hibernate.persister.entity.AbstractEntityPersister.postInstantiate(AbstractEntityPersister.java:4008) at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:479) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1856) at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:854) at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:1) at org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl.withTccl(ClassLoaderServiceImpl.java:396) at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:846) at org.hibernate.jpa.test.BaseEntityManagerFunctionalTestCase.buildEntityManagerFactory(BaseEntityManagerFunctionalTestCase.java:96) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27) at org.junit.internal.runners.statements.FailOnTimeout$StatementThread.run(FailOnTimeout.java:74) {quote}

    Hibernate JIRA | 3 years ago | Brett Meyer
    java.lang.StringIndexOutOfBoundsException: String index out of range: -2
  3. 0

    "dist" command crashes with "java.lang.StringIndexOutOfBoundsException: String index out of range: -2"

    GitHub | 2 years ago | bwbecker
    java.lang.StringIndexOutOfBoundsException: String index out of range: -2
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Using BigDecimal in number factorisation

    Stack Overflow | 2 years ago | Emma
    java.lang.StringIndexOutOfBoundsException: String index out of range: -2
  6. 0

    StringIndexOutOfBoundsException in com.googlecode.sardine.SardineImpl.getResources(SardineImpl.java:221)

    GitHub | 4 years ago | dkocher
    java.lang.StringIndexOutOfBoundsException: String index out of range: -2

  1. richard77 2 times, last 1 day ago
  2. kjhdofjosvs 2 times, last 5 days ago
  3. archenroot 17 times, last 2 weeks ago
  4. Alexandru Popa 2 times, last 3 weeks ago
  5. poroszd 3 times, last 4 weeks ago
18 more registered users
58 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: -2

    at java.lang.String.substring()
  2. Java RT
    String.substring
    1. java.lang.String.substring(String.java:1875)
    1 frame
  3. Hibernate
    Configuration.buildSessionFactory
    1. org.hibernate.persister.entity.AbstractEntityPersister.generateGeneratedValuesSelectString(AbstractEntityPersister.java:1722)
    2. org.hibernate.persister.entity.AbstractEntityPersister.generateInsertGeneratedValuesSelectString(AbstractEntityPersister.java:1691)
    3. org.hibernate.persister.entity.AbstractEntityPersister.doLateInit(AbstractEntityPersister.java:3988)
    4. org.hibernate.persister.entity.AbstractEntityPersister.postInstantiate(AbstractEntityPersister.java:4008)
    5. org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:479)
    6. org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1856)
    6 frames
  4. org.hibernate.jpa
    EntityManagerFactoryBuilderImpl$4.perform
    1. org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:854)
    2. org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:1)
    2 frames
  5. org.hibernate.boot
    ClassLoaderServiceImpl.withTccl
    1. org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl.withTccl(ClassLoaderServiceImpl.java:396)
    1 frame
  6. org.hibernate.jpa
    BaseEntityManagerFunctionalTestCase.buildEntityManagerFactory
    1. org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:846)
    2. org.hibernate.jpa.test.BaseEntityManagerFunctionalTestCase.buildEntityManagerFactory(BaseEntityManagerFunctionalTestCase.java:96)
    2 frames
  7. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    4. java.lang.reflect.Method.invoke(Method.java:601)
    4 frames
  8. JUnit
    FailOnTimeout$StatementThread.run
    1. org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
    2. org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
    3. org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
    4. org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
    5. org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
    6. org.junit.internal.runners.statements.FailOnTimeout$StatementThread.run(FailOnTimeout.java:74)
    6 frames