Re: Error
really_puzzled via JavaKB.com wrote:
>>>All classes currently implement Serializable.
>>
>>Not according to your exception message..
Andrew, all my classes are serializable so I don't understand why it is doing
this.
All *your* classes are serializable, but some of those classes
contain members (or references to them) of the Sun classes
that are *not* serializeable. For example..
>>>java.io.NotSerializableException: sun.awt.image.OffScreenImage
Note the 'sun' package. These are core Java classes which
are not publicly documented by Sun, though I found this
JavaDoc description of it here..
>><http://jsourcery.com/output/sun/j2se/j2sdk/1.4.2_04/sun/awt/image/OffScreenImage.html>
>>
>>"All Implemented Interfaces:
>> RenderedImage, WritableRenderedImage "
Note that if it implemented Serializable, that would have
read something like..
"All Implemented Interfaces:
RenderedImage, WritableRenderedImage, Serializable"
But, it does not. Indicating that this Sun class is
not serializable.
at ObjectHandler.saveObject(ObjectHandler.java:29)
..
What are you doing at line 29 of ObjectHandler?
In line 29 I am writing the object ..
Unfortunately 'the object' is not enough to go on.
It appears as if you are attempting to serialize a GUI,
is that right?
Note that a small, compilable example speaks a
thousand comments.
<http://mindprod.com/jgloss/sscce.html>
..to an objectoutputstream.
It is best to use exact capitalisation to ensure your audience
can understand exactly what you mean (i.e. ObjectOutputStream).
Any comments gratefully appreciated.
Please post your comments after the question or text
to which it is relevant, and trim any text no longer needed.
(See my replies to you, for an example).
--
Andrew Thompson
physci, javasaver, 1point1c, lensescapes - athompson.info/andrew
.
- Follow-Ups:
- Re: Error
- From: really_puzzled via JavaKB.com