Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] NUX, StreamingPathFilter and OutOfMemoryError

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: Elliotte Harold <elharo AT metalab.unc.edu>
  • To: Wolfgang Hoschek <wolfgang.hoschek AT mac.com>
  • Cc: xom-interest AT lists.ibiblio.org
  • Subject: Re: [XOM-interest] NUX, StreamingPathFilter and OutOfMemoryError
  • Date: Thu, 22 Nov 2007 11:20:08 -0500

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/




Archive powered by MHonArc 2.6.24.

Top of Page