DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=28956>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=28956 Xalan sample program XSLTProcessorApplet breaks de-serialization across releases Summary: Xalan sample program XSLTProcessorApplet breaks de- serialization across releases Product: XalanJ2 Version: CurrentCVS Platform: Other OS/Version: Other Status: NEW Severity: Normal Priority: Other Component: Xalan AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] If you create an org.apache.xalan.client.XSLTProcessorApplet object and serialize it with an earlier releases of Xalan, e.g. : . . . obj = new XSLTProcessorApplet(); store(obj, "D:/temp/serialized.tmp"); public static void store(Object obj, String filename) { try { FileOutputStream out = new FileOutputStream(filename); ObjectOutputStream s = new ObjectOutputStream(out); s.writeObject(obj); s.flush(); s.close(); } catch (Exception e) { e.printStackTrace(); } } and later on you read it back in with the latest Xalan obj = load("D:/temp/serialized.tmp"); . . . public static Object load(String filename) { Object obj = null; FileInputStream in; try { in = new FileInputStream(filename); ObjectInputStream sin = new ObjectInputStream(in); obj = sin.readObject(); } catch (Exception e) { e.printStackTrace(); } return obj; } It will fail because of different serialVersionUID values. This value is a "long" that is a hash of methods (except private) and various fields (including private!). Something has changed in XSLTProcessorApplet and we can't de-serialize an old object. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
