Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Out of Memory Exception for Java while storing large oject in string

807580Oct 29 2009 — edited Nov 13 2009
Hi,

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.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 11 2009
Added on Oct 29 2009
12 comments
2,346 views