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

Oracle Community | 3010398 | 9 months ago
Do you find the tips below useful? Click on the to mark them and say thanks to rp . Or join the community to write better ones.
  1. 0

    Unable to Reset AD Account Password for the reconciled accounts using OIM out of the box reset functionality

    Oracle Community | 9 months ago | 3010398
    java.lang.StringIndexOutOfBoundsException: String index out of range: -5
  2. 0
    samebug tip
    You need to make sure that capitalisation of the case for the plugin in the properties file is exactly: "AllocinePlugin" and not "allocineplugin"
    via GitHub by Omertron
  3. 0

    java.lang.StringIndexOutOfBoundsException on some java classes

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

    Automated exception search integrated into your IDE

  5. 0

    GitHub comment 131#189930440

    GitHub | 1 year ago | mbrlabs
    java.lang.StringIndexOutOfBoundsException: String index out of range: -5
  6. 0

    In one specific situation the Hibernate fails to parse the JPQL query correctly. When there is "select" query with "left outer join" with "select size" on join part - the hiberante falls with "String index out of range: -5" exception. I first encountered this with MSSQL database, and then succesfully reproduced the bug with HSQL database. I will attach to this issue a simple maven project that reproduces this bug. The JPQL query, that makes hibernate fall looks like this: "Select a, b.size from EntityA a left outer join a.entityBList b"; Strangely, if you change in that query "left outer join" to "join", it Hibernate stops from falling with exception. Here is full stacktrace: Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: -5 at java.lang.String.substring( at org.hibernate.hql.internal.CollectionSubqueryFactory.createCollectionSubquery( at org.hibernate.hql.internal.ast.tree.FromElementType.toColumns( at org.hibernate.hql.internal.ast.tree.FromElementType.toColumns( at org.hibernate.hql.internal.ast.tree.FromElement.toColumns( at org.hibernate.hql.internal.ast.tree.DotNode.getColumns( at org.hibernate.hql.internal.ast.tree.DotNode.initText( at org.hibernate.hql.internal.ast.tree.DotNode.resolve( at org.hibernate.hql.internal.ast.tree.FromReferenceNode.resolve( at org.hibernate.hql.internal.ast.tree.FromReferenceNode.resolve( at org.hibernate.hql.internal.ast.tree.DotNode.resolveSelectExpression( at org.hibernate.hql.internal.ast.HqlSqlWalker.resolveSelectExpression( at org.hibernate.hql.internal.antlr.HqlSqlBaseWalker.selectExpr( at org.hibernate.hql.internal.antlr.HqlSqlBaseWalker.selectExprList( at org.hibernate.hql.internal.antlr.HqlSqlBaseWalker.selectClause( at org.hibernate.hql.internal.antlr.HqlSqlBaseWalker.query( at org.hibernate.hql.internal.antlr.HqlSqlBaseWalker.selectStatement( at org.hibernate.hql.internal.antlr.HqlSqlBaseWalker.statement( at org.hibernate.hql.internal.ast.QueryTranslatorImpl.analyze( at org.hibernate.hql.internal.ast.QueryTranslatorImpl.doCompile( at org.hibernate.hql.internal.ast.QueryTranslatorImpl.compile( at org.hibernate.engine.query.spi.HQLQueryPlan.<init>( at org.hibernate.engine.query.spi.HQLQueryPlan.<init>( at org.hibernate.engine.query.spi.QueryPlanCache.getHQLQueryPlan( at org.hibernate.internal.AbstractSessionImpl.getHQLQueryPlan( at org.hibernate.internal.AbstractSessionImpl.createQuery( at org.hibernate.internal.SessionImpl.createQuery( at org.hibernate.jpa.spi.AbstractEntityManagerImpl.createQuery(

    Hibernate JIRA | 3 years ago | Dmitry Tolmachov
    java.lang.StringIndexOutOfBoundsException: String index out of range: -5

  1. osvzs 5 times, last 5 days ago
  2. Pilleo 1 times, last 1 week ago
  3. Andreas Häber 2 times, last 3 weeks ago
  4. QrCeric 1 times, last 4 weeks ago
  5. filpgame 2 times, last 2 months ago
24 more registered users
59 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: -5

    at java.lang.String.substring()
  2. Java RT
    1. java.lang.String.substring(
    1 frame
  3. com.thortech.xl
    1. com.thortech.xl.crypto.tcCryptoUtil.decrypt(
    2. com.thortech.xl.dataobj.tcDataSet.decryptDataSet(
    3. com.thortech.xl.dataobj.tcDataBase.readPartialStatement(
    4. com.thortech.xl.dataaccess.tcDataSet.executeQuery(
    5. com.thortech.xl.dataobj.tcDataSet.executeQuery(
    6. com.thortech.xl.dataaccess.tcDataSet.executeQuery(
    7. com.thortech.xl.dataobj.tcDataSet.executeQuery(
    7 frames