Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [CDO] Push transactions : Duplicate ID error when loading several changes made on the same element
[CDO] Push transactions : Duplicate ID error when loading several changes made on the same element [message #676753] Mon, 06 June 2011 12:33
Alex Lagarde is currently offline Alex LagardeFriend
Messages: 193
Registered: May 2010
Senior Member

Hy everyone !

I'm currently using CDOPushTransactions, which are great !

My use case seems to be the typical use case for Push Transactions :
I open a CDOPushTransaction, and commit changes in an hidden file. When the user decides to, I push the changes on the repository.

It works like a charm, but I encountered a really annoying issue :
1. make several modifications (let us say modification of several attributes) on a same CDOObject
2. commit the changes using my Push Transaction without pushing them
3. close the push transaction
4. open a new Push transaction so that changes made in 1 are loaded

I get the following error (MyElement being the EClass of my modified element) :

java.lang.IllegalStateException: Duplicate ID: MyElement@OID14
	at org.eclipse.emf.internal.cdo.transaction.CDOTransactionImpl.registerNew(
	at org.eclipse.emf.internal.cdo.transaction.CDOTransactionImpl.registerDirty(
	at org.eclipse.emf.internal.cdo.transaction.CDOTransactionImpl.importChanges(
	at org.eclipse.emf.cdo.transaction.CDOPushTransaction.<init>(

When trying to commit anyway, I get the following error (which seems logical):
org.eclipse.emf.cdo.util.CommitException: This transaction has conflicts
	at org.eclipse.emf.internal.cdo.transaction.CDOTransactionImpl.commit(
	at org.eclipse.emf.internal.cdo.transaction.CDOTransactionImpl.commit(

Considering the fact that any other modifications (element creation and deletion, references or attributes changes...) are correctly persisted and loaded, I'm thinking that it may be related to the CDO core and not my code (which looks like the example given in this bugzilla record

Does this ring a bell to anyone ?

Thanks !

BTW : is there a clean way to avoid getting a warning ("Using [FILEPATH] for push transaction ...") in the Error log each time a Push transaction is created ?
Previous Topic:(no subject)
Next Topic:(no subject)
Goto Forum:

Current Time: Tue Feb 18 06:03:38 GMT 2020

Powered by FUDForum. Page generated in 0.02784 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top