Hi Mark,
The best way to deal with this is probably to pass the document as text. Java serialization is designed to handle graphs of objects, but the tree structure of XML document representations (lots of very small objects, none reused) gives it conniptions. The text representation of the document is both smaller than the Java serialized form and faster to process.
For some actual figures see http://www.sosnoski.com/opensrc/xmlbench/results.html#java-serial
I've got a project I started last year to build a more efficient representation for transferring XML documents, described at http://www.sosnoski.com/opensrc/xmls/index.html. This still looks good, but I haven't carried through on building other adapters and extending the format. A DOM adapter should be pretty easy to add to the existing JDOM and dom4j adapters. I'm hoping to spend some time on this project before the end of the month (extending it to full infoset compatibility and adding adapters).
- Dennis
Mark Gertsvolf wrote:
Jeff/John,
Thank you for your answers.
In fact when I increase the stack size the Stack overflow exception disappears and the: RMI error: java.RMI.UmnarshalException is thrown instead from deep inside the ObjectInputSteam.readObject. The exception is caused by java.io.EOFException
This problem only occurs if the original XML is large enough.
Any ideas?
Thanks again. Mark.
Jeff Orris wrote:
You can increase the stack size with the -Xss option on the java command, i.e., java -Xss64m.
Mark Gertsvolf <[EMAIL PROTECTED] To: [EMAIL PROTECTED] com> cc: Subject: Passing large XML Document object via RMI 06/16/02 09:42 AM Please respond to xerces-j-user
Hello everybody,
While using Xerces-J version 2.0.1. I am having a problem with passing a large XML Document via RMI. The receiving side gets a "Stack overflow" exception. Some of the resources on the web suggest that it is a serialization issue (the serialization being a recursive process causes stack overflow on a large hierarchy of objects, which DocumentImpl object is). The solution is to overwrite writeObject/readObject methods of the object in question using intimate knowledge of the object.
Has anybody had such an issue in the past and what is the solution.
Your help is much appreciated. Mark Gertsvolf
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
