|
|
|
Re: NoSuchElementException while traversing CDOResource.getAllContents() [message #1741671 is a reply to message #1741606] |
Fri, 26 August 2016 22:19 |
Alexander Nehmer Messages: 19 Registered: January 2016 |
Junior Member |
|
|
Hi Eike,
after upgrading to CDO 4.5 and trying to understand the problem I removed the loading of the resource as I already had the proxied one in hand. But nevertheless the problem persists so here's what I do ( respectively the code of Christophe Bouhier does):
What I try to do is to read the contents of the resource to migrate them without having the generated model files (as they have evolved to a newer version and the CDO repo is still the old one).
First the code to obtain the view/transaction in org.eclipse.emf.edapt.cdo.migration.execution.EdaptCDOViewProvider:
public CDOView getView(URI uri, ResourceSet resourceSet) {
final CDOURIData cdouriData = new CDOURIData(uri);
final String repoName = cdouriData.getRepositoryName();
IManagedContainer container = repoContainers.get(repoName);
if (container == null) {
container = new ManagedContainer();
Net4jUtil.prepareContainer(container);
TCPUtil.prepareContainer(container);
container.activate();
repoContainers.put(repoName, container);
} else {
for (final Object e : container.getElements()) {
System.out.println(e);
}
}
// TODO Base the connector on the schema.
final String uriSchema = cdouriData.getScheme();
System.out.println("EDAPT TODO: Schema requested is " + uriSchema //$NON-NLS-1$
+ " base connector on this requested schema. "); //$NON-NLS-1$
if (uriSchema.equals("cdo.net4j.tcp")) { //$NON-NLS-1$
// Base connector on TCP.
} else if (uriSchema.equals("cdo.net4j.jvm")) { //$NON-NLS-1$
// Base connector on JVM.
// Note, condition is a bundled which is server side.
// consider checks for this.
}
// Produce a TCPConnector which respects all params like UserID, Port,
// and Host.
final IConnector connector = (IConnector) container.getElement("org.eclipse.net4j.connectors", "tcp", //$NON-NLS-1$ //$NON-NLS-2$
cdouriData.getAuthority());
final CDONet4jSessionConfiguration config = CDONet4jUtil
.createNet4jSessionConfiguration();
config.setConnector(connector);
config.setRepositoryName(repoName);
if (cdouriData.getUserName() != null
&& cdouriData.getPassWord() != null) {
final PasswordCredentials passwordCredentials = new PasswordCredentials(
cdouriData.getUserName(), cdouriData.getPassWord()
.toCharArray());
final IPasswordCredentialsProvider credentialsProvider = new PasswordCredentialsProvider(
passwordCredentials);
config.setCredentialsProvider(credentialsProvider);
}
final CDOSession session = config.openNet4jSession();
// Make sure the packages are emulated.
session.options().setGeneratedPackageEmulationEnabled(true);
// Get the package registry for this resource set and make sure
// it is known in the repository. Note:
// CDO will also populate from the global registry when?
//
final Registry packageRegistry = resourceSet.getPackageRegistry();
boolean packagesAdded = false;
if (!packageRegistry.isEmpty()) {
final CDOPackageRegistry cdoPackageRegistry = session
.getPackageRegistry();
for (final String nsURI : packageRegistry.keySet()) {
final EPackage packageToAdd = packageRegistry.getEPackage(nsURI);
if (!cdoPackageRegistry.containsKey(nsURI)) {
cdoPackageRegistry.putEPackage(packageToAdd);
packagesAdded = true;
}
}
}
final CDOTransaction openTransaction = session.openTransaction(resourceSet);
// Commit the added EPackages to the registry.
if (packagesAdded) {
try {
openTransaction.commit();
} catch (final ConcurrentAccessException e) {
e.printStackTrace();
} catch (final CommitException e) {
e.printStackTrace();
}
}
if (rootResourceRegistry.get(repoName) == null) {
final CDOResource rootResource = openTransaction.getRootResource();
@SuppressWarnings("unused")
final URI uri2 = rootResource.getURI();
rootResourceRegistry.put(repoName, rootResource);
}
return openTransaction;
}
What I still had to do to prevent the following NPE was:
for (final EPackage pack : metamodel.getEPackages()) {
EPackage.Registry.INSTANCE.put(pack.getNsURI(), pack);
}
not to get
java.lang.NullPointerException
at org.eclipse.emf.cdo.internal.common.model.CDOPackageRegistryImpl.registerPackageInfo(CDOPackageRegistryImpl.java:287)
at org.eclipse.emf.cdo.internal.common.model.CDOPackageUnitImpl.load(CDOPackageUnitImpl.java:246)
at org.eclipse.emf.cdo.internal.common.model.CDOPackageUnitImpl.load(CDOPackageUnitImpl.java:228)
at org.eclipse.emf.cdo.internal.common.model.CDOPackageInfoImpl.getEPackage(CDOPackageInfoImpl.java:125)
at org.eclipse.emf.cdo.internal.common.model.CDOPackageInfoImpl.getEPackage(CDOPackageInfoImpl.java:118)
at org.eclipse.emf.ecore.impl.EPackageRegistryImpl.getEPackage(EPackageRegistryImpl.java:127)
at org.eclipse.emf.cdo.common.model.CDOClassifierRef.resolve(CDOClassifierRef.java:114)
at org.eclipse.emf.cdo.spi.common.protocol.CDODataInputImpl.readCDOClassifierRefAndResolve(CDODataInputImpl.java:171)
at org.eclipse.emf.cdo.spi.common.revision.BaseCDORevision.readSystemValues(BaseCDORevision.java:210)
at org.eclipse.emf.cdo.spi.common.revision.BaseCDORevision.read(BaseCDORevision.java:163)
at org.eclipse.emf.cdo.spi.common.protocol.CDODataInputImpl.readCDORevision(CDODataInputImpl.java:434)
at org.eclipse.emf.cdo.spi.common.protocol.CDODataInputImpl.readCDORevision(CDODataInputImpl.java:425)
at org.eclipse.emf.cdo.spi.common.revision.RevisionInfo.readRevision(RevisionInfo.java:225)
at org.eclipse.emf.cdo.spi.common.revision.RevisionInfo.readResult(RevisionInfo.java:165)
at org.eclipse.emf.cdo.internal.net4j.protocol.LoadRevisionsRequest.confirming(LoadRevisionsRequest.java:142)
at org.eclipse.emf.cdo.internal.net4j.protocol.LoadRevisionsRequest.confirming(LoadRevisionsRequest.java:1)
at org.eclipse.emf.cdo.internal.net4j.protocol.CDOClientRequest.confirming(CDOClientRequest.java:97)
at org.eclipse.net4j.signal.RequestWithConfirmation.doExtendedInput(RequestWithConfirmation.java:125)
at org.eclipse.net4j.signal.Signal.doInput(Signal.java:377)
at org.eclipse.net4j.signal.RequestWithConfirmation.doExecute(RequestWithConfirmation.java:105)
at org.eclipse.net4j.signal.SignalActor.execute(SignalActor.java:53)
at org.eclipse.net4j.signal.Signal.runSync(Signal.java:283)
at org.eclipse.net4j.signal.SignalProtocol.startSignal(SignalProtocol.java:466)
at org.eclipse.net4j.signal.RequestWithConfirmation.doSend(RequestWithConfirmation.java:89)
at org.eclipse.net4j.signal.RequestWithConfirmation.send(RequestWithConfirmation.java:75)
at org.eclipse.emf.cdo.internal.net4j.protocol.CDOClientProtocol.send(CDOClientProtocol.java:605)
at org.eclipse.emf.cdo.internal.net4j.protocol.CDOClientProtocol.send(CDOClientProtocol.java:638)
at org.eclipse.emf.cdo.internal.net4j.protocol.CDOClientProtocol.loadRevisions(CDOClientProtocol.java:203)
at org.eclipse.emf.cdo.internal.common.revision.CDORevisionManagerImpl.loadRevisions(CDORevisionManagerImpl.java:431)
at org.eclipse.emf.cdo.internal.common.revision.CDORevisionManagerImpl.getRevisions(CDORevisionManagerImpl.java:309)
at org.eclipse.emf.cdo.internal.common.revision.CDORevisionManagerImpl.getRevision(CDORevisionManagerImpl.java:291)
at org.eclipse.emf.cdo.internal.common.revision.CDORevisionManagerImpl.getRevision(CDORevisionManagerImpl.java:284)
at org.eclipse.emf.internal.cdo.view.CDOViewImpl.getRevision(CDOViewImpl.java:907)
at org.eclipse.emf.internal.cdo.view.AbstractCDOView.createObject(AbstractCDOView.java:1833)
at org.eclipse.emf.internal.cdo.view.AbstractCDOView.getObject(AbstractCDOView.java:1661)
at org.eclipse.emf.internal.cdo.transaction.CDOTransactionImpl.getObject(CDOTransactionImpl.java:1498)
at org.eclipse.emf.internal.cdo.view.AbstractCDOView.convertIDToObject(AbstractCDOView.java:2140)
at org.eclipse.emf.internal.cdo.view.CDOStoreImpl.convertIDToObject(CDOStoreImpl.java:897)
at org.eclipse.emf.internal.cdo.view.CDOStoreImpl.convertToEMF(CDOStoreImpl.java:860)
at org.eclipse.emf.internal.cdo.view.CDOStoreImpl.get(CDOStoreImpl.java:201)
at org.eclipse.emf.ecore.impl.EStoreEObjectImpl$BasicEStoreEList.delegateGet(EStoreEObjectImpl.java:241)
at org.eclipse.emf.common.util.DelegatingEList.get(DelegatingEList.java:230)
at org.eclipse.emf.common.util.AbstractEList$EIterator.doNext(AbstractEList.java:705)
at org.eclipse.emf.common.util.AbstractEList$EIterator.next(AbstractEList.java:692)
at org.eclipse.emf.common.util.AbstractTreeIterator.next(AbstractTreeIterator.java:133)
That I don't understand as the session was created using session.options().setGeneratedPackageEmulationEnabled(true). I thought this would reconstruct the package information in the repo from the stored objects.
The metamodel used to get the registered EPackages was constructed using Edapt methods (org.eclipse.emf.edapt.internal.migration.execution.internal.MigrationReconstructor.loadMetamodel())
There is no other client connected to the repo thus there should be (???) no other transaction modifying the resource, right? Or does the proxy resolve mechanism does that? As all the existing code tries to work with a resource and is (relatively) CDO agnostic I would like to keep the synced CDOView out of the code if that's really not the reason for the NoSuchElementException.
Sorry for the confusing code. I try to wrap my head around this non-working Edapt-CDO-migration. I really hope to get this working after all the good experiences with CDO.
Thanks again
Alex
|
|
|
|
|
|
|
Re: NoSuchElementException while traversing CDOResource.getAllContents() [message #1741696 is a reply to message #1741682] |
Sat, 27 August 2016 20:48 |
Alexander Nehmer Messages: 19 Registered: January 2016 |
Junior Member |
|
|
The trace output before the NoSuchElementException is
main [debug.view] Creating object for OID795
main [debug.signal] ================ Requesting: LoadRevisionsRequest(infos=[RevisionInfo.Missing[OID795, Transaction 1]], branchPoint=Transaction 1, referenceChunk=-1, prefetchDepth=0)
main [debug.protocol] Writing branchPoint: Transaction 1
main [debug.buffer] Obtained Buffer@3[INITIAL]
main [debug.buffer.stream] Put signal id 7
main [debug.protocol] Writing referenceChunk: -1
main [debug.protocol] Writing 1 infos
main [debug.protocol] Writing info: RevisionInfo.Missing[OID795, Transaction 1]
main [debug.protocol] Writing CDOIDObject of subtype 0 (LONG)
main [debug.channel] Handling buffer: Buffer@3[PUTTING] --> Channel[1, CLIENT, cdo]
main [debug.signal] ================ Confirming: LoadRevisionsRequest(infos=[RevisionInfo.Missing[OID795, Transaction 1]], branchPoint=Transaction 1, referenceChunk=-1, prefetchDepth=0)
main [debug.protocol] Reading 1 revisions
TCPSelector [debug.buffer] Writing 40 bytes (EOS)
00 00 01 5b 00 07 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 03 00 00 00 00 00 00 00 03 1b 00 00 00 00
TCPSelector [debug.buffer] Retaining Buffer@3[RELEASED]
TCPSelector [debug.buffer] Obtained Buffer@2[INITIAL]
TCPSelector [debug.buffer] Read 606 bytes (EOS)
00 00 01 5a 01 7f 00 00 00 00 00 00 22 02 01 00 19 6d 61 73 74 65 72 64 61 74 61 35 23 42 61 73 65 43 6f 6d 70 6f 6e 65 6e 74 00 01 00 00 00 00 00 00 00 03 1b 00 00 00 00 00 00 01 56 60 05 73 7e 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 03 1a 00 00 00 00 03 02 00 01 00 06 43 6f 6d 70 20 41 00 02 00 01 00 03 31 32 33 00 02 01 02 00 01 00 11 53 70 6f 69 6c 65 72 20 43 6f 6d 70 6f 6e 65 6e 74 00 02 00 00 00 02 00 00 00 00 00 00 00 03 1c 00 00 00 00 00 00 00 03 1d 02 00 00 00 02 00 00 00 00 00 00 00 03 1e 00 00 00 00 00 00 00 03 23 02 00 00 00 00 00 00 00 03 66 02 00 00 00 00 00 00 00 03 64 02 00 00 00 03 00 00 00 00 00 00 00 03 6c 00 00 00 00 00 00 00 03 2c 00 00 00 00 00 00 00 03 03 02 00 00 00 05 00 00 00 00 00 00 00 03 4b 00 00 00 00 00 00 00 03 4d 00 00 00 00 00 00 00 03 54 00 00 00 00 00 00 00 03 5b 00 00 00 00 00 00 00 03 5e 00 02 00 00 00 04 00 00 00 00 00 00 00 03 28 00 00 00 00 00 00 00 03 29 00 00 00 00 00 00 00 03 2a 00 00 00 00 00 00 00 03 2b 00 02 00 00 00 1c 00 00 00 00 00 00 00 03 7b 00 00 00 00 00 00 00 03 7c 00 00 00 00 00 00 00 03 7e 00 00 00 00 00 00 00 03 7f 00 00 00 00 00 00 00 03 6f 00 00 00 00 00 00 00 03 5f 00 00 00 00 00 00 00 03 4f 00 00 00 00 00 00 00 03 4d 00 00 00 00 00 00 00 03 4c 00 00 00 00 00 00 00 03 4b 00 00 00 00 00 00 00 03 4a 00 00 00 00 00 00 00 03 49 00 00 00 00 00 00 00 03 48 00 00 00 00 00 00 00 03 47 00 00 00 00 00 00 00 03 46 00 00 00 00 00 00 00 03 45 00 00 00 00 00 00 00 03 44 00 00 00 00 00 00 00 03 43 00 00 00 00 00 00 00 03 42 00 00 00 00 00 00 00 03 41 00 00 00 00 00 00 00 03 40 00 00 00 00 00 00 00 03 3f 00 00 00 00 00 00 00 04 35 00 00 00 00 00 00 00 04 34 00 00 00 00 00 00 00 04 32 00 00 00 00 00 00 00 04 30 00 00 00 00 00 00 00 04 29 00 00 00 00 00 00 00 04 16 02 00 00 00 00 02 00 00 00 00 00 00 00 03 0a 00 00 00 00 00
TCPSelector [debug.channel] Handling buffer from multiplexer: Buffer@2[GETTING] --> Channel[1, CLIENT, cdo]
Net4jReceiveSerializer-Channel[1, CLIENT, cdo] [debug.signal] Received buffer for correlation -347
main [debug.protocol] Reading CDOIDObject of subtype 0 (LONG)
main [debug.protocol] Reading CDOID of type 0 (NULL)
main [debug.protocol] Reading CDOIDObject of subtype 0 (LONG)
main [debug.revision] Reading revision: ID=OID795, className=BaseComponent, version=1, branchPoint=BranchPoint[Branch[id=0, name=MAIN], 2016-08-18 20:59:09.822], revised=0, resource=NULL, container=OID794, featureID=-1
main [debug.revision] Read feature name: Comp A
main [debug.revision] Read feature partNumber: 123
main [debug.revision] Read feature isMeasurable: true
main [debug.revision] Read feature comment: Spoiler Component
main [debug.protocol] Reading CDOID of type 0 (NULL)
main [debug.revision] Read feature predecessor: NULL
main [debug.protocol] Read feature mountingParts: size=16.777.216, referenceChunk=3
main [debug.protocol] Reading CDOID of type 28 (28)
If I use the transaction sepearately via
cdoView.getObject(org.eclipse.emf.cdo.common.id.CDOIDUtil.createLong(795)) // ID of the problematic object
I get after the same trace messages the following exception
java.lang.ArrayIndexOutOfBoundsException: 28
at org.eclipse.emf.cdo.common.id.CDOIDUtil.read(CDOIDUtil.java:500)
at org.eclipse.emf.cdo.spi.common.protocol.CDODataInputImpl.readCDOID(CDODataInputImpl.java:393)
at org.eclipse.emf.cdo.internal.common.model.CDOTypeImpl$11.readValue(CDOTypeImpl.java:252)
at org.eclipse.emf.cdo.internal.common.model.CDOTypeImpl$11.readValue(CDOTypeImpl.java:1)
at org.eclipse.emf.cdo.spi.common.protocol.CDODataInputImpl.readCDOList(CDODataInputImpl.java:548)
at org.eclipse.emf.cdo.spi.common.revision.BaseCDORevision.readValue(BaseCDORevision.java:269)
at org.eclipse.emf.cdo.spi.common.revision.BaseCDORevision.readValues(BaseCDORevision.java:245)
at org.eclipse.emf.cdo.spi.common.revision.BaseCDORevision.read(BaseCDORevision.java:190)
at org.eclipse.emf.cdo.spi.common.protocol.CDODataInputImpl.readCDORevision(CDODataInputImpl.java:434)
at org.eclipse.emf.cdo.spi.common.protocol.CDODataInputImpl.readCDORevision(CDODataInputImpl.java:425)
at org.eclipse.emf.cdo.spi.common.revision.RevisionInfo.readRevision(RevisionInfo.java:225)
at org.eclipse.emf.cdo.spi.common.revision.RevisionInfo.readResult(RevisionInfo.java:165)
at org.eclipse.emf.cdo.internal.net4j.protocol.LoadRevisionsRequest.confirming(LoadRevisionsRequest.java:142)
at org.eclipse.emf.cdo.internal.net4j.protocol.LoadRevisionsRequest.confirming(LoadRevisionsRequest.java:1)
at org.eclipse.emf.cdo.internal.net4j.protocol.CDOClientRequest.confirming(CDOClientRequest.java:97)
at org.eclipse.net4j.signal.RequestWithConfirmation.doExtendedInput(RequestWithConfirmation.java:125)
at org.eclipse.net4j.signal.Signal.doInput(Signal.java:377)
at org.eclipse.net4j.signal.RequestWithConfirmation.doExecute(RequestWithConfirmation.java:105)
at org.eclipse.net4j.signal.SignalActor.execute(SignalActor.java:53)
at org.eclipse.net4j.signal.Signal.runSync(Signal.java:283)
at org.eclipse.net4j.signal.SignalProtocol.startSignal(SignalProtocol.java:466)
at org.eclipse.net4j.signal.RequestWithConfirmation.doSend(RequestWithConfirmation.java:89)
at org.eclipse.net4j.signal.RequestWithConfirmation.send(RequestWithConfirmation.java:75)
at org.eclipse.emf.cdo.internal.net4j.protocol.CDOClientProtocol.send(CDOClientProtocol.java:605)
at org.eclipse.emf.cdo.internal.net4j.protocol.CDOClientProtocol.send(CDOClientProtocol.java:638)
at org.eclipse.emf.cdo.internal.net4j.protocol.CDOClientProtocol.loadRevisions(CDOClientProtocol.java:203)
at org.eclipse.emf.cdo.internal.common.revision.CDORevisionManagerImpl.loadRevisions(CDORevisionManagerImpl.java:431)
at org.eclipse.emf.cdo.internal.common.revision.CDORevisionManagerImpl.getRevisions(CDORevisionManagerImpl.java:309)
at org.eclipse.emf.cdo.internal.common.revision.CDORevisionManagerImpl.getRevision(CDORevisionManagerImpl.java:291)
at org.eclipse.emf.cdo.internal.common.revision.CDORevisionManagerImpl.getRevision(CDORevisionManagerImpl.java:284)
at org.eclipse.emf.internal.cdo.view.CDOViewImpl.getRevision(CDOViewImpl.java:907)
at org.eclipse.emf.internal.cdo.view.AbstractCDOView.createObject(AbstractCDOView.java:1833)
at org.eclipse.emf.internal.cdo.view.AbstractCDOView.getObject(AbstractCDOView.java:1661)
at org.eclipse.emf.internal.cdo.transaction.CDOTransactionImpl.getObject(CDOTransactionImpl.java:1498)
at org.eclipse.emf.internal.cdo.view.AbstractCDOView.getObject(AbstractCDOView.java:1602)
at org.eclipse.emf.internal.cdo.view.AbstractCDOView.getObject(AbstractCDOView.java:1)
As far as I understand the code the byte sequence is interpreted wrong as 28 is not a valid ordinal for a CDOID.Type
|
|
|
|
|
|
|
|
Re: NoSuchElementException while traversing CDOResource.getAllContents() [message #1741741 is a reply to message #1741721] |
Mon, 29 August 2016 08:57 |
|
I've just double-checked that session.options().setGeneratedPackageEmulationEnabled(true) works correctly. I did the following:
1. Started a CDO server without generated packages deployed.
2. Started a client with generated example package deployed. Created a resource and populated it with instances of the generated example package.
3. Restarted that client with generated example package deployed. Verified that instances of the generated example package are loaded.
4. Restarted that client without generated example package deployed and with session.options().setGeneratedPackageEmulationEnabled(false). Verified that CDOPackageNotFoundException is thrown.
5. Restarted that client without generated example package deployed and with session.options().setGeneratedPackageEmulationEnabled(true). Verified that the dynamic package is loaded from the server and dynamic instances are loaded.
Please let me make sure that I understand your scenario. You used a client with the generated package with the nsURI "metamodel5" and committed instances of that package to your repo. Then you evolved your package, so that it has different structure and the new nsURI "metamodel6". In order to migrate your existing metamodel5 instances in the repo you started a new client with the generated package metamodel6; and you were trying to get the existing metamodel5 instances loaded through the dynamic metamodel5 package, which is stored in the repo. Correct so far?
So please answer the following question precisely: With your "migration client", what are the exact mappings in your global package registry (nsURI -> Object)? I'm only interested in the metamodel5 and/or metamodel6 mappings.
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
|
|
|
Re: NoSuchElementException while traversing CDOResource.getAllContents() [message #1741774 is a reply to message #1741741] |
Mon, 29 August 2016 11:27 |
Alexander Nehmer Messages: 19 Registered: January 2016 |
Junior Member |
|
|
Yes, you understood the scenario totally correct.
The mappings are the following:
EPackage.Registry.INSTANCE.get("masterdata5")
--> (org.eclipse.emf.ecore.plugin.RegistryReader$EPackageDescriptor) org.eclipse.emf.ecore.plugin.RegistryReader$EPackageDescriptor@6af78a48
EPackage.Registry.INSTANCE.get("masterdata6")
--> (com.sc.antennendb.model.masterdata.impl.MasterdataPackageImpl) model.masterdata.impl.MasterdataPackageImpl@61bb1e4d (name: masterdata) (nsURI: masterdata6, nsPrefix: masterdata)
Maybe some explanation for what I'm doing: I found the CDO/Edapt migration code of Christophe Bouhier, the only publically available code (at least the one I found) to migrate an existing CDO resource regarding model evolution. But the last commits on http://git.eclipse.org/c/edapt/org.eclipse.emf.edapt.git/commit/?h=topic_cdo were from 2 years ago. Maybe I got it all wrong when I started working on that issue but to me the code in org.eclipse.emf.edapt.cdo.migration.execution.CDOMigrator, especially what I understood from the main method, was not ready to work to support my scenario to migrate a CDOResource on the fly to a CDOResource.
After debugging for days I might understood, that using the Edapt created model cannot work with CDO (at least not at the moment). Also a comment of Christophe in org.eclipse.emf.edapt.cdo.migration.StrategyForwardConverter in line 134 (that I understood just 2 days ago) point in that direction:
"// CB Doesn't work for CDO! (Not with already loaded resources,
// turned on the option to emulate Generated packages, but provides
// Classifiers here in different order....
"
The was the reason the CDOIDUtil.read() failed as another EStructuralFeature was tried to read as was provided the edapt metamodel.
So do not want to migrate the DB tables of the "old" instance as this would be a lot more complex, but instead load the existing model from the server, just use the Forward- and BackwardConverter logic from Edapt and parts of the code of Christophe to create evolved package based CDOObject instances and save the resource to a new repository and have the CDO server create the tables based on the evolved model.
Currently the BackwardConverter throws some errors I'm working on, but does my approach make sense to you?
Unfortunately not to be able to use the Edapt metamodel creation is a big flaw. Maybe it would be worthwhile to have a closer look at org.eclipse.emf.edapt.internal.migration.internal.Persistency.loadMetamodel(ResourceSet) to fix that problem (in a derived CDO-specific Persistency class). Then the CDO migration might integrate seamlessly into Edapt migration just based on a CDO connection aware URI.
[Updated on: Mon, 29 August 2016 18:23] Report message to a moderator
|
|
|
|
|
|
|
|
|
|
|
|
|
|