Bug 10104

Summary: Calculated serialVersionID's are incompatible with Sun's JDK
Product: [Eclipse Project] JDT Reporter: John P. A. Verhaeg <jverhaeg>
Component: CoreAssignee: Philipe Mulet <philippe_mulet>
Status: RESOLVED WONTFIX QA Contact:
Severity: blocker    
Priority: P3 CC: amorrow, anikolaev, edwin.steiner, eldonm, lattam, ls26990, Michael.Brinkmann, mzarra, stefan.murawski, zitecs
Version: 2.0   
Target Milestone: 2.0 M4   
Hardware: PC   
OS: Windows NT   
Whiteboard:

Description John P. A. Verhaeg CLA 2002-02-22 11:31:52 EST
The serialVersionID's calculated by both the Eclipse compiler (for instance, on 
a client machine) and Sun's JDK compiler (for instance, on a server) produce 
different serialVersionID's.  This was observed using the 2/14 and 1/25 stable 
builds of Eclipse and versions 1.3.1_02 and 1.4.0 of Sun's JDK.
Comment 1 Philipe Mulet CLA 2002-02-25 05:43:50 EST
The serialVersionUID is computed based on the shape of the classfile. 
This ID computation will however expose differences in compiler implementation 
around synthetics added to the classfile (access methods etc...), and there is 
no specification describing what these should be.

Therefore each compiler implementation can come up with different strategies, 
and serialization is affected by this. 

You can experience this as well when using different versions of the same 
compiler. The serialVersionUID is tied with a particular compiler 
implementation, given it is a non-specified behavior. 

The best answer is to ensure you always recompile your sources with the same 
one compiler, whatever this is.

Ok to close ?
Comment 2 Philipe Mulet CLA 2002-02-25 17:04:45 EST
Closing
Comment 3 Philipe Mulet CLA 2003-06-25 11:21:08 EDT
*** Bug 39317 has been marked as a duplicate of this bug. ***
Comment 4 Philipe Mulet CLA 2003-09-05 07:52:54 EDT
*** Bug 24370 has been marked as a duplicate of this bug. ***
Comment 5 Philipe Mulet CLA 2003-09-05 07:54:45 EDT
*** Bug 30209 has been marked as a duplicate of this bug. ***
Comment 6 Philipe Mulet CLA 2003-09-05 07:55:55 EDT
*** Bug 37940 has been marked as a duplicate of this bug. ***
Comment 7 Philipe Mulet CLA 2003-09-19 05:26:42 EDT
*** Bug 43313 has been marked as a duplicate of this bug. ***
Comment 8 Philipe Mulet CLA 2004-01-30 10:19:08 EST
*** Bug 50958 has been marked as a duplicate of this bug. ***
Comment 9 Olivier Thomann CLA 2004-02-03 11:10:02 EST
*** Bug 50958 has been marked as a duplicate of this bug. ***
Comment 10 Philipe Mulet CLA 2004-02-12 12:58:49 EST
*** Bug 51843 has been marked as a duplicate of this bug. ***
Comment 11 Olivier Thomann CLA 2004-08-05 16:12:26 EDT
*** Bug 71485 has been marked as a duplicate of this bug. ***
Comment 12 Andreas Ebbert CLA 2004-10-26 07:35:09 EDT
how much more detail than that in the specification do you need?

http://java.sun.com/j2se/1.3/docs/guide/serialization/spec/class.doc6.html
Comment 13 Andreas Ebbert CLA 2004-10-26 07:58:21 EDT
sorry, after reading the explanations in a duplicate bug
(https://bugs.eclipse.org/bugs/show_bug.cgi?id=30209) I agree with closing this
issue. however, the explanations should be linked in this bug report, which
seems to be the root of all duplicates.
Comment 14 Philipe Mulet CLA 2004-10-27 04:58:47 EDT
Thanks for having added a pointer to the most informative defect.
Comment 15 Darin Wright CLA 2004-11-02 10:23:32 EST
*** Bug 77445 has been marked as a duplicate of this bug. ***
Comment 16 Srikanth Sankaran CLA 2010-03-01 04:43:37 EST
*** Bug 304048 has been marked as a duplicate of this bug. ***