You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by bu...@apache.org on 2013/04/14 01:19:41 UTC
[Bug 54843] New: java.io.InvalidClassException:
org.apache.tools.ant.Location
https://issues.apache.org/bugzilla/show_bug.cgi?id=54843
Bug ID: 54843
Summary: java.io.InvalidClassException:
org.apache.tools.ant.Location
Product: Ant
Version: 1.9.0
Hardware: All
OS: All
Status: NEW
Severity: trivial
Priority: P2
Component: Core
Assignee: notifications@ant.apache.org
Reporter: cs@schulte.it
Classification: Unclassified
Upgrading from 1.8.4 to 1.9.0, I am getting:
java.io.InvalidClassException: org.apache.tools.ant.Location; local class
incompatible: stream classdesc serialVersionUID = -2242957035428169563, local
class serialVersionUID = 1
at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:604)
at
java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1601)
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1514)
at
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1750)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1347)
at
java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1970)
at
java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1894)
at
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1777)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1347)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:369)
during deserialization of custom exception classes extending
'org.apache.tools.ant.BuildException'.
This is happening due to the addition of
private static final long serialVersionUID = 1L;
to class org.apache.tools.ant.Location.
The serial version UID of that class should be corrected.
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 54843] java.io.InvalidClassException:
org.apache.tools.ant.Location
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54843
--- Comment #4 from Antoine Levy-Lambert <an...@apache.org> ---
Can you bring up this discussion to the Ant developer's list.
I would be afraid of hurting people who are using Ant 1.9.0 by removing this
serial version uid.
--
You are receiving this mail because:
You are the assignee for the bug.
Re: [Bug 54843] java.io.InvalidClassException: org.apache.tools.ant.Location
Posted by Antoine Levy Lambert <an...@gmx.de>.
Thanks, I have closed the bug report as WONTFIX.
I found out that Location and RuntimeConfigurable are the 2 only Ant classes which are serializable.
Maybe someone wanted to save the state of an Ant run in order to be able to restart later ?
Regards,
Antoine
On Apr 28, 2013, at 8:22 PM, Conor MacNeill wrote:
> Yes, I think WONTFIX is the correct approach.
>
> I don't think we want to give any guarantees about compatibility of
> object serializations across Ant versions. I think object
> serialization is not really intended for long term object storage,
> more just for object transmission.
>
> Do we know why Ant objects are being serialized at all?
>
> Conor
>
>
> On 29 April 2013 07:03, Antoine Levy Lambert <an...@gmx.de> wrote:
>> Hi,
>>
>> The bug report 54843 complains about the introduction of a serialVersionUID in Location.java between Ant 1.8.4 and Ant 1.9.0
>> as it prevents the user from loading using Ant 1.9.0 serialized files created with Ant 1.8.4
>>
>> It looks like this change has introduced a form of incompatibility between 1.8.4 and 1.9.0 but now I would be tempted to say that it would be a problem to revert the introduction of these serialVersionUID fields.
>>
>> I am tempted to close the bug report as WONTFIX.
>>
>> Thoughts ?
>>
>> Antoine
>>
>> On Apr 28, 2013, at 4:52 PM, bugzilla@apache.org wrote:
>>
>>> https://issues.apache.org/bugzilla/show_bug.cgi?id=54843
>>>
>>> --- Comment #1 from Antoine Levy-Lambert <an...@apache.org> ---
>>> The private static final long serialVersionUID = 1L was added between Ant
>>> 1.8.4 and Ant 1.9.0 in Revision 1375137 as part of a series of Java 5 updates.
>>>
>>> It looks like this is a change which has broken some degree of compatibility
>>> between Ant 1.8.4 and Ant 1.9.0 but this is a one time change.
>>>
>>> This change should have been documented in WHATSNEW and ReleaseNotes as a
>>> change that could break older environment.
>>>
>>> I will revert to the dev at ant.apache.org list to see whether we should close
>>> this bug report as WONTFIX - my personal inclination.
>>>
>>> --
>>> You are receiving this mail because:
>>> You are the assignee for the bug.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
>> For additional commands, e-mail: dev-help@ant.apache.org
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
> For additional commands, e-mail: dev-help@ant.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org
Re: [Bug 54843] java.io.InvalidClassException: org.apache.tools.ant.Location
Posted by Conor MacNeill <co...@apache.org>.
Yes, I think WONTFIX is the correct approach.
I don't think we want to give any guarantees about compatibility of
object serializations across Ant versions. I think object
serialization is not really intended for long term object storage,
more just for object transmission.
Do we know why Ant objects are being serialized at all?
Conor
On 29 April 2013 07:03, Antoine Levy Lambert <an...@gmx.de> wrote:
> Hi,
>
> The bug report 54843 complains about the introduction of a serialVersionUID in Location.java between Ant 1.8.4 and Ant 1.9.0
> as it prevents the user from loading using Ant 1.9.0 serialized files created with Ant 1.8.4
>
> It looks like this change has introduced a form of incompatibility between 1.8.4 and 1.9.0 but now I would be tempted to say that it would be a problem to revert the introduction of these serialVersionUID fields.
>
> I am tempted to close the bug report as WONTFIX.
>
> Thoughts ?
>
> Antoine
>
> On Apr 28, 2013, at 4:52 PM, bugzilla@apache.org wrote:
>
>> https://issues.apache.org/bugzilla/show_bug.cgi?id=54843
>>
>> --- Comment #1 from Antoine Levy-Lambert <an...@apache.org> ---
>> The private static final long serialVersionUID = 1L was added between Ant
>> 1.8.4 and Ant 1.9.0 in Revision 1375137 as part of a series of Java 5 updates.
>>
>> It looks like this is a change which has broken some degree of compatibility
>> between Ant 1.8.4 and Ant 1.9.0 but this is a one time change.
>>
>> This change should have been documented in WHATSNEW and ReleaseNotes as a
>> change that could break older environment.
>>
>> I will revert to the dev at ant.apache.org list to see whether we should close
>> this bug report as WONTFIX - my personal inclination.
>>
>> --
>> You are receiving this mail because:
>> You are the assignee for the bug.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
> For additional commands, e-mail: dev-help@ant.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org
Re: [Bug 54843] java.io.InvalidClassException: org.apache.tools.ant.Location
Posted by Antoine Levy Lambert <an...@gmx.de>.
Hi,
The bug report 54843 complains about the introduction of a serialVersionUID in Location.java between Ant 1.8.4 and Ant 1.9.0
as it prevents the user from loading using Ant 1.9.0 serialized files created with Ant 1.8.4
It looks like this change has introduced a form of incompatibility between 1.8.4 and 1.9.0 but now I would be tempted to say that it would be a problem to revert the introduction of these serialVersionUID fields.
I am tempted to close the bug report as WONTFIX.
Thoughts ?
Antoine
On Apr 28, 2013, at 4:52 PM, bugzilla@apache.org wrote:
> https://issues.apache.org/bugzilla/show_bug.cgi?id=54843
>
> --- Comment #1 from Antoine Levy-Lambert <an...@apache.org> ---
> The private static final long serialVersionUID = 1L was added between Ant
> 1.8.4 and Ant 1.9.0 in Revision 1375137 as part of a series of Java 5 updates.
>
> It looks like this is a change which has broken some degree of compatibility
> between Ant 1.8.4 and Ant 1.9.0 but this is a one time change.
>
> This change should have been documented in WHATSNEW and ReleaseNotes as a
> change that could break older environment.
>
> I will revert to the dev at ant.apache.org list to see whether we should close
> this bug report as WONTFIX - my personal inclination.
>
> --
> You are receiving this mail because:
> You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org
[Bug 54843] java.io.InvalidClassException:
org.apache.tools.ant.Location
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54843
--- Comment #1 from Antoine Levy-Lambert <an...@apache.org> ---
The private static final long serialVersionUID = 1L was added between Ant
1.8.4 and Ant 1.9.0 in Revision 1375137 as part of a series of Java 5 updates.
It looks like this is a change which has broken some degree of compatibility
between Ant 1.8.4 and Ant 1.9.0 but this is a one time change.
This change should have been documented in WHATSNEW and ReleaseNotes as a
change that could break older environment.
I will revert to the dev at ant.apache.org list to see whether we should close
this bug report as WONTFIX - my personal inclination.
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 54843] java.io.InvalidClassException:
org.apache.tools.ant.Location
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54843
Antoine Levy-Lambert <an...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Version|1.9.0 |1.9.1
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 54843] java.io.InvalidClassException:
org.apache.tools.ant.Location
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54843
Stefan Bodewig <bo...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|REOPENED |RESOLVED
Resolution|--- |WONTFIX
--- Comment #5 from Stefan Bodewig <bo...@apache.org> ---
I'm afraid it is too late to go back now after we had four (point-)releases
using 1 as serialVersionUid - if we restore compatibility with 1.8.4 we break
compatibility with 1.9.[0-3].
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 54843] java.io.InvalidClassException:
org.apache.tools.ant.Location
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54843
Antoine Levy-Lambert <an...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |WONTFIX
--- Comment #2 from Antoine Levy-Lambert <an...@apache.org> ---
Quoting Conor MacNeill
>Yes, I think WONTFIX is the correct approach.
>I don't think we want to give any guarantees about compatibility of
>object serializations across Ant versions. I think object
>serialization is not really intended for long term object storage,
>more just for object transmission.
>Do we know why Ant objects are being serialized at all?
Closing as WONTFIX.
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 54843] java.io.InvalidClassException:
org.apache.tools.ant.Location
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54843
Christian Schulte <cs...@schulte.it> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|WONTFIX |---
--- Comment #3 from Christian Schulte <cs...@schulte.it> ---
> but this is a one time change.
It is a bug. There is no reason to use 1L as the serial version UID instead of
the implicit serial version UID corresponding to this class for years.
Seems like someone got rid of some warning about a missing serial version UID
without understanding what that warning is about.
--
You are receiving this mail because:
You are the assignee for the bug.