Error on importing EMF model [message #794038] |
Wed, 08 February 2012 16:29  |
Eclipse User |
|
|
|
Hi there,
Not sure if anyone is monitoring this list but thought I would try.
I am a new VIATRA2 user (3.2) and am trying to import an ecore meta-model and an instance of this meta-model but have run into a number of cryptic errors which I cannot explain.
First I ran into a number of errors when I simply load the meta-model (using the generic importer from the Model Space instance). These errors do not seem to have anything to do with my meta-model itself though. This error did not re-occur on a second attempt so it might not be a true issue (i.e. I tried to recreate it but was not able to immediately.)
For instance
Relation 'nemf.ecore.EClass.EAttribute' is not a valid subtype of relation 'nemf.ecore.EClass.EStructuralFeature' as the refinement of target ends is invalid.
There were about 4 errors that pop up on this. All related to nemf.ecore
(EAttribute, EReference, EDataType (x2 on the last one, same error twice.)
The meta-model seems to be placed in the .vpml file though. And I can convert it to .vtml. (Just FYI. But it looks much more complicated than my original model.)
The second issue, which I can recreate, is when I then try to import an instance.
I receive the error:
Error executing task 'Native import: /home/jmpohl/runtime-EclipseApplication/egsc_test3/src/diagrams/Test23.egsn' (java.lang.reflect.InvocationTargetException) [null]
The model file, although with a different extension than the model name (xxegsn) is created from a graphical editor. I unfortunately do not get any other information on this (no stack trace, etc). So it is presumably a known issue (?) or at least seen before. The model is not resident in the VIATRA2 project that I am using.
Just for completeness I am using Eclipse Indigo (3.7.1)
So I guess in general, is there any work around on this? I have dug around a bit in the documentation but cannot seem to locate any user study case that explicitly follows the path of loading an ecore model and writing transformations based on that content. Am I missing something?
Thanks,
Joe
|
|
|
|
|
|
|
Re: Error on importing EMF model [message #972447 is a reply to message #958284] |
Mon, 05 November 2012 11:36  |
Eclipse User |
|
|
|
Hi,
I managed to take a look at your problem. Indeed, there is a special property that your example has: it uses Xtext. The problem with that is you cannot simply open the .bt files with the default EMF loaders. Your project also contains an xmi file, but that seems to be from an earlier metamodel version, so it cannot be imported either.
It seems that EMF doesn't know what to do with resources that have a .bt extension, becouse the project you sent us does not have an org.eclipse.emf.ecore.extension_parser extension.
In your generated (Xtext) ui project, you should have a similar entry to the following:
<extension point="org.eclipse.emf.ecore.extension_parser">
<parser class="{Your Xtext project}.ui.{Your language}ExecutableExtensionFactory:org.eclipse.xtext.resource.IResourceFactory" type="eiq">
</parser>
</extension>
Do you have such an entry, and if yes, is this plugin available as a bundle at the time when you tried the instance model importer?
If it is available then can you please include the error messages that are printed on the console during import?
|
|
|
Powered by
FUDForum. Page generated in 0.25279 seconds