[EMF][Teneo] generating orm etc. [message #826074] |
Wed, 21 March 2012 16:14 |
Ludwig Moser Messages: 476 Registered: July 2009 |
Senior Member |
|
|
Hi!
i've read through quite a lot of articles regarding teneo.
afaik its supposed to generate the orm.xml file _and_ annotations on the source code (right?)
i've created a very simple project with an ecore, persistence.xml file etc.
i generate my model (works fine)
i generate the orm.xml (works fine, but i get a INFORMATION log:
i guess i can simply ignore this one?
Quote:org.eclipse.emf.teneo.classloader.ClassLoaderResolver setClassLoaderStrategy
Information: Class loader strategy set to: org.eclipse.emf.teneo.classloader.ContextClassLoaderStrategy
then i tried to use the generated code, but every time i launch a test
i get the following:
Quote:The collection of metamodel types is empty. Model classes may not have been found during entity search for Java SE and some Java EE container managed persistence units. Please verify that your entity classes are referenced in persistence.xml using either <class> elements or a global <exclude-unlisted-classes>false</exclude-unlisted-classes> element
that's why i looked at the code and i do not find any annotations on the code (interfaces nor impl)
thats why i do not wonder nothing can be found...
can someone help me?
i am using the following versions:
EMF 2.7.1
Ecore Tools 1.0.0
EMF Teneo EclipseLink 1.2.0
this is my EPerson.ecore:
<?xml version="1.0" encoding="UTF-8"?>
<ecore:EPackage xmi:version="2.0"
xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="eperson"
nsURI="http://eperson/1.0" nsPrefix="eperson">
<eClassifiers xsi:type="ecore:EClass" name="EPerson">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="age" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
</eClassifiers>
</ecore:EPackage>
[Updated on: Wed, 21 March 2012 16:28] Report message to a moderator
|
|
|
Re: [EMF][Teneo] generating orm etc. [message #826302 is a reply to message #826074] |
Wed, 21 March 2012 23:00 |
Martin Taal Messages: 5468 Registered: July 2009 |
Senior Member |
|
|
Hi Ludwig,
The prefered way of using teneo is using Hibernate, for hibernate you can let Teneo do the mapping internally.
If you want jpa/orm.xml then I suggest looking at the EMFT Texo project which provides generation of jpa annotated code
from ecore/xsd models:
http://wiki.eclipse.org/Texo
gr. Martin
On 03/21/2012 05:14 PM, Ludwig Moser wrote:
> Hi!
>
> i've read through quite a lot of articles regarding teneo.
> afaik its supposed to generate the orm.xml file _and_ annotations on the source code (right?)
>
> i've created a very simple project with an ecore, persistence.xml file etc.
> i generate my model (works fine)
> i generate the orm.xml (works fine, but i get a INFORMATION log:
>
> i guess i can simply ignore this one?
> Quote:
>> org.eclipse.emf.teneo.classloader.ClassLoaderResolver setClassLoaderStrategy
>> Information: Class loader strategy set to: org.eclipse.emf.teneo.classloader.ContextClassLoaderStrategy
>
>
> then i tried to use the generated code, but every time i launch a test
> i get the following:
> Quote:
>> The collection of metamodel types is empty. Model classes may not have been found during entity search for Java SE and
>> some Java EE container managed persistence units. Please verify that your entity classes are referenced in
>> persistence.xml using either <class> elements or a global <exclude-unlisted-classes>false</exclude-unlisted-classes>
>> element
>
>
> that's why i looked at the code and i do not find any annotations on the code (interfaces nor impl)
> thats why i do not wonder nothing can be found...
>
> can someone help me?
>
> i am using the following versions:
> EMF 2.7.1
> Ecore Tools 1.0.0
> EMF Teneo EclipseLink 1.2.0
>
>
--
With Regards, Martin Taal
Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@xxxxxxxx - mtaal@xxxxxxxx
Web: www.springsite.com - www.elver.org
|
|
|
|
Re: [EMF][Teneo] generating orm etc. [message #826591 is a reply to message #826492] |
Thu, 22 March 2012 08:59 |
Martin Taal Messages: 5468 Registered: July 2009 |
Senior Member |
|
|
Probably there is not so much difference between hibernate and eclipselink. Have you looked at CDO?
If that does not work for you then for a RCP I would use Teneo with Hibernate.
gr. Martin
On 03/22/2012 07:05 AM, Ludwig Moser wrote:
> i'll be using it in an RCP program so would you suggest me to use texo or teneo with hibernate?
> which one of those two is more mature?
>
> we are currently using hibernate, but we had loads of problems with it (mapping, buddy policy, etc... even caching gives
> sometimes unpredictable results) - eclipselink, on the other side i have never used, so it COULD give me even worse
> results ;)
--
With Regards, Martin Taal
Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@xxxxxxxx - mtaal@xxxxxxxx
Web: www.springsite.com - www.elver.org
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03364 seconds