On Tue, 27 Nov 2007, Evan Chooly wrote: > So here's the skinny: while my subclass was marked as serializable, the > parent class was not. So no state from the parent class got serialized nor, > not so surprisingly, deserialized. After adding that implements clause > things miraculously started working. So a big "you idiot" for me and a big > thanks to igor for pointing me to the Objects.cloneObject() method to help > write unit tests to highlight my otherwise obvious error.
In an earlier project I also made a check on the main page that serialised it to memory on every request in development mode. It might be a good idea to do something like this but make it check that the cloned object is equal to the original. Yours is a nasty case as in that serialisation seems to fail (or rather work in a broken way) silently. For persistent objects (you said the parent class was a @MappedSuperclass right?) it often makes sense to make them inherit or implement a common base class / interface that implements / extends Serializable. Best wishes, Timo -- Timo Rantalaiho Reaktor Innovations Oy <URL: http://www.ri.fi/ > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
