Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [EMF][Teneo] generating orm etc.(Teneo is supposed to generate Annotations?)  () 1 Vote
[EMF][Teneo] generating orm etc. [message #826074] Wed, 21 March 2012 16:14 Go to next message
Ludwig Moser is currently offline Ludwig MoserFriend
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 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
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 #826492 is a reply to message #826302] Thu, 22 March 2012 06:05 Go to previous messageGo to next message
Ludwig Moser is currently offline Ludwig MoserFriend
Messages: 476
Registered: July 2009
Senior Member
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 Wink

EDIT: i've read through texo documentation and decided to go for teneo and hibernate

[Updated on: Thu, 22 March 2012 06:38]

Report message to a moderator

Re: [EMF][Teneo] generating orm etc. [message #826591 is a reply to message #826492] Thu, 22 March 2012 08:59 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
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
Re: [EMF][Teneo] generating orm etc. [message #826599 is a reply to message #826591] Thu, 22 March 2012 09:16 Go to previous messageGo to next message
Ludwig Moser is currently offline Ludwig MoserFriend
Messages: 476
Registered: July 2009
Senior Member
thanks martin for your reply, i will try teneo with hibernate!
Re: [EMF][Teneo] generating orm etc. [message #826622 is a reply to message #826599] Thu, 22 March 2012 09:50 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
We are using Teneo + Hibernate with great success in one of our
applications (>150 Entities, >50 Views).

Tom

Am 22.03.12 10:16, schrieb Ludwig Moser:
> thanks martin for your reply, i will try teneo with hibernate!
Re: [EMF][Teneo] generating orm etc. [message #827453 is a reply to message #826622] Fri, 23 March 2012 10:54 Go to previous messageGo to next message
Ludwig Moser is currently offline Ludwig MoserFriend
Messages: 476
Registered: July 2009
Senior Member
anyone of you got a step by step tutorial?
i only found the quickstart on git, and i cant access git/CVS/SVN to check out a project...
Re: [EMF][Teneo] generating orm etc. [message #827482 is a reply to message #827453] Fri, 23 March 2012 11:42 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi,
Not sure what you are looking, Teneo docs are here:
http://wiki.eclipe.org/Teneo/Hibernate

gr. Martin

On 03/23/2012 11:54 AM, Ludwig Moser wrote:
> anyone of you got a step by step tutorial?
> i only found the quickstart on git, and i cant access git/CVS/SVN to check out a project...


--

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 #827503 is a reply to message #827482] Fri, 23 March 2012 12:18 Go to previous messageGo to next message
Ludwig Moser is currently offline Ludwig MoserFriend
Messages: 476
Registered: July 2009
Senior Member
you are referring to an example from git/CVS/SVN, which i cant access...
a download as zip would be great - or a step by step tutorial (i love those as it makes me feel smarter after they are finished ;o) )
Re: [EMF][Teneo] generating orm etc. [message #827735 is a reply to message #827503] Fri, 23 March 2012 18:35 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi,
Sorry I can't help with a zip file.

Did you check out the documentation:
http://wiki.eclipse.org/Teneo/Hibernate

that's all the docs/tutorials I have. Tom Schindl has done many tutorials/blogs on interesting topics also.

gr. Martin

On 03/23/2012 01:18 PM, Ludwig Moser wrote:
> you are referring to an example from git/CVS/SVN, which i cant access...
> a download as zip would be great - or a step by step tutorial (i love those as it makes me feel smarter after they are
> finished ;o) )


--

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
Previous Topic:GWT /EMF Refactoring EditorEntryPoint to MVP pattern
Next Topic:[Teneo] Strange hibernate mapping for one-to-one conteinment reference
Goto Forum:
  


Current Time: Fri Apr 26 17:12:52 GMT 2024

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

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

Back to the top