[ http://issues.apache.org/jira/browse/XALANJ-1678?page=all ]
     
Brian Minchau closed XALANJ-1678:
---------------------------------


Closing issue.

> Xalan sample program XSLTProcessorApplet breaks de-serialization across 
> releases
> --------------------------------------------------------------------------------
>
>          Key: XALANJ-1678
>          URL: http://issues.apache.org/jira/browse/XALANJ-1678
>      Project: XalanJ2
>         Type: Bug
>   Components: Xalan
>     Versions: Latest Development Code
>  Environment: Operating System: Other
> Platform: Other
>     Reporter: Brian Minchau
>     Priority: Blocker
>      Fix For: 2.7
>  Attachments: XLSTProcessorApplet.patch.txt, XLSTProcessorApplet.patch.txt
>
> 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.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to