Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [Teneo] Use several ecore file for the same model
[Teneo] Use several ecore file for the same model [message #620246] Wed, 20 August 2008 12:53
samuel is currently offline samuelFriend
Messages: 11
Registered: July 2009
Junior Member
Hello !

I want to persit a model with links to another ecore file.
In EMF we have the possibility to load another ecore within an existing
ecore, and to make references to this model.
Example : The ResourceExtendedTest extends a Resource defined in another
ecore file :

<eClassifiers xsi:type="ecore:EClass" name="ResourceExtendedTest"
eSuperTypes="../../../model/DreamsBasicModel.ecore#//Resource ">
</eClassifiers>

But when initializing (HbSessionDataStore.initialize ), It throws an
exception because it can't find the the Resource defined in the other ecore
file:
java.lang.IllegalArgumentException: No annotated model element present for:
Resource for type EClass has its epackage been registered with Teneo?
at
org.eclipse.emf.teneo.annotations.pamodel.impl.PAnnotatedMod elImpl.checkAnnotatedPresent(PAnnotatedModelImpl.java:346)
at
org.eclipse.emf.teneo.annotations.pamodel.impl.PAnnotatedMod elImpl.getPAnnotated(PAnnotatedModelImpl.java:288)
at
org.eclipse.emf.teneo.annotations.mapper.EClassAnnotator.ann otate(EClassAnnotator.java:91)
at
org.eclipse.emf.teneo.hibernate.annotations.HbEClassAnnotato r.annotate(HbEClassAnnotator.java:55)
at
org.eclipse.emf.teneo.annotations.mapper.AnnotationGenerator .processPackage(AnnotationGenerator.java:167)
at
org.eclipse.emf.teneo.annotations.mapper.AnnotationGenerator .map(AnnotationGenerator.java:135)
at
org.eclipse.emf.teneo.annotations.mapper.PersistenceMappingB uilder.buildMapping(PersistenceMappingBuilder.java:142)
at
org.eclipse.emf.teneo.annotations.mapper.PersistenceMappingB uilder.buildMapping(PersistenceMappingBuilder.java:66)
at
org.eclipse.emf.teneo.hibernate.HbDataStore.mapEPackages(HbD ataStore.java:609)
at
org.eclipse.emf.teneo.hibernate.HbSessionDataStore.mapModel( HbSessionDataStore.java:155)
at
org.eclipse.emf.teneo.hibernate.HbSessionDataStore.initializ e(HbSessionDataStore.java:73)
at
org.eclipse.emf.teneo.hibernate.HbBaseSessionDataStore.getSe ssionFactory(HbBaseSessionDataStore.java:57)
at
org.eclipse.emf.teneo.hibernate.HbSessionDataStore.close(HbS essionDataStore.java:172)
at
com.oslo.dreams.model.util.ExtendedModelLoaderTest.testLoadM odel(ExtendedModelLoaderTest.java:38)

All the packages has been registered (even the packages defined in the other
ecore file).
Thanks in advance for your help,

Regards,

Samuel Michelot
Previous Topic:EMF search returns duplicate results
Next Topic:EMF search returns duplicate results
Goto Forum:
  


Current Time: Thu Apr 02 06:58:48 GMT 2020

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

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

Back to the top