Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » [Flock] UnresolvedReference
[Flock] UnresolvedReference [message #1029358] Fri, 29 March 2013 15:09 Go to next message
ben ben is currently offline ben benFriend
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 Go to previous messageGo to next message
Antonio Garcia-Dominguez is currently offline Antonio Garcia-DominguezFriend
Messages: 594
Registered: January 2010
Location: Birmingham, UK
Senior Member

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 Go to previous messageGo to next message
ben ben is currently offline ben benFriend
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 Go to previous messageGo to next message
ben ben is currently offline ben benFriend
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 #1032842 is a reply to message #1031787] Wed, 03 April 2013 13:57 Go to previous messageGo to next message
Antonio Garcia-Dominguez is currently offline Antonio Garcia-DominguezFriend
Messages: 594
Registered: January 2010
Location: Birmingham, UK
Senior Member

Hi ben ben,

How did you obtain the original model, if I may ask? It looks as if the original inter-model references were broken.

Have you tried loading the original model from a Java program using EMF and checking all the cross references? We have Concordance [1] for checking inter-model references, but I think it doesn't work for internal references within the same model.

[1]: http://www.eclipse.org/epsilon/doc/concordance/

[Updated on: Wed, 03 April 2013 13:58]

Report message to a moderator

Re: [Flock] UnresolvedReference [message #1034451 is a reply to message #1029358] Fri, 05 April 2013 12:52 Go to previous message
ben ben is currently offline ben benFriend
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 Wink

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

Previous Topic:[EOL] Change Nodes Resize Constraint
Next Topic:Test EGL Templates using EUnit
Goto Forum:
  


Current Time: Thu Apr 25 18:51:29 GMT 2024

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

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

Back to the top