Submitted On 17-JUL-2007
this is really a huge blocker in den Sun SAX implementation. I will definitely vote for it. you currently not parse big XML files.
Submitted On 24-SEP-2007
I have written StAX code that, it appears, this bug now completely breaks in JDK6. When I use JDK5 (and the BEA StAX jars) my code works again. This is kind of a major problem, no? This means my StAX code cannot (easily) run under JDK6.
Submitted On 24-SEP-2007
Note: when I say is completely broken, it compiles, it parses the file, but on big files it crashes with this exact same exception. My XML file is about 266MB. I am using
XMLInputFactory factory = XMLInputFactory.newInstance();
factory.setProperty(XMLInputFactory.IS_COALESCING, Boolean.TRUE);
XMLStreamReader parser = factory
.createXMLStreamReader(new FileInputStream(filename));
... Then the standard parser.hasNext(), parser.next() and the code gives this exception on .next.
The XMLStreamReader (StAX) should NOT need to store the file in memory, it should be streaming through the file and thus require almost no memory at all.
Submitted On 15-OCT-2007
is there any update on this issue? this is really a blocker in our environment.
Submitted On 19-NOV-2007
bennini
I am also getting the same problem when parsing very large XML files under JRE 1.6.
check the post here:
http://forum.java.sun.com/thread.jspa?messageID=9977989
which has more information about the problem as well as JProfiler screen shots. I am parsing files that are roughly 1GB. Under Java 1.4 and 1.5, everything works great. memory consumption never goes above 20MB.
Submitted On 27-NOV-2007
Workaround:
Download xerces from http://xerces.apache.org/xerces2-j/download.cgi , add xml-apis.jar and xercesImpl.jar to the classpath.
Submitted On 28-APR-2008
gorguda
Incredible huge bug, should be fix ASAP, we took a week to discover it (we were thinking of a memory leak of our own code).
Back to 1.5 fixed everything.
Submitted On 29-MAY-2008
ubschmidt
Another workaround:
Use Woodstox (http://woodstox.codehaus.org/).
Submitted On 03-OCT-2008
LeoRR
Doesn anybody knows which jdk6 update includes the fix to this bug?
Submitted On 23-JAN-2009
stephane_aboab
Hello. I need this fix for my customer. When and into which Java SE revision it will be released? Thanx.
Submitted On 05-FEB-2009
Hello, we are urgently waiting for a fix in JRE 6 and JDK 6. Why does it take so long? What are the definitions of prio 2? I don't trust java anymore, that's terrible.
Submitted On 04-APR-2009
pifpafpuf
Its my guess that the endorsed mechanism does not work, likely because the problematic class(es) are not in an endorsed package, but rather in com.sun.org.XXX.
Harald.
Submitted On 13-APR-2009
Our developer spent hours trying to figure out what this problem was, glad this is not on our side but would appreciate for a fix to be released asap.
Submitted On 14-APR-2009
joehw12
See the comment in the Evaluation section, the fix will be in update 14. To also answer Harald's comment, the endorsed mechnism does work for the JAXP package.
Submitted On 18-MAY-2009
njoneill
I'm running into what looks like a related problem when trying to parse a document with a very large CDATA section. This is with JDK 6 release 14 beta 6. Apparently the parser is attempting to buffer the entire CDATA section as a whole. Is this a bug, or are we limited to using CDATA sections small enough to fit into memory?
java.lang.OutOfMemoryError: Java heap space
at com.sun.org.apache.xerces.internal.util.XMLStringBuffer.append(XMLStringBuffer.java:205)
at com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.scanData(XMLEntityScanner.java:1380)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanCDATASection(XMLDocumentFragmentScannerImpl.java:1646)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2977)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510)
at com.sun.org.apache.xerces.internal.parsers.XML11Configutation.parse(XML11Configutation.java:807)
at com.sun.org.apache.xerces.internal.parsers.XML11Configutation.parse(XML11Configutation.java:737)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:107)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:395)
PLEASE NOTE: JDK6 is formerly known as Project Mustang
|