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(CDOTransactionImpl.java:1606)
	at org.eclipse.emf.internal.cdo.transaction.CDOTransactionImpl.registerDirty(CDOTransactionImpl.java:1594)
	at org.eclipse.emf.internal.cdo.transaction.CDOTransactionImpl.importChanges(CDOTransactionImpl.java:1885)
	at org.eclipse.emf.cdo.transaction.CDOPushTransaction.<init>(CDOPushTransaction.java:139)


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(CDOTransactionImpl.java:1049)
	at org.eclipse.emf.internal.cdo.transaction.CDOTransactionImpl.commit(CDOTransactionImpl.java:1078)


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 https://bugs.eclipse.org/bugs/show_bug.cgi?id=297967).

Does this ring a bell to anyone ?

Thanks !
Alex

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: Wed Sep 18 17:32:20 GMT 2019

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

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

Back to the top