-->
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.  [ 3 posts ] 
Author Message
 Post subject: OutOfMemory during Huge database records loading
PostPosted: Mon Feb 14, 2005 1:01 pm 
Newbie

Joined: Wed Sep 15, 2004 10:13 pm
Posts: 8
Read the rules before posting!
http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate version: 3 beta4

Mapping documents:

Code between sessionFactory.openSession() and session.close():
Query qry = session.createQuery("from eg.items");
List list = qry.list();

Full stack trace of any exception that occurs:
java.lang.OutOfMemoryError
Exception in thread "main"

Name and version of the database you are using:
Oracle 9i

I was doing a select query when the above codes generated an OutOfMemory Error. The number of records that I am trying to get is more than 50K. The OutOfMemory Error hits when qry.list() is executed.

_________________
Thanks in advance!


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 14, 2005 1:06 pm 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
Of course you get an OutOfMemoryException, you are loading 50k objects. Please read http://blog.hibernate.org/cgi-bin/blosx ... batch.html


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 14, 2005 10:15 pm 
Newbie

Joined: Wed Sep 15, 2004 10:13 pm
Posts: 8
Thanks!

That really helps!

_________________
Thanks in advance!


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.