xom-interest AT lists.ibiblio.org
Subject: XOM API for Processing XML with Java
List archive
Re: [XOM-interest] NUX, StreamingPathFilter and OutOfMemoryError
- From: Wolfgang Hoschek <wolfgang.hoschek AT mac.com>
- To: elharo AT metalab.unc.edu
- Cc: xom-interest AT lists.ibiblio.org
- Subject: Re: [XOM-interest] NUX, StreamingPathFilter and OutOfMemoryError
- Date: Thu, 22 Nov 2007 18:27:22 -0800
On Nov 22, 2007, at 8:20 AM, Elliotte Harold wrote:
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.
I haven't reported this bug to Sun for lack of time. Feel free to do so if you like.
I've now tested other xerces versions as well via - Djava.endorsed.dirs. There's no bug with the official Apache releases of xerces-2.6.2, xerces-2.7.0, xerces-2.7.1, xerces-2.8.0, xerces-2.8.1, xerces-2.9.0, xerces-2.9.1. As far as I can see the bug only happens with the xml parser bundled with sun java-1.6, which is a fork of some xerces flavour with a variety of unidentifiable mods and patches by sun. Also the bug does not happen with what's bundled with sun java-1.5.
wolfgang.
-
[XOM-interest] NUX, StreamingPathFilter and OutOfMemoryError,
Cedric Coulon, 11/19/2007
-
Re: [XOM-interest] NUX, StreamingPathFilter and OutOfMemoryError,
Wolfgang Hoschek, 11/19/2007
-
Re: [XOM-interest] NUX, StreamingPathFilter and OutOfMemoryError,
Cedric Coulon, 11/20/2007
-
Re: [XOM-interest] NUX, StreamingPathFilter and OutOfMemoryError,
Wolfgang Hoschek, 11/20/2007
-
Re: [XOM-interest] NUX, StreamingPathFilter and OutOfMemoryError,
Wolfgang Hoschek, 11/20/2007
-
Re: [XOM-interest] NUX, StreamingPathFilter and OutOfMemoryError,
Wolfgang Hoschek, 11/20/2007
-
Re: [XOM-interest] NUX, StreamingPathFilter and OutOfMemoryError,
Elliotte Harold, 11/22/2007
- Re: [XOM-interest] NUX, StreamingPathFilter and OutOfMemoryError, Wolfgang Hoschek, 11/22/2007
- Re: [XOM-interest] NUX, StreamingPathFilter and OutOfMemoryError, Steve Loughran, 11/23/2007
- Re: [XOM-interest] NUX, StreamingPathFilter and OutOfMemoryError, Tatu Saloranta, 11/23/2007
-
Re: [XOM-interest] NUX, StreamingPathFilter and OutOfMemoryError,
Elliotte Harold, 11/22/2007
-
Re: [XOM-interest] NUX, StreamingPathFilter and OutOfMemoryError,
Wolfgang Hoschek, 11/20/2007
-
Re: [XOM-interest] NUX, StreamingPathFilter and OutOfMemoryError,
Wolfgang Hoschek, 11/20/2007
-
Re: [XOM-interest] NUX, StreamingPathFilter and OutOfMemoryError,
Wolfgang Hoschek, 11/20/2007
-
Re: [XOM-interest] NUX, StreamingPathFilter and OutOfMemoryError,
Cedric Coulon, 11/20/2007
-
Re: [XOM-interest] NUX, StreamingPathFilter and OutOfMemoryError,
Wolfgang Hoschek, 11/19/2007
Archive powered by MHonArc 2.6.24.