Return-Path: Delivered-To: apmail-incubator-cayenne-user-archive@locus.apache.org Received: (qmail 87036 invoked from network); 11 Sep 2006 23:00:07 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 11 Sep 2006 23:00:07 -0000 Received: (qmail 7670 invoked by uid 500); 11 Sep 2006 23:00:06 -0000 Delivered-To: apmail-incubator-cayenne-user-archive@incubator.apache.org Received: (qmail 7651 invoked by uid 500); 11 Sep 2006 23:00:06 -0000 Mailing-List: contact cayenne-user-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: cayenne-user@incubator.apache.org Delivered-To: mailing list cayenne-user@incubator.apache.org Received: (qmail 7642 invoked by uid 99); 11 Sep 2006 23:00:06 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 11 Sep 2006 16:00:05 -0700 X-ASF-Spam-Status: No, hits=0.5 required=10.0 tests=DNS_FROM_RFC_ABUSE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of dombrd@gmail.com designates 66.249.82.228 as permitted sender) Received: from [66.249.82.228] (HELO wx-out-0506.google.com) (66.249.82.228) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 11 Sep 2006 16:00:05 -0700 Received: by wx-out-0506.google.com with SMTP id s13so1753144wxc for ; Mon, 11 Sep 2006 15:59:44 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=Zh1TOcXDHastBzMT9ITFOghg6mL3kDKJ2yIq7wqdlLs7y+E6EHKYT/lUfoI9YNUPmyczpLfe3GwEM7L1+pF+cFfZ4abdhwft8WYD2fU8J5bKkeFYBDpx3SmM3FTMbyjdPPH16k8cdNPIopB15Wdh1bbhGCkR/MpBPF1PLqumDMM= Received: by 10.90.106.18 with SMTP id e18mr1950863agc; Mon, 11 Sep 2006 15:59:44 -0700 (PDT) Received: by 10.90.115.14 with HTTP; Mon, 11 Sep 2006 15:59:44 -0700 (PDT) Message-ID: Date: Mon, 11 Sep 2006 18:59:44 -0400 From: "Dave Dombrosky" To: cayenne-user@incubator.apache.org Subject: Re: Exception with Tomcat's session restore capability In-Reply-To: <6CBA1FAB-3B2B-4729-968A-BED9EFA6461F@objectstyle.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <0CF871F4-9CE3-46EB-B074-6BCF54FCD39C@objectstyle.org> <6CBA1FAB-3B2B-4729-968A-BED9EFA6461F@objectstyle.org> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Andrus, I am happy to report that your fix worked! I will be happy to add it in JIRA now. Thanks. -Dave On 9/11/06, Andrus Adamchik wrote: > 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 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 > >> > >> > > > >