I am serializing a DOM using the following: ObjectOutputStream ostrm = new ObjectOutputStream( new FileOutputStream( outfile)); ostrm.writeObject( doca); ostrm.close(); It works on certain XML files. But it fails in many cases where the DOM is valid and, for example, JDOM succeeds. I am attaching source code, a sample XML file, and sample output. I'm running Redhat 7.2 with IBM 3.1 JDK with Xerces 1.4.4 on an Intel Pentium. This works on short XML files, but over 700 lines it dies for certain XML files and works for others. I've tried the Java flags -Xmx and -Xmx, but no help. Many thanks! ======================== Source file ============================ import java.io.FileOutputStream; import java.io.ObjectOutputStream; import org.apache.xerces.parsers.DOMParser; import org.w3c.dom.Document; import org.xml.sax.SAXParseException; // Read and parse XML document using Xerces parser. public class Txercesbug { public static void main( String[] args) { new Txercesbug( args); } void badparms( String msg) { System.out.println("Error: " + msg); System.out.println("args: infile outfile"); System.exit( 1); } public Txercesbug( String[] args) { Document doca = null; if (args.length != 2) badparms("wrong num parms"); String inuri = args[0]; String outfile = args[1]; try { DOMParser parser = new DOMParser(); parser.parse( inuri); doca = parser.getDocument(); ObjectOutputStream ostrm = new ObjectOutputStream( new FileOutputStream( outfile)); ostrm.writeObject( doca); ostrm.close(); } catch (Exception spe) { badparms( "Exception: " + spe); } } // end constructor } // end class Txercesbug ================================================================= ======================= Sample XML file ========================= <recipeBook> <title> Garlic Lover's Delight </title> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <direction> Chop up more garlic. Chop up more garlic. Chop up more garlic. </direction> <title> Garlic Lover's Delight </title> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <direction> Chop up more garlic. Chop up more garlic. Chop up more garlic. </direction> <title> Garlic Lover's Delight </title> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <direction> Chop up more garlic. Chop up more garlic. Chop up more garlic. </direction> <title> Garlic Lover's Delight </title> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <direction> Chop up more garlic. Chop up more garlic. Chop up more garlic. </direction> <title> Garlic Lover's Delight </title> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <direction> Chop up more garlic. Chop up more garlic. Chop up more garlic. </direction> <title> Garlic Lover's Delight </title> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <direction> Chop up more garlic. Chop up more garlic. Chop up more garlic. </direction> <title> Garlic Lover's Delight </title> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <direction> Chop up more garlic. Chop up more garlic. Chop up more garlic. </direction> <title> Garlic Lover's Delight </title> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <direction> Chop up more garlic. Chop up more garlic. Chop up more garlic. </direction> <title> Garlic Lover's Delight </title> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <direction> Chop up more garlic. Chop up more garlic. Chop up more garlic. </direction> <title> Garlic Lover's Delight </title> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <direction> Chop up more garlic. Chop up more garlic. Chop up more garlic. </direction> <title> Garlic Lover's Delight </title> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <direction> Chop up more garlic. Chop up more garlic. Chop up more garlic. </direction> <title> Garlic Lover's Delight </title> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <direction> Chop up more garlic. Chop up more garlic. Chop up more garlic. </direction> <title> Garlic Lover's Delight </title> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <direction> Chop up more garlic. Chop up more garlic. Chop up more garlic. </direction> <title> Garlic Lover's Delight </title> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <direction> Chop up more garlic. Chop up more garlic. Chop up more garlic. </direction> <title> Garlic Lover's Delight </title> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <direction> Chop up more garlic. Chop up more garlic. Chop up more garlic. </direction> <title> Garlic Lover's Delight </title> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <direction> Chop up more garlic. Chop up more garlic. Chop up more garlic. </direction> <title> Garlic Lover's Delight </title> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <direction> Chop up more garlic. Chop up more garlic. Chop up more garlic. </direction> <title> Garlic Lover's Delight </title> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <direction> Chop up more garlic. Chop up more garlic. Chop up more garlic. </direction> <title> Garlic Lover's Delight </title> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <direction> Chop up more garlic. Chop up more garlic. Chop up more garlic. </direction> <title> Garlic Lover's Delight </title> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <direction> Chop up more garlic. Chop up more garlic. Chop up more garlic. </direction> <title> Garlic Lover's Delight </title> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <direction> Chop up more garlic. Chop up more garlic. Chop up more garlic. </direction> <title> Garlic Lover's Delight </title> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <direction> Chop up more garlic. Chop up more garlic. Chop up more garlic. </direction> <title> Garlic Lover's Delight </title> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <direction> Chop up more garlic. Chop up more garlic. Chop up more garlic. </direction> <title> Garlic Lover's Delight </title> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <direction> Chop up more garlic. Chop up more garlic. Chop up more garlic. </direction> <title> Garlic Lover's Delight </title> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <direction> Chop up more garlic. Chop up more garlic. Chop up more garlic. </direction> <title> Garlic Lover's Delight </title> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <direction> Chop up more garlic. Chop up more garlic. Chop up more garlic. </direction> <title> Garlic Lover's Delight </title> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <direction> Chop up more garlic. Chop up more garlic. Chop up more garlic. </direction> <title> Garlic Lover's Delight </title> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <direction> Chop up more garlic. Chop up more garlic. Chop up more garlic. </direction> <title> Garlic Lover's Delight </title> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <direction> Chop up more garlic. Chop up more garlic. Chop up more garlic. </direction> <title> Garlic Lover's Delight </title> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <direction> Chop up more garlic. Chop up more garlic. Chop up more garlic. </direction> <title> Garlic Lover's Delight </title> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <direction> Chop up more garlic. Chop up more garlic. Chop up more garlic. </direction> <title> Garlic Lover's Delight </title> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <direction> Chop up more garlic. Chop up more garlic. Chop up more garlic. </direction> <title> Garlic Lover's Delight </title> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <direction> Chop up more garlic. Chop up more garlic. Chop up more garlic. </direction> <title> Garlic Lover's Delight </title> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <direction> Chop up more garlic. Chop up more garlic. Chop up more garlic. </direction> <title> Garlic Lover's Delight </title> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <direction> Chop up more garlic. Chop up more garlic. Chop up more garlic. </direction> <title> Garlic Lover's Delight </title> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <direction> Chop up more garlic. Chop up more garlic. Chop up more garlic. </direction> <title> Garlic Lover's Delight </title> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <direction> Chop up more garlic. Chop up more garlic. Chop up more garlic. </direction> <title> Garlic Lover's Delight </title> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <direction> Chop up more garlic. Chop up more garlic. Chop up more garlic. </direction> <title> Garlic Lover's Delight </title> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <direction> Chop up more garlic. Chop up more garlic. Chop up more garlic. </direction> <title> Garlic Lover's Delight </title> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <direction> Chop up more garlic. Chop up more garlic. Chop up more garlic. </direction> <title> Garlic Lover's Delight </title> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <direction> Chop up more garlic. Chop up more garlic. Chop up more garlic. </direction> <title> Garlic Lover's Delight </title> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <direction> Chop up more garlic. Chop up more garlic. Chop up more garlic. </direction> <title> Garlic Lover's Delight </title> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <direction> Chop up more garlic. Chop up more garlic. Chop up more garlic. </direction> <title> Garlic Lover's Delight </title> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <direction> Chop up more garlic. Chop up more garlic. Chop up more garlic. </direction> <title> Garlic Lover's Delight </title> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <direction> Chop up more garlic. Chop up more garlic. Chop up more garlic. </direction> <title> Garlic Lover's Delight </title> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <direction> Chop up more garlic. Chop up more garlic. Chop up more garlic. </direction> <title> Garlic Lover's Delight </title> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <direction> Chop up more garlic. Chop up more garlic. Chop up more garlic. </direction> <title> Garlic Lover's Delight </title> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <direction> Chop up more garlic. Chop up more garlic. Chop up more garlic. </direction> <title> Garlic Lover's Delight </title> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <direction> Chop up more garlic. Chop up more garlic. Chop up more garlic. </direction> <title> Garlic Lover's Delight </title> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <direction> Chop up more garlic. Chop up more garlic. Chop up more garlic. </direction> <title> Garlic Lover's Delight </title> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <direction> Chop up more garlic. Chop up more garlic. Chop up more garlic. </direction> <title> Garlic Lover's Delight </title> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <direction> Chop up more garlic. Chop up more garlic. Chop up more garlic. </direction> <title> Garlic Lover's Delight </title> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <direction> Chop up more garlic. Chop up more garlic. Chop up more garlic. </direction> <title> Garlic Lover's Delight </title> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <direction> Chop up more garlic. Chop up more garlic. Chop up more garlic. </direction> <title> Garlic Lover's Delight </title> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <direction> Chop up more garlic. Chop up more garlic. Chop up more garlic. </direction> <title> Garlic Lover's Delight </title> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <direction> Chop up more garlic. Chop up more garlic. Chop up more garlic. </direction> <title> Garlic Lover's Delight </title> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <direction> Chop up more garlic. Chop up more garlic. Chop up more garlic. </direction> <title> Garlic Lover's Delight </title> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <direction> Chop up more garlic. Chop up more garlic. Chop up more garlic. </direction> <title> Garlic Lover's Delight </title> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <direction> Chop up more garlic. Chop up more garlic. Chop up more garlic. </direction> <title> Garlic Lover's Delight </title> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <direction> Chop up more garlic. Chop up more garlic. Chop up more garlic. </direction> <title> Garlic Lover's Delight </title> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <direction> Chop up more garlic. Chop up more garlic. Chop up more garlic. </direction> <title> Garlic Lover's Delight </title> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <direction> Chop up more garlic. Chop up more garlic. Chop up more garlic. </direction> <title> Garlic Lover's Delight </title> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <direction> Chop up more garlic. Chop up more garlic. Chop up more garlic. </direction> <title> Garlic Lover's Delight </title> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <direction> Chop up more garlic. Chop up more garlic. Chop up more garlic. </direction> <title> Garlic Lover's Delight </title> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <direction> Chop up more garlic. Chop up more garlic. Chop up more garlic. </direction> <title> Garlic Lover's Delight </title> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <direction> Chop up more garlic. Chop up more garlic. Chop up more garlic. </direction> <title> Garlic Lover's Delight </title> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <direction> Chop up more garlic. Chop up more garlic. Chop up more garlic. </direction> <title> Garlic Lover's Delight </title> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <direction> Chop up more garlic. Chop up more garlic. Chop up more garlic. </direction> <title> Garlic Lover's Delight </title> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <direction> Chop up more garlic. Chop up more garlic. Chop up more garlic. </direction> <title> Garlic Lover's Delight </title> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <direction> Chop up more garlic. Chop up more garlic. Chop up more garlic. </direction> <title> Garlic Lover's Delight </title> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <direction> Chop up more garlic. Chop up more garlic. Chop up more garlic. </direction> <title> Garlic Lover's Delight </title> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <direction> Chop up more garlic. Chop up more garlic. Chop up more garlic. </direction> <title> Garlic Lover's Delight </title> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <direction> Chop up more garlic. Chop up more garlic. Chop up more garlic. </direction> <title> Garlic Lover's Delight </title> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <direction> Chop up more garlic. Chop up more garlic. Chop up more garlic. </direction> <title> Garlic Lover's Delight </title> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <direction> Chop up more garlic. Chop up more garlic. Chop up more garlic. </direction> <title> Garlic Lover's Delight </title> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <direction> Chop up more garlic. Chop up more garlic. Chop up more garlic. </direction> <title> Garlic Lover's Delight </title> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <direction> Chop up more garlic. Chop up more garlic. Chop up more garlic. </direction> <title> Garlic Lover's Delight </title> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <direction> Chop up more garlic. Chop up more garlic. Chop up more garlic. </direction> <title> Garlic Lover's Delight </title> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <direction> Chop up more garlic. Chop up more garlic. Chop up more garlic. </direction> <title> Garlic Lover's Delight </title> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <ingred> Lots of garlic </ingred> <direction> Chop up more garlic. Chop up more garlic. Chop up more garlic. </direction> </recipeBook> ================================================================= ========================= Sample Output ========================= Exception in thread "main" java.lang.StackOverflowError at java.lang.reflect.Method.invoke(Native Method) at java.io.ObjectOutputStream.invokeObjectWriter(ObjectOutputStream.java:1891) at java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:1223) at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:372) at java.io.ObjectOutputStream.outputClassFields(ObjectOutputStream.java(Compiled Code)) at java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java:486) at java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:1227) at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:372) at java.io.ObjectOutputStream.outputClassFields(ObjectOutputStream.java(Compiled Code)) at java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java:486) at java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:1227) at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:372) at java.io.ObjectOutputStream.outputClassFields(ObjectOutputStream.java(Compiled Code)) at java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java:486) at java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:1227) at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:372) at java.io.ObjectOutputStream.outputClassFields(ObjectOutputStream.java(Compiled Code)) at java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java:486) at java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:1227) at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:372) at java.io.ObjectOutputStream.outputClassFields(ObjectOutputStream.java(Compiled Code)) at java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java:486) at java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:1227) at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:372) at java.io.ObjectOutputStream.outputClassFields(ObjectOutputStream.java(Compiled Code)) at java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java:486) at java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:1227) at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:372) at java.io.ObjectOutputStream.outputClassFields(ObjectOutputStream.java(Compiled Code)) at java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java:486) at java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:1227) at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:372) ... LOTS DELETED ... at java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:1227) at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:372) at java.io.ObjectOutputStream.outputClassFields(ObjectOutputStream.java:1854) at java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java:486) at org.apache.xerces.dom.ParentNode.writeObject(ParentNode.java:908) at java.lang.reflect.Method.invoke(Native Method) at java.io.ObjectOutputStream.invokeObjectWriter(ObjectOutputStream.java:1891) at java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:1223) at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:372) at java.io.ObjectOutputStream.outputClassFields(ObjectOutputStream.java:1854) at java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java:486) at org.apache.xerces.dom.ParentNode.writeObject(ParentNode.java:908) at java.lang.reflect.Method.invoke(Native Method) at java.io.ObjectOutputStream.invokeObjectWriter(ObjectOutputStream.java:1891) at java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:1223) at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:372) at txmlapk.Txercesbug.<init>(Txercesbug.java:52) at txmlapk.Txercesbug.main(Txercesbug.java:25) =================================================================
It would probably be a good idea to attach one or more of the documents which causes this to fail. (The best way to serialize a DOM is usually to write it out as XML, but that's a different matter.)
The sample files (source, XML, stack trace) are included in the "Description" field within this bug report. Next time I'll attach them separately :-)
See also #18925.
See also #4284.
See also (and vote for) http://developer.java.sun.com/developer/bugParade/bugs/4152790.html.