[XOM-interest] NUX, StreamingPathFilter and OutOfMemoryError
Elliotte Harold
elharo at metalab.unc.edu
Thu Nov 22 11:20:08 EST 2007
Wolfgang Hoschek wrote:
> Looks like a bug in the java-1.6 SAX XML parser. A heap dump on OOM
> shows that there is a (single!) instance of
> com.sun.org.apache.xerces.internal.util.XMLStringBuffer that consumes
> 40 MB of memory in a single char[] array.
>
> The bug disappears when using an official Apache Xerces release
> instead of sun's weird xerces variant, for example via
>
> java -Xmx10m -XX:+HeapDumpOnOutOfMemoryError -Djava.endorsed.dirs=/
> Users/hoschek/unix/java/share/apache/xerces-2.9.0/
>
> I suggest using this route as a workaround.
>
Interesting. Have you reported this to Sun?
Also, are you sure it's not a Xerces version issue? Could have been a
bug in Xerces prior to 2.9.0 if something earluer ships with the JDK.
--
Elliotte Rusty Harold elharo at metalab.unc.edu
Java I/O 2nd Edition Just Published!
http://www.cafeaulait.org/books/javaio2/
http://www.amazon.com/exec/obidos/ISBN=0596527500/ref=nosim/cafeaulaitA/
More information about the XOM-interest
mailing list