java.lang.OutOfMemoryError: Java heap space for data (retrieved from database) added to arraylist
Posted on 2009-12-16
I am populating a bean using the data retieved from database by executing a qyery like "SELECT * FROM xyz", where the total rows returned by the query is about 16000. Finally I add the bean to an ArrayList and storing the list in session, a custom tag in another JSP will scroll through the list to display paginated results.
The problem is, as soon as I add the bean to the arraylist, I am getting a java.lang.OutOfMemoryError: Java heap space exception which in turn is stopping the flow of execution.
Any help in this regard will be appreciated,