• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

ava.lang.OutOfMemoryError: Java heap space  RSS feed

 
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
increase the JVM heap space by passing higher value than default at server start up.
Look @ this
 
Teresa Lee
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 81
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Now this really becomes a database question. May be you can ask this in database forum..

Sorry ! ! !

V
 
Die Fledermaus does not fear such a tiny ad:
how do I do my own kindle-like thing - without amazon
https://coderanch.com/t/711421/engineering/kindle-amazon
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!