You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by St...@r2isante.fr on 2000/08/29 09:34:23 UTC

Exception in thread "main" java.lang.OutOfMemoryError

Hello !

I'm using Xerces 1.1.3 on Win 95 with JDK 1.2 or 1.3 with 128 Mo of RAM.

With the sample DOMCount, when I parse a file of 10 Mo with validation
(simple Dtd of 15-20 elements), i raise a java.lang.OutOfMemoryError.

Is there any limit fo Xerces for the size of files ?
Can i do something in my own code to avoid this problem ?

We are using XML for import/export purpose in our application and 10 Mo
will not be a exceptional size.

Thanks in advance !

P.S. : Excuse me if the question has already been asked, i'm a newbye over
there and the mailing list archive is down)

Cordialement,

-----------------------------------------
Stéphane RAULT
R2I-Développement
e-mail : stephane.rault@r2isante.fr
Tel      : 02-31-29-32-40

Re: Exception in thread "main" java.lang.OutOfMemoryError

Posted by Andy Clark <an...@apache.org>.
Stephane.RAULT@r2isante.fr wrote:
> I'm using Xerces 1.1.3 on Win 95 with JDK 1.2 or 1.3 with 128 Mo 
> of RAM

The heap doesn't dynamically grow (I wish it did...) so you have
to set the heap size to the maximum that you need. The default 
size with JDK 1.2 is 32 MB. This can be quickly used up on large 
DOM documents.

-- 
Andy Clark * IBM, JTC - Silicon Valley * andyc@apache.org