Return-Path: Delivered-To: apmail-incubator-cayenne-user-archive@locus.apache.org Received: (qmail 72798 invoked from network); 11 Apr 2006 02:03:09 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 11 Apr 2006 02:03:09 -0000 Received: (qmail 3353 invoked by uid 500); 11 Apr 2006 02:03:08 -0000 Delivered-To: apmail-incubator-cayenne-user-archive@incubator.apache.org Received: (qmail 3334 invoked by uid 500); 11 Apr 2006 02:03:08 -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 3320 invoked by uid 99); 11 Apr 2006 02:03:08 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 10 Apr 2006 19:03:08 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of mkienenb@gmail.com designates 64.233.182.187 as permitted sender) Received: from [64.233.182.187] (HELO nproxy.gmail.com) (64.233.182.187) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 10 Apr 2006 19:03:07 -0700 Received: by nproxy.gmail.com with SMTP id d4so833899nfe for ; Mon, 10 Apr 2006 19:02:45 -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=A9BPMg1AHhv1TMZd+pNhidzKwoFLm1kGPOSwptoDNbdBDhC5uHy1uWFP1xILz4K2sGt7M+saCEOTYwRNGagoZVZyFV1892cbw96tElea1Qbb5tmXSLKqzdlUk1S7RnAS1IqNfb/GqO8UMi1eGzwd2zMSUCNHhkb1IPox87c50vM= Received: by 10.49.10.15 with SMTP id n15mr595025nfi; Mon, 10 Apr 2006 19:02:45 -0700 (PDT) Received: by 10.48.216.7 with HTTP; Mon, 10 Apr 2006 19:02:45 -0700 (PDT) Message-ID: <8f985b960604101902l7527ff7br1c6db354a57656bb@mail.gmail.com> Date: Mon, 10 Apr 2006 22:02:45 -0400 From: "Mike Kienenberger" To: cayenne-user@incubator.apache.org Subject: Re: Some parts of FK are missing in snapshot, join: In-Reply-To: <8f985b960604101856y4a71a4fel2d1f2239511f12e4@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <8f985b960604101856y4a71a4fel2d1f2239511f12e4@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Here's a simpler example (from after changing the to-many value).=20 This was the second set of objects converted -- the first set converted fine. This data set also converted fine in the previous run. This example was simple enough that I didn't edit any of the output below. There is only WOMS_WORK which inherits from STATUSABLE_WORK which inherits from WORK, each of which exist only once. It's the relationship between WOMS_WORK and STATUSABLE_WORK which is involved in the error. Leftover new object: {; new; [isUrd=3D>null; statusableWork=3D>{}; isPoles=3D>null; feeList=3D>(..); parcel=3D>?; doesBuildingExist=3D>null; isYardPole=3D>null; bidPrice=3D>0; cityPermitReceivedDate=3D>null; isCityInspectionRequired=3D>null; laborEstimate=3D>0; numberOfMeters=3D>null; materialsEstimate=3D>0]} Leftover new object: {; new; [feePaymentReceiptList=3D>(..); womsWorkList=3D>(..); requiredDepositAmountDue=3D>null; amountDue=3D>null]} Leftover new object: {; new; [amountPaid=3D>0; fee=3D>{}; receiptNumber=3D>null; datePaid=3D>null]} Leftover new object: {; new; [workType=3D>{}; statusableWorkList=3D>{}; workOptionList=3D>?; objType=3D>ENG; userHoursList=3D>?]} Leftover new object: {; new; [feePaymentReceiptList=3D>?; womsWorkList=3D>(..); requiredDepositAmountDue=3D>0; amountDue=3D>null]} Leftover new object: {; new; [expectedCompletionDate=3D>null; work=3D>{}; requestedCompDate=3D>null; workAssigneeList=3D>?; problemDescription=3D>null; rankList=3D>?; attachmentList=3D>?; solutionDescription=3D>null; externalSystemKey=3D>0; statusHistoryList=3D>?]} Leftover modified object: {; modified; [isAssignable=3D>Y; parentWorkType=3D>{}; workOptionTypeList=3D>?; childrenWorkTypeList=3D>?; description=3D>null; isActive=3D>Y; statusList=3D>?; objType=3D>null; workList=3D>(..); name=3D>= T&D Work Order]} --- will run 2 queries. --- transaction started. SELECT NEXT_ID FROM AUTO_PK_SUPPORT WHERE TABLE_NAME =3D 'FEE_PAYMENT_RECEI= PT' =3D=3D=3D returned 1 row. - took 0 ms. UPDATE AUTO_PK_SUPPORT SET NEXT_ID =3D NEXT_ID + 20 WHERE TABLE_NAME =3D 'FEE_PAYMENT_RECEIPT' =3D=3D=3D updated 1 row. org.objectstyle.cayenne.CayenneRuntimeException: [v.1.2-dev April 10 2006] Some parts of FK are missing in snapshot, join: org.objectstyle.cayenne.map.DbJoin@1786a3c[source=3DWOMS_WORK_ID,target=3DI= D] =09at org.objectstyle.cayenne.access.DataNodePKGenerationAction.appendPkFro= mMasterRelationships(DataNodePKGenerationAction.java:250) =09at org.objectstyle.cayenne.access.DataNodePKGenerationAction.createPermI= dsForObjEntity(DataNodePKGenerationAction.java:143) =09at org.objectstyle.cayenne.access.DataNodeInsertBucket.createPrimaryKey(= DataNodeInsertBucket.java:97) =09at org.objectstyle.cayenne.access.DataNodeFlushAction.createPK(DataNodeF= lushAction.java:106) =09at org.objectstyle.cayenne.access.DataDomainFlushAction.preprocess(DataD= omainFlushAction.java:217) =09at org.objectstyle.cayenne.access.DataDomainFlushAction.flush(DataDomain= FlushAction.java:148) =09at org.objectstyle.cayenne.access.DataDomain.onSyncFlush(DataDomain.java= :778) =09at org.objectstyle.cayenne.access.DataDomain$2.transform(DataDomain.java= :749) =09at org.objectstyle.cayenne.access.DataDomain.runInTransaction(DataDomain= .java:804) =09at org.objectstyle.cayenne.access.DataDomain.onSync(DataDomain.java:746) =09at org.objectstyle.cayenne.access.DataContext.flushToParent(DataContext.= java:1217) =09at org.objectstyle.cayenne.access.DataContext.commitChanges(DataContext.= java:1121) On 4/10/06, Mike Kienenberger wrote: > What would cause the following exception (latest cvs checkout)? > > It doesn't seem to happen deterministically. I'm converting data > records from one format to another, reading a set of records in, and > then creating new set of records to write out. > > The first record always seems to work. Then I always get this error > soon afterward. Sometimes on the second set of records, sometimes a > few later. On this particular run, I got it 5 record sets into the > conversion. > > I dumped all of the uncommitted objects in the datacontext before > doing the saveChanges, and that's what the "Leftover object" messages > are showing. > > I've edited the attributes, hopefully leaving only the relevent ones. > > To the best of my knowledge, the Join in question is the relationship > from to > , both of which exist > and are in state new. > > This relationship is in my DataMap as > > target=3D"STATUSABLE_WORK" toMany=3D"false"> > > > > The reverse relationship is in another DataMap as > > target=3D"WOMS_WORK" toDependentPK=3D"true" toMany=3D"true"> > > > > And the id for WOMS_WORK is dependent on the ID for STATUSABLE work > (which is in turn dependent upon the ID for WORK -- vertical > inheritance) > > [I changed toMany from true to false in the second db-relationship as > that was an error I just noticed, but it hasn't made any difference]. > > Leftover new object: {; new; > Leftover new object: { TEMP:00005D96CEF60161>; new; [parentWork=3D>{ TEMP:00004E96C5030161>}; work=3D>{ TEMP:00005E96CEF60161>}; ]} > Leftover new object: {; new; > [workType=3D>{}; > statusableWorkList=3D>{ TEMP:00004D96C5030161>}; ]} > Leftover new object: { TEMP:00004D96C5030161>; new; [work=3D>{ TEMP:00004E96C5030161>}; ]} > Leftover new object: {; new; > Leftover new object: {; new; > Leftover new object: {; new; > [workType=3D>{}; > statusableWorkList=3D>{ TEMP:00005A96CEF60161>}; ]} > Leftover new object: { TEMP:00005A96CEF60161>; new; [parentWork=3D>{ TEMP:00004E96C5030161>}; work=3D>{ TEMP:00005B96CEF60161>}; ]} > Leftover new object: {= ; new; > Leftover new object: {; new; > Leftover new object: {; new; > [statusableWorkList=3D>{ TEMP:00005D96CEF60161>}; ]} > Leftover new object: {; new; > [statusableWork=3D>{}; > ]} > Leftover new object: {; ne= w; > Leftover new object: { TEMP:00005896CE1B0161>; new; [parentWork=3D>{ TEMP:00004E96C5030161>}; work=3D>{ TEMP:00005996CE1B0161>}; ]} > Leftover new object: {; new; > Leftover new object: {; > new; [statusableWork=3D>{ TEMP:00005A96CEF60161>}; seq=3D>1; role=3D>{ ID=3D20527>}]} > Leftover new object: {; new; > Leftover new object: {; > new; [statusableWork=3D>{ TEMP:00005D96CEF60161>}; seq=3D>1; role=3D>{ ID=3D21466>}]} > Leftover new object: {; new; > [statusableWorkList=3D>{ TEMP:00005896CE1B0161>}; ]} > Leftover new object: {; new; > Leftover modified object: {; modified; > Leftover modified object: { STATE_PROVINCE_ID=3D1>; modified; > Leftover modified object: {; modified; > Leftover modified object: {; modified; > Leftover modified object: {; modified; > Leftover modified object: {; modified; > > org.objectstyle.cayenne.CayenneRuntimeException: [v.1.2-dev April 10 > 2006] Some parts of FK are missing in snapshot, join: > org.objectstyle.cayenne.map.DbJoin@ec898a[source=3DWOMS_WORK_ID,target=3D= ID] > at org.objectstyle.cayenne.access.DataNodePKGenerationAction.appe= ndPkFromMasterRelationships(DataNodePKGenerationAction.java:250) > at org.objectstyle.cayenne.access.DataNodePKGenerationAction.crea= tePermIdsForObjEntity(DataNodePKGenerationAction.java:143) > at org.objectstyle.cayenne.access.DataNodeInsertBucket.createPrim= aryKey(DataNodeInsertBucket.java:97) > at org.objectstyle.cayenne.access.DataNodeFlushAction.createPK(Da= taNodeFlushAction.java:106) > at org.objectstyle.cayenne.access.DataDomainFlushAction.preproces= s(DataDomainFlushAction.java:217) > at org.objectstyle.cayenne.access.DataDomainFlushAction.flush(Dat= aDomainFlushAction.java:148) > at org.objectstyle.cayenne.access.DataDomain.onSyncFlush(DataDoma= in.java:778) > at org.objectstyle.cayenne.access.DataDomain$2.transform(DataDoma= in.java:749) > at org.objectstyle.cayenne.access.DataDomain.runInTransaction(Dat= aDomain.java:804) > at org.objectstyle.cayenne.access.DataDomain.onSync(DataDomain.ja= va:746) > at org.objectstyle.cayenne.access.DataContext.flushToParent(DataC= ontext.java:1217) > at org.objectstyle.cayenne.access.DataContext.commitChanges(DataC= ontext.java:1121) >