Article View: borland.public.jbuilder.java.language
Article #15403Re: Versioning Problems Serializing Objects
From: Jeff Nelson
Date: Wed, 16 Jun 1999 00:00
Date: Wed, 16 Jun 1999 00:00
47 lines
2562 bytes
2562 bytes
I had a few pages discussing possible work around solutions
to this in my book, Programming Mobile Objects with Java,
but the bottom line is planning and design. You have to think
ahead and plan on ways to extend your classes that are
compatible with Serialization.
- Jeff
--
Check out the Design Patterns archive!
http://www.DistributedObjects.com
I'm looking for Java contract positions. Email
jobs @
DistributedObjects
. com
Gary Whitten wrote:
> We are seeing a problem trying to serialize and send objects over HTTP,
> however, I suspect it is a serialization problem and would affect RMI
> also. The problem is the sensitivity of the serialization versioning
> mechanism. It is intended to ensure class consistency at the serialize
> and deserialize ends of some object transfer. The problem is, the
> generated serialVersionUID numbers seem to be affected by the JVM
> actually
> used. We are using a 1.2 HTTP server and 1.1.6 Client which each create
> different serialVersionUIDs so an InvalidClassException is thrown and
> the
> object is not succesfully sent. When we use the same JVM version (1.1.6)
> on the client and server ends, things work fine. We were also able to
> get
> the transfer to work by explicitly setting the class serialVersionUID
> field for our custom classes, but, we do not have that option for
> standard core or 3rd party Java classes.
>
> This would seem to be a rather large problem that would restrict
> serialization any time the client and server JVMs are even slightly
> mismatched. Is there some general way to deal with this problem or are
> we
> missing something?
>
> Thanks,
> Gary Whitten
> whitteng@con2inc.com
Technical Details
Message-ID:
<37687163.33A66B60@example.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<3757EB06.15AA7EF6@con2inc.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,5d0d1d02a7143861 X-Google-Attributes: gidf74b3,public From: Jeff Nelson <donotmail@example.com> Subject: Re: Versioning Problems Serializing Objects Date: 1999/06/16 Message-ID: <37687163.33A66B60@example.com> X-Deja-AN: 490570958 Content-Transfer-Encoding: 7bit References: <3757EB06.15AA7EF6@con2inc.com> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii X-Complaints-To: newsabuse@remarQ.com X-Trace: 929603555.435.59 F7W8ZAFJM1A66CCFEC qube-01.us-ca.remarq.com Organization: http://www.DistributedObjects.com MIME-Version: 1.0 Reply-To: donotmail@example.com NNTP-Posting-Date: Thu, 17 Jun 1999 07:12:35 GMT Newsgroups: borland.public.jbuilder.java.language