eclipse-ee4j / jaxb-fi

Apache License 2.0
8 stars 10 forks source link

Encoding breaks when writing large documents #16

Open Tomas-Kraus opened 16 years ago

Tomas-Kraus commented 16 years ago

The FastInfoset implementation appears to fail when writing many nodes. The error is:

Exception in thread "main" javax.xml.stream.XMLStreamException: java.io.IOException: Integer > 1,048,576 at com.sun.xml.fastinfoset.stax.StAXDocumentSerializer.encodeTerminationAndCurrentElement (StAXDocumentSerializer.java:630) at com.sun.xml.fastinfoset.stax.StAXDocumentSerializer.writeEndElement (StAXDocumentSerializer.java:271)

The same occurs with SAX.

It is apparently because the indexing tables are blindly filled with more than a million entries, beyond what the spec allows.

The simple but suboptimal fix is to stop inserting into the indexing tables when they hit a million elements.

Environment

Operating System: All Platform: All

Affected Versions

[current]

Tomas-Kraus commented 6 years ago
Tomas-Kraus commented 16 years ago

@glassfishrobot Commented Reported by rragno

Tomas-Kraus commented 16 years ago

@glassfishrobot Commented Was assigned to oleksiys

Tomas-Kraus commented 7 years ago

@glassfishrobot Commented This issue was imported from java.net JIRA FI-16