Mike,

I suspect the unpredictable nature of the error is due to incorrect dependency sorting during key generation (this is just a guess, but it seems likely). If possible, could you open a Jira issue with a DataMap file attached.

Also do you know if this happened with 1.1 or early 1.2 milestones (< M10), i.e. before we've changed the commit code?

Andrus


On Apr 11, 2006, at 6:02 AM, Mike Kienenberger wrote:

Here's a simpler example (from after changing the to-many value).
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: {<ObjectId:WomsWork, TEMP:000005AB83030161>; new;
[isUrd=>null; statusableWork=>{<ObjectId:StatusableWork,
TEMP:000006AB83030161>}; isPoles=>null; feeList=>(..); parcel=>?;
doesBuildingExist=>null; isYardPole=>null; bidPrice=>0;
cityPermitReceivedDate=>null; isCityInspectionRequired=>null;
laborEstimate=>0; numberOfMeters=>null; materialsEstimate=>0]}
Leftover new object: {<ObjectId:Fee, TEMP:000008AB891D0161>; new;
[feePaymentReceiptList=>(..); womsWorkList=>(..);
requiredDepositAmountDue=>null; amountDue=>null]}
Leftover new object: {<ObjectId:FeePaymentReceipt,
TEMP:000009AB891D0161>; new; [amountPaid=>0; fee=>{<ObjectId:Fee,
TEMP:000008AB891D0161>}; receiptNumber=>null; datePaid=>null]}
Leftover new object: {<ObjectId:Work, TEMP:000007AB83030161>; new;
[workType=>{<ObjectId:WorkType, ID=1042>};
statusableWorkList=>{<ObjectId:StatusableWork,
TEMP:000006AB83030161>}; workOptionList=>?; objType=>ENG;
userHoursList=>?]}
Leftover new object: {<ObjectId:Fee, TEMP:00000AAB891D0161>; new;
[feePaymentReceiptList=>?; womsWorkList=>(..);
requiredDepositAmountDue=>0; amountDue=>null]}
Leftover new object: {<ObjectId:StatusableWork,
TEMP:000006AB83030161>; new; [expectedCompletionDate=>null;
work=>{<ObjectId:Work, TEMP:000007AB83030161>};
requestedCompDate=>null; workAssigneeList=>?;
problemDescription=>null; rankList=>?; attachmentList=>?;
solutionDescription=>null; externalSystemKey=>0;
statusHistoryList=>?]}
Leftover modified object: {<ObjectId:WorkType, ID=1042>; modified;
[isAssignable=>Y; parentWorkType=>{<ObjectId:WorkType, ID=1000>};
workOptionTypeList=>?; childrenWorkTypeList=>?; description=>null;
isActive=>Y; statusList=>?; objType=>null; workList=>(..); name=>T&D
Work Order]}
--- will run 2 queries.
--- transaction started.
SELECT NEXT_ID FROM AUTO_PK_SUPPORT WHERE TABLE_NAME = 'FEE_PAYMENT_RECEIPT'
=== returned 1 row. - took 0 ms.
UPDATE AUTO_PK_SUPPORT SET NEXT_ID = NEXT_ID + 20 WHERE TABLE_NAME =
'FEE_PAYMENT_RECEIPT'
=== updated 1 row.
org.objectstyle.cayenne.CayenneRuntimeException: [v.1.2-dev April 10
2006] Some parts of FK are missing in snapshot, join:
[EMAIL PROTECTED] [source=WOMS_WORK_ID,target=ID] at org.objectstyle.cayenne.access.DataNodePKGenerationAction.appendPkFrom MasterRelationships(DataNodePKGenerationAction.java:250) at org.objectstyle.cayenne.access.DataNodePKGenerationAction.createPermId sForObjEntity(DataNodePKGenerationAction.java:143) at org.objectstyle.cayenne.access.DataNodeInsertBucket.createPrimaryKey (DataNodeInsertBucket.java:97) at org.objectstyle.cayenne.access.DataNodeFlushAction.createPK (DataNodeFlushAction.java:106) at org.objectstyle.cayenne.access.DataDomainFlushAction.preprocess (DataDomainFlushAction.java:217) at org.objectstyle.cayenne.access.DataDomainFlushAction.flush (DataDomainFlushAction.java:148) at org.objectstyle.cayenne.access.DataDomain.onSyncFlush (DataDomain.java:778) at org.objectstyle.cayenne.access.DataDomain$2.transform (DataDomain.java:749) at org.objectstyle.cayenne.access.DataDomain.runInTransaction (DataDomain.java:804) at org.objectstyle.cayenne.access.DataDomain.onSync (DataDomain.java:746) at org.objectstyle.cayenne.access.DataContext.flushToParent (DataContext.java:1217) at org.objectstyle.cayenne.access.DataContext.commitChanges (DataContext.java:1121)



On 4/10/06, Mike Kienenberger <[EMAIL PROTECTED]> 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 <ObjectId:WomsWork, TEMP:00004C96C5030161> to
<ObjectId:StatusableWork, TEMP:00004D96C5030161>, both of which exist
and are in state new.

This relationship is in my DataMap as

        <db-relationship name="statusableWork" source="WOMS_WORK"
target="STATUSABLE_WORK" toMany="false">
<db-attribute-pair source="WOMS_WORK_ID" target="ID"/>
        </db-relationship>

The reverse relationship is in another DataMap as

        <db-relationship name="womsWork" source="STATUSABLE_WORK"
target="WOMS_WORK" toDependentPK="true" toMany="true">
<db-attribute-pair source="ID" target="WOMS_WORK_ID"/>
        </db-relationship>

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: {<ObjectId:Contact, TEMP:00005496CDEC0161>; new;
Leftover new object: {<ObjectId:StatusableWork,
TEMP:00005D96CEF60161>; new; [parentWork=>{<ObjectId:Work,
TEMP:00004E96C5030161>}; work=>{<ObjectId:Work,
TEMP:00005E96CEF60161>}; ]}
Leftover new object: {<ObjectId:Work, TEMP:00004E96C5030161>; new;
[workType=>{<ObjectId:WorkType, ID=1042>};
statusableWorkList=>{<ObjectId:StatusableWork,
TEMP:00004D96C5030161>}; ]}
Leftover new object: {<ObjectId:StatusableWork,
TEMP:00004D96C5030161>; new; [work=>{<ObjectId:Work,
TEMP:00004E96C5030161>}; ]}
Leftover new object: {<ObjectId:Fee, TEMP:00005296CAEF0161>; new;
Leftover new object: {<ObjectId:ContactName, TEMP: 00005396CDEC0161>; new;
Leftover new object: {<ObjectId:Work, TEMP:00005B96CEF60161>; new;
[workType=>{<ObjectId:WorkType, ID=1056>};
statusableWorkList=>{<ObjectId:StatusableWork,
TEMP:00005A96CEF60161>}; ]}
Leftover new object: {<ObjectId:StatusableWork,
TEMP:00005A96CEF60161>; new; [parentWork=>{<ObjectId:Work,
TEMP:00004E96C5030161>}; work=>{<ObjectId:Work,
TEMP:00005B96CEF60161>}; ]}
Leftover new object: {<ObjectId:FeePaymentReceipt, TEMP: 00005196CAEF0161>; new;
Leftover new object: {<ObjectId:Address, TEMP:00005596CE0C0161>; new;
Leftover new object: {<ObjectId:Work, TEMP:00005E96CEF60161>; new;
[statusableWorkList=>{<ObjectId:StatusableWork,
TEMP:00005D96CEF60161>}; ]}
Leftover new object: {<ObjectId:WomsWork, TEMP:00004C96C5030161>; new;
[statusableWork=>{<ObjectId:StatusableWork, TEMP:00004D96C5030161>};
]}
Leftover new object: {<ObjectId:StatusHistory, TEMP: 00004F96C5030161>; new;
Leftover new object: {<ObjectId:StatusableWork,
TEMP:00005896CE1B0161>; new; [parentWork=>{<ObjectId:Work,
TEMP:00004E96C5030161>}; work=>{<ObjectId:Work,
TEMP:00005996CE1B0161>}; ]}
Leftover new object: {<ObjectId:Phone, TEMP:00005796CE1B0161>; new;
Leftover new object: {<ObjectId:WorkAssignee, TEMP:00005C96CEF60161>;
new; [statusableWork=>{<ObjectId:StatusableWork,
TEMP:00005A96CEF60161>}; seq=>1; role=>{<ObjectId:SecRole,
ID=20527>}]}
Leftover new object: {<ObjectId:Fee, TEMP:00005096CAEF0161>; new;
Leftover new object: {<ObjectId:WorkAssignee, TEMP:00005F96CEF60161>;
new; [statusableWork=>{<ObjectId:StatusableWork,
TEMP:00005D96CEF60161>}; seq=>1; role=>{<ObjectId:SecRole,
ID=21466>}]}
Leftover new object: {<ObjectId:Work, TEMP:00005996CE1B0161>; new;
[statusableWorkList=>{<ObjectId:StatusableWork,
TEMP:00005896CE1B0161>}; ]}
Leftover new object: {<ObjectId:Address, TEMP:00005696CE1B0161>; new;
Leftover modified object: {<ObjectId:WorkType, ID=1042>; modified;
Leftover modified object: {<ObjectId:StateProvince,
STATE_PROVINCE_ID=1>; modified;
Leftover modified object: {<ObjectId:WorkType, ID=1053>; modified;
Leftover modified object: {<ObjectId:WorkType, ID=1057>; modified;
Leftover modified object: {<ObjectId:Status, ID=112>; modified;
Leftover modified object: {<ObjectId:WorkType, ID=1056>; modified;

org.objectstyle.cayenne.CayenneRuntimeException: [v.1.2-dev April 10
2006] Some parts of FK are missing in snapshot, join:
[EMAIL PROTECTED] [source=WOMS_WORK_ID,target=ID] at org.objectstyle.cayenne.access.DataNodePKGenerationAction.appendPkFro mMasterRelationships(DataNodePKGenerationAction.java:250) at org.objectstyle.cayenne.access.DataNodePKGenerationAction.createPermI dsForObjEntity(DataNodePKGenerationAction.java:143) at org.objectstyle.cayenne.access.DataNodeInsertBucket.createPrimaryKey( DataNodeInsertBucket.java:97) at org.objectstyle.cayenne.access.DataNodeFlushAction.createPK (DataNodeFlushAction.java:106) at org.objectstyle.cayenne.access.DataDomainFlushAction.preprocess (DataDomainFlushAction.java:217) at org.objectstyle.cayenne.access.DataDomainFlushAction.flush (DataDomainFlushAction.java:148) at org.objectstyle.cayenne.access.DataDomain.onSyncFlush (DataDomain.java:778) at org.objectstyle.cayenne.access.DataDomain$2.transform (DataDomain.java:749) at org.objectstyle.cayenne.access.DataDomain.runInTransaction (DataDomain.java:804) at org.objectstyle.cayenne.access.DataDomain.onSync (DataDomain.java:746) at org.objectstyle.cayenne.access.DataContext.flushToParent (DataContext.java:1217) at org.objectstyle.cayenne.access.DataContext.commitChanges (DataContext.java:1121)



Reply via email to