*
The moose likes Java in General and the fly likes ava.lang.OutOfMemoryError: Java heap space Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "ava.lang.OutOfMemoryError: Java heap space" Watch "ava.lang.OutOfMemoryError: Java heap space" New topic
Author

ava.lang.OutOfMemoryError: Java heap space

Teresa Lee
Greenhorn

Joined: Feb 01, 2008
Posts: 24
Hi,

When I tried to query a database table and created a bean to store each record that matched the criteria ( the resultSet it returned is pretty big), I have this problem. Anybody has any clues of how to fix it?

Thanks.
Vishal Matere
Ranch Hand

Joined: Jan 22, 2008
Posts: 81
increase the JVM heap space by passing higher value than default at server start up.
Look @ this


SCJP <br />SCWCD <br />SCBCD <br />SCEA-1
Teresa Lee
Greenhorn

Joined: Feb 01, 2008
Posts: 24
Thanks for your quick reply. My goal is to compare each record of two tables from two different databases and intially, I got connection to the first table and for each record of the resultSet returned(266,000 records in total), I connected to the 2nd database and compare with all the records of the 2nd table. Then, I got Maximum open cursors exceeded error. So, I changed to try to use an ArrayList of bean to hold all the data from the first table and after I closed the first connection then do the comparison, then I have this heap space problem. If I don't want to change the default value for heap space and go back to my first thought, any idear of how to fix the too many open cursors problem?

Thanks for any advice.
Vishal Matere
Ranch Hand

Joined: Jan 22, 2008
Posts: 81
Now this really becomes a database question. May be you can ask this in database forum..

Sorry ! ! !

V
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: ava.lang.OutOfMemoryError: Java heap space
 
Similar Threads
Text box value is not being completely filled with request attribute
Posting to bump up my count...
WA #1.....word association
The x900 effect ?
media player applet