Out of Memory Exception for Java while storing large oject in string
807580Oct 29 2009 — edited Nov 13 2009Hi,
Scenario:- Passing CLOB from Oracle function to Java method and parsing the CLOB received.
I am trying to edit a CLOB that is passed from Oracle funtion to a Java method. while in process i am trying to store this CLOB object into a String variable.
When the size of CLOB, that usually is between 100 - 600 Kb's, causes no problems but when trying to use a CLOB that is greater than 1 Mb throws a OutofMemory Exception.
I am alternatively trying to use StrinBuffer, but my question is that when java does allow to store large objects into variables, then why is this throwing an exception?
As suggested by JoachimSaucer, i will try to analyze the memory leaks.
Thanks for suggestion JoachimSaucer.