#8 Reserialization Of Document When Transferred Over HTTP

open
Maarten Coene
None
5
2012-10-08
2005-01-28
Jubilee
No

I have an XML file created by other editors and saved
in a directory on a server. A servlet is supposed to
read this file as a dom4j Document and serialize it to
an applet that may want to modify the file, the
resubmit the modifed XML file for saving. The problem
is that when the Document arrives at the applet, its
use throws a "java.io.InvalidClassException:
org.dom4j.QName; local class incompatible" exception.
Why is my file's serial UID changing when the the file
is transfered as a serial stream? And how can I lock
down this long so edits and various modifications of
the file do not change this UID?
When I use Xalan/Xerces to do the same thing,
everything works fine, which would point to the DOM4J
classes as a problem. (As the only troubleshooting step
taken).

Discussion

  • Maarten Coene
    Maarten Coene
    2005-05-06

    Logged In: YES
    user_id=178745

    I think the problem is that your applet uses another version
    of dom4j than your servlet.

    could you verify this?

    regards,
    Maarten