Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » Missing model element when generating Teneo hibernate mapping
Missing model element when generating Teneo hibernate mapping [message #74312] Thu, 08 March 2007 16:05 Go to next message
Duncan Alexander is currently offline Duncan AlexanderFriend
Messages: 90
Registered: July 2009
Member
Hi ,
Im attempting to generate a hibernate mapping for my EMF model. The
model is generated from a fairly complex Rose model composed of one
main model file and six .cat files. The EMF model is generated without
any problems.

When I attempt to generate a Hibernate mapping through Teneo by
right clicking on any of the six different .ecore files which make up
the parts of the model I always receieve an error in the form:

Exception in thread "main" java.lang.IllegalArgumentException: No
annotated model element present for: Structure for type EClass has its
epackage been registered with Teneo?
at
org.eclipse.emf.teneo.annotations.pamodel.impl.PAnnotatedMod elImpl.checkAnnotatedPresent(PAnnotatedModelImpl.java:323)
at
org.eclipse.emf.teneo.annotations.pamodel.impl.PAnnotatedMod elImpl.getPAnnotated(PAnnotatedModelImpl.java:269)
at
org.eclipse.emf.teneo.annotations.mapper.DefaultAnnotator.pr ocessClass(DefaultAnnotator.java:276)
at
org.eclipse.emf.teneo.hibernate.hbannotation.util.HibernateD efaultAnnotator.processClass(HibernateDefaultAnnotator.java: 140)
at
org.eclipse.emf.teneo.annotations.mapper.DefaultAnnotator.pr ocessPackage(DefaultAnnotator.java:246)
at
org.eclipse.emf.teneo.annotations.mapper.DefaultAnnotator.ma p(DefaultAnnotator.java:159)
at
org.eclipse.emf.teneo.annotations.mapper.PersistenceMappingB uilder.buildMapping(PersistenceMappingBuilder.java:158)
at
org.eclipse.emf.teneo.annotations.mapper.PersistenceMappingB uilder.buildMapping(PersistenceMappingBuilder.java:90)
at
org.eclipse.emf.teneo.hibernate.mapper.GenerateHBM.createORM apperFile(GenerateHBM.java:104)
at
org.eclipse.emf.teneo.hibernate.mapper.GenerateHBM.main(Gene rateHBM.java:84)


For each of the different .ecore files the annotated model element
referred to in the error is different. I have successfully generated
mappings for very simple models but I'm at a loss as to where to look
for the source of the error in this instance.

Im running Eclipse 3.2, Teneo 0.75, EMF2.2, Hibernate 3.2

Any help greatly appreciated.

Duncan
Re: Missing model element when generating Teneo hibernate mapping [message #74349 is a reply to message #74312] Thu, 08 March 2007 16:20 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Duncan,
The generation needs the complete model (so all ecore files). You should be able to select all ecore
files (so multiple select) and then right-click and generate the mapping.
Note if you initialize a datastore also all the epackages (from all the ecore files) should be set
in the datastore.

gr. Martin

Duncan ALexander wrote:
> Hi ,
> Im attempting to generate a hibernate mapping for my EMF model. The
> model is generated from a fairly complex Rose model composed of one
> main model file and six .cat files. The EMF model is generated without
> any problems.
>
> When I attempt to generate a Hibernate mapping through Teneo by
> right clicking on any of the six different .ecore files which make up
> the parts of the model I always receieve an error in the form:
>
> Exception in thread "main" java.lang.IllegalArgumentException: No
> annotated model element present for: Structure for type EClass has its
> epackage been registered with Teneo?
> at
> org.eclipse.emf.teneo.annotations.pamodel.impl.PAnnotatedMod elImpl.checkAnnotatedPresent(PAnnotatedModelImpl.java:323)
>
> at
> org.eclipse.emf.teneo.annotations.pamodel.impl.PAnnotatedMod elImpl.getPAnnotated(PAnnotatedModelImpl.java:269)
>
> at
> org.eclipse.emf.teneo.annotations.mapper.DefaultAnnotator.pr ocessClass(DefaultAnnotator.java:276)
>
> at
> org.eclipse.emf.teneo.hibernate.hbannotation.util.HibernateD efaultAnnotator.processClass(HibernateDefaultAnnotator.java: 140)
>
> at
> org.eclipse.emf.teneo.annotations.mapper.DefaultAnnotator.pr ocessPackage(DefaultAnnotator.java:246)
>
> at
> org.eclipse.emf.teneo.annotations.mapper.DefaultAnnotator.ma p(DefaultAnnotator.java:159)
>
> at
> org.eclipse.emf.teneo.annotations.mapper.PersistenceMappingB uilder.buildMapping(PersistenceMappingBuilder.java:158)
>
> at
> org.eclipse.emf.teneo.annotations.mapper.PersistenceMappingB uilder.buildMapping(PersistenceMappingBuilder.java:90)
>
> at
> org.eclipse.emf.teneo.hibernate.mapper.GenerateHBM.createORM apperFile(GenerateHBM.java:104)
>
> at
> org.eclipse.emf.teneo.hibernate.mapper.GenerateHBM.main(Gene rateHBM.java:84)
>
>
>
> For each of the different .ecore files the annotated model element
> referred to in the error is different. I have successfully generated
> mappings for very simple models but I'm at a loss as to where to look
> for the source of the error in this instance.
>
> Im running Eclipse 3.2, Teneo 0.75, EMF2.2, Hibernate 3.2
>
> Any help greatly appreciated.
>
> Duncan


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Re: Missing model element when generating Teneo hibernate mapping [message #74385 is a reply to message #74349] Thu, 08 March 2007 16:45 Go to previous message
Duncan Alexander is currently offline Duncan AlexanderFriend
Messages: 90
Registered: July 2009
Member
Aah,
thats one of those answers which makes you go 'Doh! why didnt I try that' ?

Thanks again, thats it working now.

Duncan

Martin Taal wrote:
> Hi Duncan,
> The generation needs the complete model (so all ecore files). You should
> be able to select all ecore files (so multiple select) and then
> right-click and generate the mapping.
> Note if you initialize a datastore also all the epackages (from all the
> ecore files) should be set in the datastore.
>
> gr. Martin
>
> Duncan ALexander wrote:
>> Hi ,
>> Im attempting to generate a hibernate mapping for my EMF model.
>> The model is generated from a fairly complex Rose model composed of one
>> main model file and six .cat files. The EMF model is generated without
>> any problems.
>>
>> When I attempt to generate a Hibernate mapping through Teneo by
>> right clicking on any of the six different .ecore files which make up
>> the parts of the model I always receieve an error in the form:
>>
>> Exception in thread "main" java.lang.IllegalArgumentException: No
>> annotated model element present for: Structure for type EClass has
>> its epackage been registered with Teneo?
>> at
>> org.eclipse.emf.teneo.annotations.pamodel.impl.PAnnotatedMod elImpl.checkAnnotatedPresent(PAnnotatedModelImpl.java:323)
>>
>> at
>> org.eclipse.emf.teneo.annotations.pamodel.impl.PAnnotatedMod elImpl.getPAnnotated(PAnnotatedModelImpl.java:269)
>>
>> at
>> org.eclipse.emf.teneo.annotations.mapper.DefaultAnnotator.pr ocessClass(DefaultAnnotator.java:276)
>>
>> at
>> org.eclipse.emf.teneo.hibernate.hbannotation.util.HibernateD efaultAnnotator.processClass(HibernateDefaultAnnotator.java: 140)
>>
>> at
>> org.eclipse.emf.teneo.annotations.mapper.DefaultAnnotator.pr ocessPackage(DefaultAnnotator.java:246)
>>
>> at
>> org.eclipse.emf.teneo.annotations.mapper.DefaultAnnotator.ma p(DefaultAnnotator.java:159)
>>
>> at
>> org.eclipse.emf.teneo.annotations.mapper.PersistenceMappingB uilder.buildMapping(PersistenceMappingBuilder.java:158)
>>
>> at
>> org.eclipse.emf.teneo.annotations.mapper.PersistenceMappingB uilder.buildMapping(PersistenceMappingBuilder.java:90)
>>
>> at
>> org.eclipse.emf.teneo.hibernate.mapper.GenerateHBM.createORM apperFile(GenerateHBM.java:104)
>>
>> at
>> org.eclipse.emf.teneo.hibernate.mapper.GenerateHBM.main(Gene rateHBM.java:84)
>>
>>
>>
>> For each of the different .ecore files the annotated model element
>> referred to in the error is different. I have successfully generated
>> mappings for very simple models but I'm at a loss as to where to look
>> for the source of the error in this instance.
>>
>> Im running Eclipse 3.2, Teneo 0.75, EMF2.2, Hibernate 3.2
>>
>> Any help greatly appreciated.
>>
>> Duncan
>
>
Re: Missing model element when generating Teneo hibernate mapping [message #603301 is a reply to message #74312] Thu, 08 March 2007 16:20 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Duncan,
The generation needs the complete model (so all ecore files). You should be able to select all ecore
files (so multiple select) and then right-click and generate the mapping.
Note if you initialize a datastore also all the epackages (from all the ecore files) should be set
in the datastore.

gr. Martin

Duncan ALexander wrote:
> Hi ,
> Im attempting to generate a hibernate mapping for my EMF model. The
> model is generated from a fairly complex Rose model composed of one
> main model file and six .cat files. The EMF model is generated without
> any problems.
>
> When I attempt to generate a Hibernate mapping through Teneo by
> right clicking on any of the six different .ecore files which make up
> the parts of the model I always receieve an error in the form:
>
> Exception in thread "main" java.lang.IllegalArgumentException: No
> annotated model element present for: Structure for type EClass has its
> epackage been registered with Teneo?
> at
> org.eclipse.emf.teneo.annotations.pamodel.impl.PAnnotatedMod elImpl.checkAnnotatedPresent(PAnnotatedModelImpl.java:323)
>
> at
> org.eclipse.emf.teneo.annotations.pamodel.impl.PAnnotatedMod elImpl.getPAnnotated(PAnnotatedModelImpl.java:269)
>
> at
> org.eclipse.emf.teneo.annotations.mapper.DefaultAnnotator.pr ocessClass(DefaultAnnotator.java:276)
>
> at
> org.eclipse.emf.teneo.hibernate.hbannotation.util.HibernateD efaultAnnotator.processClass(HibernateDefaultAnnotator.java: 140)
>
> at
> org.eclipse.emf.teneo.annotations.mapper.DefaultAnnotator.pr ocessPackage(DefaultAnnotator.java:246)
>
> at
> org.eclipse.emf.teneo.annotations.mapper.DefaultAnnotator.ma p(DefaultAnnotator.java:159)
>
> at
> org.eclipse.emf.teneo.annotations.mapper.PersistenceMappingB uilder.buildMapping(PersistenceMappingBuilder.java:158)
>
> at
> org.eclipse.emf.teneo.annotations.mapper.PersistenceMappingB uilder.buildMapping(PersistenceMappingBuilder.java:90)
>
> at
> org.eclipse.emf.teneo.hibernate.mapper.GenerateHBM.createORM apperFile(GenerateHBM.java:104)
>
> at
> org.eclipse.emf.teneo.hibernate.mapper.GenerateHBM.main(Gene rateHBM.java:84)
>
>
>
> For each of the different .ecore files the annotated model element
> referred to in the error is different. I have successfully generated
> mappings for very simple models but I'm at a loss as to where to look
> for the source of the error in this instance.
>
> Im running Eclipse 3.2, Teneo 0.75, EMF2.2, Hibernate 3.2
>
> Any help greatly appreciated.
>
> Duncan


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Re: Missing model element when generating Teneo hibernate mapping [message #603308 is a reply to message #74349] Thu, 08 March 2007 16:45 Go to previous message
Duncan Alexander is currently offline Duncan AlexanderFriend
Messages: 90
Registered: July 2009
Member
Aah,
thats one of those answers which makes you go 'Doh! why didnt I try that' ?

Thanks again, thats it working now.

Duncan

Martin Taal wrote:
> Hi Duncan,
> The generation needs the complete model (so all ecore files). You should
> be able to select all ecore files (so multiple select) and then
> right-click and generate the mapping.
> Note if you initialize a datastore also all the epackages (from all the
> ecore files) should be set in the datastore.
>
> gr. Martin
>
> Duncan ALexander wrote:
>> Hi ,
>> Im attempting to generate a hibernate mapping for my EMF model.
>> The model is generated from a fairly complex Rose model composed of one
>> main model file and six .cat files. The EMF model is generated without
>> any problems.
>>
>> When I attempt to generate a Hibernate mapping through Teneo by
>> right clicking on any of the six different .ecore files which make up
>> the parts of the model I always receieve an error in the form:
>>
>> Exception in thread "main" java.lang.IllegalArgumentException: No
>> annotated model element present for: Structure for type EClass has
>> its epackage been registered with Teneo?
>> at
>> org.eclipse.emf.teneo.annotations.pamodel.impl.PAnnotatedMod elImpl.checkAnnotatedPresent(PAnnotatedModelImpl.java:323)
>>
>> at
>> org.eclipse.emf.teneo.annotations.pamodel.impl.PAnnotatedMod elImpl.getPAnnotated(PAnnotatedModelImpl.java:269)
>>
>> at
>> org.eclipse.emf.teneo.annotations.mapper.DefaultAnnotator.pr ocessClass(DefaultAnnotator.java:276)
>>
>> at
>> org.eclipse.emf.teneo.hibernate.hbannotation.util.HibernateD efaultAnnotator.processClass(HibernateDefaultAnnotator.java: 140)
>>
>> at
>> org.eclipse.emf.teneo.annotations.mapper.DefaultAnnotator.pr ocessPackage(DefaultAnnotator.java:246)
>>
>> at
>> org.eclipse.emf.teneo.annotations.mapper.DefaultAnnotator.ma p(DefaultAnnotator.java:159)
>>
>> at
>> org.eclipse.emf.teneo.annotations.mapper.PersistenceMappingB uilder.buildMapping(PersistenceMappingBuilder.java:158)
>>
>> at
>> org.eclipse.emf.teneo.annotations.mapper.PersistenceMappingB uilder.buildMapping(PersistenceMappingBuilder.java:90)
>>
>> at
>> org.eclipse.emf.teneo.hibernate.mapper.GenerateHBM.createORM apperFile(GenerateHBM.java:104)
>>
>> at
>> org.eclipse.emf.teneo.hibernate.mapper.GenerateHBM.main(Gene rateHBM.java:84)
>>
>>
>>
>> For each of the different .ecore files the annotated model element
>> referred to in the error is different. I have successfully generated
>> mappings for very simple models but I'm at a loss as to where to look
>> for the source of the error in this instance.
>>
>> Im running Eclipse 3.2, Teneo 0.75, EMF2.2, Hibernate 3.2
>>
>> Any help greatly appreciated.
>>
>> Duncan
>
>
Previous Topic:EMaps and the missing @MapKey annotation
Next Topic:[Teneo] Invalid subclass tag in hibernate mapping file .
Goto Forum:
  


Current Time: Tue Oct 20 12:27:53 GMT 2020

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

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

Back to the top