Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

java.lang.OutOfMemoryError: Java heap space

 
Ganeshkumar cheekati
Ranch Hand
Posts: 362
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
i am getting java.lang.OutOfMemoryError: Java heap space in my code where i am exporting 20,000 records to excel sheet using POI...
Can anyone give me solution for this?
Thanks in Advance....
 
Rene Larsen
Ranch Hand
Posts: 1179
Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You could try to increase the heap memory size on the server

and maybe you also need to set

Another very important issue is the code it self - does it preform god enough ??
 
Remko Strating
Ranch Hand
Posts: 893
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A different solution could be adjusting the code where the 20.000 lines are imported in parts to Excel and not al the records are read in memory at once.
 
Ganeshkumar cheekati
Ranch Hand
Posts: 362
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i am doing the samething like creating different sheets for each 250 records while exporting to excel using poi api but it is not working.

Eventhough i used the command to increase the heapsize in tomcat also not working.

In companies we are using tomcat with out installation that why command is not working..

Any suggestion

Thanks in Advance...





 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic