-->
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.  [ 2 posts ] 
Author Message
 Post subject: why use the query list obtain OutOfMemoryError
PostPosted: Thu Dec 08, 2005 6:02 am 
Newbie

Joined: Thu Sep 29, 2005 9:54 pm
Posts: 17
i use follow code get record but occoure a error is OutOfMemoryError


who can tell me why??????

Query qy = this.getSession().createQuery(hql);
qy.setMaxResults(15);
qy.setFirstResult(0);
recordCount = this.getRecordCount(initHql);
List result = qy.list();


another i have 10000 records in my table

how can i do?????


if only have 2000 records in my talbe

hasn't the error

why?????


Top
 Profile  
 
 Post subject: RE:why use the query list obtain OutOfMemoryError
PostPosted: Thu Dec 08, 2005 7:15 am 
Newbie

Joined: Wed Apr 06, 2005 1:37 am
Posts: 2
Location: Bangalore India
Hi,
The issue you are facing is because the JVM runs out of heap memory.
This can be easily taken care of by using the following arguments in the startup of the java process:
Code:
java -Xms128M -Xmx256M


I am assuming you have at least 256M RAM in your machine.
Regards
rishi

_________________
Rishi K Srivastava
Senior Associate (Technology)
Sapient


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

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.