Missing model element when generating Teneo hibernate mapping [message #74312] |
Thu, 08 March 2007 11:05  |
Eclipse User |
|
|
|
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 #74385 is a reply to message #74349] |
Thu, 08 March 2007 11:45  |
Eclipse User |
|
|
|
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 11:20  |
Eclipse User |
|
|
|
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 11:45  |
Eclipse User |
|
|
|
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
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.03145 seconds