Community
Participate
Working Groups
Build Identifier: 4.0 M6 Hi, I'm trying to enhance the import operation to work with fragmented models (i.e models based on controlled resources) without loosing the initial resources structure. First let's have a look at the initial XMI model (a dummy one). -Garage Root (stored in garageRoot.xmi) - car 1 - car 2 - car 3 - partners Garage 2 (controlled and stored in garage2.xmi) - car 4 - car 5 One important thing to have in mind : I'm using legacy mode with Eclipse 3.6.2 and CDO 4.0 M6. To implement the import operation : 1) I open a CDO transaction working with its own ResourceSet. 2) I use another ResourceSet to load the XMI resources. 3) I create empty CDO resources equivalent to XMI ones. 4) I use the EMF Copier mechanism (with copyReferences). 5) I try to reattach copied objects to their CDOResource. When I try to attach copied objects to their respective CDO resources, I got exceptions (see stack below), when attaching the CDO object Garage 2 to its child CDO resource. Please note, it worked perfectly to attach Garage Root to its CDOResource. With a native CDO model, it works perfectly. Stephane. Stack trace : java.lang.IllegalStateException: Failing event PREPARE in state PREPARED for CDOLegacyWrapper[CarImpl@oid12] (data=Pair[CDOTransaction[2:2], [CDOLegacyWrapper[CarImpl@oid12], CDOLegacyWrapper[CarImpl@oid13], CDOLegacyWrapper[CarImpl@oid12]]]) at org.eclipse.net4j.util.fsm.FiniteStateMachine.process(FiniteStateMachine.java:153) at org.eclipse.emf.internal.cdo.view.CDOStateMachine$PrepareTransition.execute(CDOStateMachine.java:546) at org.eclipse.emf.internal.cdo.view.CDOStateMachine$PrepareTransition.execute(CDOStateMachine.java:1) at org.eclipse.net4j.util.fsm.FiniteStateMachine.process(FiniteStateMachine.java:162) at org.eclipse.emf.internal.cdo.view.CDOStateMachine.prepare(CDOStateMachine.java:222) at org.eclipse.emf.internal.cdo.view.CDOStateMachine.attach(CDOStateMachine.java:188) at org.eclipse.emf.cdo.eresource.impl.CDOResourceImpl.attached(CDOResourceImpl.java:1176) at org.eclipse.emf.cdo.eresource.impl.CDOResourceImpl.access$0(CDOResourceImpl.java:1174) at org.eclipse.emf.cdo.eresource.impl.CDOResourceImpl$ContentsCDOList.inverseAdd(CDOResourceImpl.java:1410) at org.eclipse.emf.common.notify.impl.DelegatingNotifyingListImpl.addUnique(DelegatingNotifyingListImpl.java:310) at org.eclipse.emf.common.util.AbstractEList.add(AbstractEList.java:307) at CDOImportExportManager.fillRemoteResources(CDOImportExportManager.java:235) Reproducible: Always
Is this ticket planned for RC2 build (as I know RC1 is over) ?
Hi Stephane, I cannot guarantee that this fix will be in RC2. There are 1-2 more serious bugs to fix. But then this one is of the next I will care for.
Created attachment 196230 [details] Test v1 Stephane, I attached a test, but was not yet able to reproduce the problem. Could you have a look at it and change it so that it reproduces the error, or give me a hint what is missing? How are your casr storred in the Garage (containment, yes/no)? Is "partners" a list that holds inter-resource cross references to garage2? If so, are these "Garage" or "Car" references?
I've updated my TP to CDO 4.0 RC2a and I don't reproduce the bug. That seems fixed, I suggest to close this ticket. (In reply to comment #3) > Created attachment 196230 [details] > Test v1 > > Stephane, > > I attached a test, but was not yet able to reproduce the problem. Could you > have a look at it and change it so that it reproduces the error, or give me a > hint what is missing? > How are your casr storred in the Garage (containment, yes/no)? > Is "partners" a list that holds inter-resource cross references to garage2? If > so, are these "Garage" or "Car" references?
(In reply to comment #4) > I've updated my TP to CDO 4.0 RC2a and I don't reproduce the bug. Great. I am closing this one. Please reopen if the error occurs again.
Closing.