-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: query.getResultList throws String index out of range
PostPosted: Thu Oct 27, 2011 8:16 am 
Newbie

Joined: Thu Oct 27, 2011 7:59 am
Posts: 1
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=6935535

The issue is resolved after updating the JDk version to 1.6u29

-Suchit


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.