Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Blocker
-
Resolution: Fixed
-
Affects Version/s: 0.9.7
-
Fix Version/s: 1.3 rc1
-
Component/s: JDO
-
Labels:None
-
Environment:HideJ2SDK1.4.2_08 running on Fedora Core 4. the database is SAPDB.
I'm using a compiled version of CVS updated in Aug 10, 2005 with patch ofCASTOR-1179,ShowJ2SDK1.4.2_08 running on Fedora Core 4. the database is SAPDB. I'm using a compiled version of CVS updated in Aug 10, 2005 with patch ofCASTOR-1179,
-
Testcase included:yes
-
Number of attachments :
Description
Hi,
I'm getting trouble with objects loaded in diferent long transactions, in short:
//1st transaction
db.begin();
StateCountry state = db.load(StateCountry.class, "AASTCTPR");
db.commit();
..
//2nd transaction
db.begin();
Country country = db.load(Country.class, "AAAACTBR");
db.commit();
...
//3rd transaction
state.setMyCountry(state);
..
db.begin();
db.update(state);
db.commit();
..
this trouble are same as reported in email:
http://www.mail-archive.com/castor-user@exolab.org/msg00953.html
I attached a test case, that output:
[ClientAPP] populateData executed!
[ClientAPP] 1st operation executed!
[ClientAPP] StateCountry retrieved: ctf.jdo.tc0cw.StateCountry@19ce060 { oid: 'AASTBRPR', name: 'PARANA', myCountry: 'AAAACTBR', timestamp: 1123762499887 }
[ClientAPP] Country retrieved: ctf.jdo.tc0cw.Country@1359c1b { oid: 'AAAACTTS', name: 'COUNTRY FOR TEST', timestamp: 1123762499912 }
[ClientAPP] 2nd operation executed!
[ServerApp] fails with message: Nested error: org.exolab.castor.jdo.PersistenceException: Object, ctf.jdo.tc0cw.StateCountry@19ce060 { oid: 'AASTBRPR', name: 'PARANA', myCountry: 'AAAACTTS', timestamp: 1123762499887 }, links to another object, ctf.jdo.tc0cw.Country@1359c1b { oid: 'AAAACTTS', name: 'COUNTRY FOR TEST', timestamp: 1123762499912 } that is not loaded/updated/created in this transaction: Object, ctf.jdo.tc0cw.StateCountry@19ce060 { oid: 'AASTBRPR', name: 'PARANA', myCountry: 'AAAACTTS', timestamp: 1123762499887 }, links to another object, ctf.jdo.tc0cw.Country@1359c1b { oid: 'AAAACTTS', name: 'COUNTRY FOR TEST', timestamp: 1123762499912 } that is not loaded/updated/created in this transaction
[ClientAPP] testRetrieveMany 3rd operation failed on server with message: Nested error: org.exolab.castor.jdo.PersistenceException: Object, ctf.jdo.tc0cw.StateCountry@19ce060 { oid: 'AASTBRPR', name: 'PARANA', myCountry: 'AAAACTTS', timestamp: 1123762499887 }, links to another object, ctf.jdo.tc0cw.Country@1359c1b { oid: 'AAAACTTS', name: 'COUNTRY FOR TEST', timestamp: 1123762499912 } that is not loaded/updated/created in this transaction: Object, ctf.jdo.tc0cw.StateCountry@19ce060 { oid: 'AASTBRPR', name: 'PARANA', myCountry: 'AAAACTTS', timestamp: 1123762499887 }, links to another object, ctf.jdo.tc0cw.Country@1359c1b { oid: 'AAAACTTS', name: 'COUNTRY FOR TEST', timestamp: 1123762499912 } that is not loaded/updated/created in this transaction
[ClientAPP] Objects retrieved for delete: [ctf.jdo.tc0cw.StateCountry@164dbd5 { oid: 'AASTBRPR', name: 'PARANA', myCountry: 'AAAACTBR', timestamp: 1123762499887 }, ctf.jdo.tc0cw.StateCountry@125844f { oid: 'AASTBRSP', name: 'SAO PAULO', myCountry: 'AAAACTBR', timestamp: 1123762499897 }, ctf.jdo.tc0cw.Country@9cb0f4 { oid: 'AAAACTBR', name: 'BRAZIL', timestamp: 1123762499879 }, ctf.jdo.tc0cw.StateCountry@11978b { oid: 'AASTUSTX', name: 'TEXAS', myCountry: 'AAAACTUS', timestamp: 1123762499904 }, ctf.jdo.tc0cw.StateCountry@26dbec { oid: 'AASTUSCL', name: 'COLORADO', myCountry: 'AAAACTUS', timestamp: 1123762499909 }, ctf.jdo.tc0cw.Country@f42ad0 { oid: 'AAAACTUS', name: 'UNITED STATES', timestamp: 1123762499900 }, ctf.jdo.tc0cw.Country@1309e87 { oid: 'AAAACTTS', name: 'COUNTRY FOR TEST', timestamp: 1123762499912 }]
[ServerApp] fails with message: The object of type ctf.jdo.tc0cw.StateCountry is not persistent – it was not queried or created within this transaction
[ClientAPP] removeData delete operation failed on server with message: The object of type ctf.jdo.tc0cw.StateCountry is not persistent – it was not queried or created within this transaction
//end of output
Note that this trouble occurs for update and delete.
Attachments
Issue Links
| This issue depends upon: | ||||
| CASTOR-1203 | Calculation of priority to execute create and delete statements at commit returns wrong results. |
|
|
|
I wonder if this ends up being the same fundamental problem as
CASTOR-1195has...CASTOR-1195has...