The following exception occurs saving a large XML
document. (1200 DocBook pages)
Together with the exception a dialog saying "An
external process has changed the document, do
you want to discard the changes?" appears:
java.lang.OutOfMemoryError
org.xml.sax.SAXParseException: Premature end of
file.
at
org.apache.xerces.parsers.AbstractSAXParser.parse
(AbstractSAXParser.java:1189)
at org.dom4j.io.SAXReader.read(SAXReader.java:323)
at org.dom4j.io.SAXReader.read(SAXReader.java:218)
at
org.xngr.browser.util.DocumentUtilities.readDocum
ent(DocumentUtilities.java:144)
at org.xngr.browser.ExchangerDocument.load
(ExchangerDocument.java:382)
at org.xngr.browser.ExchangerDocument.consistent
(ExchangerDocument.java:428)
at
org.xngr.browser.ExchangerDocument.access$000
(ExchangerDocument.java:64)
at
org.xngr.browser.ExchangerDocument$4.actionPerf
ormed(ExchangerDocument.java:516)
at javax.swing.Timer.fireActionPerformed
(Timer.java:271)
at javax.swing.Timer$DoPostEvent.run
(Timer.java:201)
at java.awt.event.InvocationEvent.dispatch
(InvocationEvent.java:178)
at java.awt.EventQueue.dispatchEvent
(EventQueue.java:443)
at
java.awt.EventDispatchThread.pumpOneEventForHie
rarchy(EventDispatchThread.java:191)
at
java.awt.EventDispatchThread.pumpEventsForHierar
chy(EventDispatchThread.java:144)
at java.awt.EventDispatchThread.pumpEvents
(EventDispatchThread.java:138)
at java.awt.EventDispatchThread.pumpEvents
(EventDispatchThread.java:130)
at java.awt.EventDispatchThread.run
(EventDispatchThread.java:98)
--------------------------
Workaround
Try changing the memory heap with the -mx
parameter.