Dear All,
I am get following error while getting result list from a JPQL query.
java.lang.StringIndexOutOfBoundsException: String index out of range: 14833
at java.lang.String.charAt(String.java:686)
at org.hibernate.util.StringHelper.replace(StringHelper.java:107)
at org.hibernate.util.StringHelper.replace(StringHelper.java:111)
at org.hibernate.impl.AbstractQueryImpl.expandParameterList(AbstractQueryImpl.java:749)
at org.hibernate.impl.AbstractQueryImpl.expandParameterLists(AbstractQueryImpl.java:718)
at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102)
at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:67)
It is happening only under heavy load on the system. It is not for any particular query but once we get it for any query , it appears for all consecutive queries. We need to restart the server to resolve the issue. We are using EJB 3 on JBOSS 5 , Hibernate version is 3.3.1.
Kindly guide me to get this issue resolved.
Thanks & Regards,
Suchit
The issue was with JDK version 1.6u20 on X64 according to following link this version has a known bug of String.indexOf method, it was returning wrong index.
http://bugs.sun.com/view_bug.do?bug_id=6935535The issue is resolved after updating the JDk version to 1.6u29
-Suchit