Hi Matej, I guess i've not been as clear as i should have ;)

What I meant is that i THOUGHT the class instance was not referenced in the
page :D

Whereas in fact, the non serializable class instance was referenced
indirectly by my wicket page...

I had something like :
WicketPage -> Instance of class A -> instance of class B  -> instance of
class C (which was not serializable) -> instances of other classes (all
serializable)

The non serializable C Class contained only simple Serializable attribute,
but was not tagged as Serializable.

But the serialization mechanism never complained, and after deserialization,
I had the object graph below :

WicketPage -> Instance of class A -> instance of class B  -> instance of
class C 
but the instance of class C had all of its attributes set to null.

And as I've said in this thread, none of the attributes of class C are
marked as transient.

As soon as i added the Serializable interface to the C class, all my
troubles were gone...

Cheers,

Antoine.


Matej Knopp-2 wrote:
> 
> How can the attributes belong to a non-serializable class that wasn't
> referenced in the page?
> 
> -Matej
> 
> On Wed, Apr 2, 2008 at 1:15 AM, Antoine Angénieux
> <[EMAIL PROTECTED]> wrote:
>> That's the weird thing : I never encountered any exception during
>>  serialization (as i tried to debug that very specific wicket task today
>>  ;)). That's why i was wondering if it could be the java serialization
>>  mechanism that was buggy... No exception thrown, no log trace !
>>
>>  And the attributes in question were not transient, they just belonged to
>>  a non serializable class that i didn't think was referenced in a page.
>>
>>  Antoine.
>>
>>
> 

-- 
View this message in context: 
http://www.nabble.com/Page-versions-disk-serialization-%3A-no-exception-with-a-non-serializable-nested-element-tp16430709p16445836.html
Sent from the Wicket - Dev mailing list archive at Nabble.com.

Reply via email to