Then I misunderstood - the NPE happens not during deserialization,
but actually later when you access those objects from within a user
request thread. Never mind...
Now looking at the code, I tend to think this is a bug in Cayenne.
public DataChannel getChannel() {
return channel;
}
should be
public DataChannel getChannel() {
awakeFromDeserialization();
return channel;
}
Could you confirm that? If that happens to be the case, I'd
appreciate entering a bug report. Also as a temp workaround until we
fix it you can call "dataContext.getEntityResolver()" at the
beginning of the request, as it calls 'awakeFromDeserialization'
internally.
Andrus
On Sep 11, 2006, at 5:32 PM, Dave Dombrosky wrote:
> No, I have no custom Cayenne code. I haven't even extended the
> auto-generated DataObject classes.
>
> -Dave
>
> On 9/11/06, Andrus Adamchik <andru..bjectstyle.org> wrote:
>>
>> On Sep 11, 2006, at 5:22 PM, Dave Dombrosky wrote:
>>
>> > Andrus,
>> >
>> > Those are the only objectstyle lines in the stack trace. The next
>> > line up is my code calling a "get" method on a DataObject
>> property, so
>> > I'm not sure how seeing my code would be useful.
>> >
>> > -Dave
>>
>> Ok. That sort of answers my question. Your code tries to access
>> object state on deserialization - this is the problem. Do you have
>> custom readObject(..) implemented?
>>
>> Andrus
>>
>>
>
This archive was generated by hypermail 2.0.0 : Mon Sep 11 2006 - 17:42:31 EDT