Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » VIATRA » Error on importing EMF model
Error on importing EMF model [message #794038] Wed, 08 February 2012 21:29 Go to next message
Josef Pohl is currently offline Josef PohlFriend
Messages: 82
Registered: January 2012
Member
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 #795731 is a reply to message #794038] Fri, 10 February 2012 21:31 Go to previous messageGo to next message
Istvan Rath is currently offline Istvan RathFriend
Messages: 59
Registered: July 2009
Member
Just for the record: we have addressed this issue in email, over viatra-dev AT inf.mit.bme.hu.
Re: Error on importing EMF model [message #795764 is a reply to message #795731] Fri, 10 February 2012 22:42 Go to previous messageGo to next message
Josef Pohl is currently offline Josef PohlFriend
Messages: 82
Registered: January 2012
Member
Thanks for mentioning that this has been solved Istvan!

For anyone who runs into a similar problem, the issue was that my the generated model code for my meta-model (i.e. the plugin for my meta-model) was not registered in the environment. Simply by creating a runtime eclipse environment with the meta-model plugin I was able to (well, I was shown by some very helpful people) load my model instances.

Thanks again guys.
Josef
Re: Error on importing EMF model [message #958284 is a reply to message #794038] Thu, 25 October 2012 22:36 Go to previous messageGo to next message
Irene Ully is currently offline Irene UllyFriend
Messages: 5
Registered: October 2012
Junior Member
Hello,

I am new to VIATRA and modeling framework. I found some difficulties on importing model instance to VIATRA model space. I have tried to use runtime eclipse environment, but the importer still does not work. I successfully import the metamodel, though.

Here I also attach the metamodel plug-in and the model instance (abc.bt) that I want to import. Maybe they have some special properties so that the importer would not accept? How to deal with that? Or maybe I'm doing it in a wrong way?

Thank you,
Irene
Re: Error on importing EMF model [message #964762 is a reply to message #958284] Tue, 30 October 2012 19:33 Go to previous messageGo to next message
Abel Hegedus is currently offline Abel HegedusFriend
Messages: 197
Registered: September 2015
Senior Member
Hi,

we will look at the files you sent soon, sorry for not responding earlier.

Best regards,
Ábel
Re: Error on importing EMF model [message #972447 is a reply to message #958284] Mon, 05 November 2012 16:36 Go to previous message
Abel Hegedus is currently offline Abel HegedusFriend
Messages: 197
Registered: September 2015
Senior Member
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?
Previous Topic:Stereotypes not shown in modelspace
Next Topic:Algorithm implementation
Goto Forum:
  


Current Time: Tue Mar 19 10:18:24 GMT 2024

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

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

Back to the top