[Flock] UnresolvedReference [message #1029358] |
Fri, 29 March 2013 15:09 |
ben ben Messages: 28 Registered: June 2012 |
Junior Member |
|
|
Hi,
Tring to migrate a model (XMI size: 774KB), I get an UnresolvedReferenceException.
When looking into the XMI file and manually counting elements indexes, I can definitely assert that referenced element does exist.
Someone has an idea ?
Thanks !
Exception :
Internal error: org.eclipse.emf.ecore.resource.Resource$IOWrappedException: Unresolved reference '/17/@data.0/@etudes.0'
at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.handleErrors[XMLLoadImpl.java:83]
at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load[XMLLoadImpl.java:191]
...
Internal error: java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
at java.util.ArrayList.RangeCheck[Unknown Source]
at java.util.ArrayList.get[Unknown Source]
at org.eclipse.epsilon.flock.FlockContext.getModelFromRepositoryByIndex[FlockContext.java:76]
at org.eclipse.epsilon.flock.FlockContext.setMigratedModel[FlockContext.java:72]
Model sample :
<fr.bull.indus.model_1:Utilisateur matricule="ADMIN" nom="ADMIN" prenom="ADMIN" roles="/2 /3 /4" password="ADMIN" sessionID="-1">
<data xsi:type="fr.bull.ec.etm.model:ProjetEtude" nom="Projet Reference" createur="/17">
<etudes nom="Reference" elements="/17/@data.1 /17/@data.2 /17/@data.3 /17/@data.4 /17/@data.5 /17/@data.6 /17/@data.7 /17/@data.8 /17/@data.9 /17/@data.10 /17/@data.11 /17/@data.12 /17/@data.13 /17/@data.14 /17/@data.15 /17/@data.16 /17/@data.17 /17/@data.18 /17/@data.19 /17/@data.20 /17/@data.21 /17/@data.22 /17/@data.23 /17/@data.24 /17/@data.25 /17/@data.26 /17/@data.27 /17/@data.28 /17/@data.29 /17/@data.30 /17/@data.31 /17/@data.32 /17/@data.33 /17/@data.34 /17/@data.35 /17/@data.36 /17/@data.37 /17/@data.38" partage="true" type="REFERENCE" createur="/17"/>
</data>
[Updated on: Fri, 29 March 2013 15:10] Report message to a moderator
|
|
|
Re: [Flock] UnresolvedReference [message #1031343 is a reply to message #1029358] |
Mon, 01 April 2013 15:49 |
|
Have you tried to open the model with Exeed or the sample EMF reflective model editor? Please follow these steps:
1. Register your .ecore metamodel by right-clicking on it and selecting "Register EPackages" on the Project Manager view.
2. Open your .xmi file with "Open with..." -> "Sample Reflective EMF Model Editor" or "Exeed editor" (they're quite similar).
Flock loads .xmi models using plain old EMF facilities, so if EMF can't load the model it won't be able to do much :-/.
|
|
|
Re: [Flock] UnresolvedReference [message #1031780 is a reply to message #1031343] |
Tue, 02 April 2013 07:20 |
ben ben Messages: 28 Registered: June 2012 |
Junior Member |
|
|
Thanks for your reply Antonio.
After registering all EPackages (my metamodel is defined by several Ecore files), I can open XMI with both editors but it takes a very long time (10 min or more for each editor).
I get no error but it seems I can't expand some nodes, it's weird because in properties view node's children are displayed ...
Have I to consider memory issues ? It's worrying me because my XMI file size is only 774KB ...
[Updated on: Tue, 02 April 2013 07:22] Report message to a moderator
|
|
|
Re: [Flock] UnresolvedReference [message #1031787 is a reply to message #1031780] |
Tue, 02 April 2013 07:32 |
ben ben Messages: 28 Registered: June 2012 |
Junior Member |
|
|
I'm going forward ....
Succeeded in converting XMI with Flock Launcher without no error by removing opposite reference which causes error
But output XMI does not contain all input elements ....
774KB -> 153KB
Always the same contents if I repeat operation.
Output file seems to be consistent ...
Really weird ....
[Updated on: Tue, 02 April 2013 08:32] Report message to a moderator
|
|
|
|
Re: [Flock] UnresolvedReference [message #1034451 is a reply to message #1029358] |
Fri, 05 April 2013 12:52 |
ben ben Messages: 28 Registered: June 2012 |
Junior Member |
|
|
I think I've located the problem.
My metamodel consists of several ECore files.
In migration process, all references between 2 differents Ecore metamodels are skipped (not migrated).
But, if I specify a migration rule like this :
migrated.<feature> = original.<feature>;
or
migrated.<feature> = original.<feature>.equivalent();
then reference is migrated well.
I managed to get around this issue by automatically generating a Migration strategy file for all features, but it does not wotk for Enums (ClassCastException).
So if there's a way to solve original problem I would appreciate
If not, do you know how I can explicitly copy enum values ?
Thanks !
Last question: Is Flock fully compliant with multiple ECore use ?
[Updated on: Fri, 05 April 2013 12:54] Report message to a moderator
|
|
|
Powered by
FUDForum. Page generated in 0.02995 seconds