Return-Path: Delivered-To: apmail-cayenne-user-archive@www.apache.org Received: (qmail 60650 invoked from network); 17 Oct 2007 07:04:52 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 17 Oct 2007 07:04:52 -0000 Received: (qmail 91414 invoked by uid 500); 17 Oct 2007 07:04:39 -0000 Delivered-To: apmail-cayenne-user-archive@cayenne.apache.org Received: (qmail 91401 invoked by uid 500); 17 Oct 2007 07:04:39 -0000 Mailing-List: contact user-help@cayenne.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cayenne.apache.org Delivered-To: mailing list user@cayenne.apache.org Received: (qmail 91392 invoked by uid 99); 17 Oct 2007 07:04:39 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 17 Oct 2007 00:04:39 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [208.78.103.231] (HELO vorsha.objectstyle.org) (208.78.103.231) by apache.org (qpsmtpd/0.29) with SMTP; Wed, 17 Oct 2007 07:04:40 +0000 Received: (qmail 22914 invoked from network); 17 Oct 2007 07:04:19 -0000 Received: from unknown (HELO ??s???h?IPv6:::1?) (127.0.0.1) by localhost with SMTP; 17 Oct 2007 07:04:19 -0000 Mime-Version: 1.0 (Apple Message framework v752.3) In-Reply-To: <7aa7e3d90710162354m2a1014cao740231ac1ccba22f@mail.gmail.com> References: <7aa7e3d90709120818k4ea825d4s43bc10e2c45863ed@mail.gmail.com> <38817FB2-2F9D-464A-89F9-EE9AA87FF0B6@objectstyle.org> <468F6C4D-D4AF-49D4-B0B1-41E3D4CE1423@objectstyle.org> <7aa7e3d90709170440s7da0567bg624d186df6598c70@mail.gmail.com> <7aa7e3d90710040609l7d21865an3cdedb6062d5b9d9@mail.gmail.com> <7aa7e3d90710061554rfc7998w1fffadaab2465aca@mail.gmail.com> <7D316A75-EA79-41DB-A756-531155E485D3@objectstyle.org> <8DFA9A3D-615B-408F-8B05-E998885A91F3@objectstyle.org> <7aa7e3d90710162354m2a1014cao740231ac1ccba22f@mail.gmail.com> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <1C71369C-DBD6-42D1-B794-92080CB0E0CD@objectstyle.org> Content-Transfer-Encoding: 7bit From: Andrus Adamchik Subject: Re: DataRowStore.sendUpdateNotification NullPointerException Date: Wed, 17 Oct 2007 10:04:25 +0300 To: user@cayenne.apache.org X-Mailer: Apple Mail (2.752.3) X-Virus-Checked: Checked by ClamAV on apache.org Thanks for the info. Still not sure what we are going to do about though... [FYI, for the actual patch you can check subversion tab in Jira] https://issues.apache.org/cayenne/browse/CAY-796? page=com.atlassian.jira.plugin.ext.subversion:subversion-commits- tabpanel Andrus On Oct 17, 2007, at 9:54 AM, Emilian Bold wrote: > Hy, > > I just tested my code with the 2.0.4 jar from the link you gave me > (and the 2.0.4 official release). It still throws that > NullPointerException if I don't init the EventManager properly. > > So I think CAY-796 doesn't solve this as it's not actually a > serialization issue, just a null EventManager that's propagated to the > children. (I assume your patch was some readResolve() of some kind so > it's not so unexpected for me to still have the NPE). > > Emilian > > > On 10/8/07, Andrus Adamchik wrote: >>> Before we make any other changes, could you confirm that with a >>> CAY-796 fix you can use DataDomain without EventManager? >> >> BTW, while the Cayenne developers are voting to make an official >> 2.0.4 release, you can download the unofficial release files from >> here: >> >> http://people.apache.org/~aadamchik/release/2.0.4/ >> >> Andrus >> >> >> On Oct 8, 2007, at 11:11 AM, Andrus Adamchik wrote: >>> Hi Emilian, >>> >>> I agree with your general point about the obscure nature of this >>> behavior. However CAY-796 fix was already supposed to address the >>> underlying deserialization bug (something I did not consider in my >>> previous reply). Before we make any other changes, could you >>> confirm that with a CAY-796 fix you can use DataDomain without >>> EventManager? >>> >>> Andrus >>> >>> >>> On Oct 7, 2007, at 1:54 AM, Emilian Bold wrote: >>>> Well, not quite a cayenne "bug" just a design decision that >>>> impacts API users. >>>> >>>> I don't *need* to listen to events to why am I forced to set a >>>> manager >>>> ? Not to mention there's no warning and the 1st error I got sent >>>> me on >>>> a serialization wild goose chase. >>>> >>>> That was my whole idea: just use some default if no manager >>>> provided. >>>> >>>> Emilian >>>> >>>> On 10/4/07, Andrus Adamchik wrote: >>>>> I see. Yes, EventManager needs to be provided to the >>>>> DataDomain. So >>>>> this is not a bug in Cayenne, and I am not sure how we can >>>>> "fix" it. >>>>> Injection of EventManager is tied to the lifecycle, so using an >>>>> arbitrary EM doesn't seem to be a good solution. Maybe we'll >>>>> simply >>>>> document this behavior via Javadocs.... >>>>> >>>>> A side note regarding the *default* EventManager, there are >>>>> plans to >>>>> deprecate and avoid using it in Cayenne internally, as the >>>>> singleton >>>>> makes configuration much less flexible. >>>>> >>>>> Andrus >>>>> >>>>> On Oct 4, 2007, at 4:09 PM, Emilian Bold wrote: >>>>> >>>>>> I finally figured out what my bug was (it wasn't CAY-796 >>>>>> actually). >>>>>> >>>>>> See https://issues.apache.org/cayenne/browse/CAY-871 >>>>>> >>>>>> Emilian >>>>>> >>>>>> On 9/17/07, Emilian Bold wrote: >>>>>>> Thanks, that's great. I'll wait for the official 2.0.4 as I've >>>>>>> found a >>>>>>> workaround in my situation (still trying to figure out the exact >>>>>>> cause, I think some rich-client is serializing >>>>>>> CayenneDataObjects >>>>>>> directly instead of client classes). >>>>>>> >>>>>>> Emilian >>>>>>> >>>>>>> >>>>>>> On 9/15/07, Andrus Adamchik wrote: >>>>>>>> Ok, I fixed CAY-796 for 1.2, 2.0, 3.0 branches. To get a fixed >>>>>>>> version you can either build the code from Subversion [1,2] or >>>>>>>> wait >>>>>>>> till 2.0.4 comes out. >>>>>>>> >>>>>>>> Cheers, >>>>>>>> Andrus >>>>>>>> >>>>>>>> [1] http://svn.apache.org/repos/asf/cayenne/main/branches/ >>>>>>>> STABLE-2.0/ >>>>>>>> [2] http://cayenne.apache.org/legacy-ant-build.html >>>>>>>> >>>>>>>> >>>>>>>> On Sep 12, 2007, at 7:54 PM, Andrus Adamchik wrote: >>>>>>>>> Hi there, >>>>>>>>> >>>>>>>>> Yeah, looks like CAY-796 [1] to me. I could swear we fixed >>>>>>>>> it, but >>>>>>>>> looks like we did not. Ok, adding that to a TODO list... >>>>>>>>> >>>>>>>>> In the meantime try to check the "Use Shared Cache" checkbox >>>>>>>>> in the >>>>>>>>> Modeler - this would hopefully take care of the problem (and >>>>>>>>> probably improve your performance if you could live with a >>>>>>>>> bit of >>>>>>>>> object caching in your app). >>>>>>>>> >>>>>>>>> Andrus >>>>>>>>> >>>>>>>>> >>>>>>>>> [1] https://issues.apache.org/cayenne/browse/CAY-796 >>>>>>>>> >>>>>>>>> >>>>>>>>> On Sep 12, 2007, at 6:18 PM, Emilian Bold wrote: >>>>>>>>> >>>>>>>>>> Hy, >>>>>>>>>> >>>>>>>>>> I keep getting this exception: >>>>>>>>>> >>>>>>>>>> java.lang.NullPointerException >>>>>>>>>> at >>>>>>>>>> org.apache.cayenne.access.DataRowStore.sendUpdateNotification >>>>>>>>>> (DataRowStore.java:673) >>>>>>>>>> at >>>>>>>>>> org.apache.cayenne.access.DataRowStore.processSnapshotChanges >>>>>>>>>> (DataRowStore.java:538) >>>>>>>>>> at >>>>>>>>>> org.apache.cayenne.access.DataRowStore.snapshotsUpdatedForObj >>>>>>>>>> ec >>>>>>>>>> ts >>>>>>>>>> (DataRowStore.java:278) >>>>>>>>>> at >>>>>>>>>> org.apache.cayenne.access.ObjectResolver.objectsFromDataRows >>>>>>>>>> (ObjectResolver.java:121) >>>>>>>>>> at >>>>>>>>>> org.apache.cayenne.access.ObjectResolver.synchronizedObjectsF >>>>>>>>>> ro >>>>>>>>>> mDa >>>>>>>>>> taR >>>>>>>>>> ows(ObjectResolver.java:97) >>>>>>>>>> at >>>>>>>>>> org.apache.cayenne.access.DataDomainQueryAction.interceptObje >>>>>>>>>> ct >>>>>>>>>> Con >>>>>>>>>> ver >>>>>>>>>> sion(DataDomainQueryAction.java:319) >>>>>>>>>> at >>>>>>>>>> org.apache.cayenne.access.DataDomainQueryAction.execute >>>>>>>>>> (DataDomainQueryAction.java:116) >>>>>>>>>> at org.apache.cayenne.access.DataDomain.onQuery >>>>>>>>>> (DataDomain.java:730) >>>>>>>>>> at >>>>>>>>>> org.apache.cayenne.util.ObjectContextQueryAction.runQuery >>>>>>>>>> (ObjectContextQueryAction.java:217) >>>>>>>>>> at >>>>>>>>>> org.apache.cayenne.access.DataContextQueryAction.execute >>>>>>>>>> (DataContextQueryAction.java:54) >>>>>>>>>> at org.apache.cayenne.access.DataContext.onQuery >>>>>>>>>> (DataContext.java: >>>>>>>>>> 1387) >>>>>>>>>> at org.apache.cayenne.access.DataContext.performQuery >>>>>>>>>> (DataContext.java:1376) >>>>>>>>>> ... >>>>>>>>>> >>>>>>>>>> on Cayenne 2.0.2. >>>>>>>>>> >>>>>>>>>> This seems to happen always for the same Local EJB, while >>>>>>>>>> other >>>>>>>>>> Local >>>>>>>>>> EJBs that use Cayenne in the same way seem to work. From a >>>>>>>>>> previous >>>>>>>>>> email, it seems this has something to do with the >>>>>>>>>> serialization of >>>>>>>>>> the >>>>>>>>>> objectStore. >>>>>>>>>> >>>>>>>>>> What can I do to get rid of this ? >>>>>>>>>> >>>>>>>>>> Thanks, >>>>>>>>>> Emilian Bold >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> -- >>>>>>>>>> Emilian Bold >>>>>>>>>> +40 740235562 >>>>>>>>>> http://www.emilianbold.ro >>>>>>>>>> >>>>>>>>>> Java and NetBeans Platform-loving consulting services from >>>>>>>>>> Timisoara, Romania. >>>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>> >>>>>>>> >>>>>>> >>>>>>> >>>>>>> -- >>>>>>> Emilian Bold >>>>>>> +40 740235562 >>>>>>> http://www.emilianbold.ro >>>>>>> >>>>>>> Java and NetBeans Platform-loving consulting services from >>>>>>> Timisoara, Romania. >>>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> Emilian Bold >>>>>> +40 740235562 >>>>>> http://www.emilianbold.ro >>>>>> >>>>>> Java and NetBeans Platform-loving consulting services from >>>>>> Timisoara, Romania. >>>>>> >>>>> >>>>> >>>> >>>> >>>> -- >>>> Emilian Bold >>>> +40 740235562 >>>> http://www.emilianbold.ro >>>> >>>> Java and NetBeans Platform-loving consulting services from >>>> Timisoara, Romania. >>>> >>> >>> >> >> > > > -- > Emilian Bold > +40 740235562 > http://www.emilianbold.ro > > Java and NetBeans Platform-loving consulting services from > Timisoara, Romania. >