[EMF][Teneo][Hibernate] [message #827444] |
Fri, 23 March 2012 10:39 |
Ludwig Moser Messages: 476 Registered: July 2009 |
Senior Member |
|
|
Quote:
org.eclipse.emf.teneo.classloader.ClassLoaderResolver setClassLoaderStrategy
Information: Class loader strategy set to: org.eclipse.emf.teneo.classloader.ContextClassLoaderStrategy
Exception in thread "main" java.lang.NullPointerException
at org.eclipse.emf.teneo.annotations.parser.EAnnotationParserImporter.removeCommentLines(EAnnotationParserImporter.java:172)
at org.eclipse.emf.teneo.annotations.parser.EAnnotationParserImporter.process(EAnnotationParserImporter.java:163)
at org.eclipse.emf.teneo.annotations.parser.EAnnotationParserImporter.processAnnotatedModelElement(EAnnotationParserImporter.java:97)
at org.eclipse.emf.teneo.annotations.parser.EAnnotationParserImporter.process(EAnnotationParserImporter.java:75)
at org.eclipse.emf.teneo.annotations.parser.EAnnotationParserImporter.process(EAnnotationParserImporter.java:68)
at org.eclipse.emf.teneo.annotations.mapper.PersistenceMappingBuilder.buildMapping(PersistenceMappingBuilder.java:142)
at org.eclipse.emf.teneo.annotations.mapper.PersistenceMappingBuilder.buildMapping(PersistenceMappingBuilder.java:64)
at org.eclipse.emf.teneo.hibernate.mapper.GenerateHBM.createORMapperFile(GenerateHBM.java:112)
at org.eclipse.emf.teneo.hibernate.mapper.GenerateHBM.main(GenerateHBM.java:82)
Versions:
EMF SDK 2.7.2
EMF Teneo Hibernate 1.2.0
Hibernate 3.6.0
javax persistence 2.0.1
note that the hibernate.hbm.xml is totally empty.
[Updated on: Fri, 23 March 2012 10:40] Report message to a moderator
|
|
|
Re: [EMF][Teneo][Hibernate] [message #827483 is a reply to message #827444] |
Fri, 23 March 2012 11:45 |
Martin Taal Messages: 5468 Registered: July 2009 |
Senior Member |
|
|
Hi Ludwig,
I try to be a nice guy :-), but I really think it is better/nicer/more polite to also add some explanatory or
introductionary words in your post. Something like this:
>>>>
Hi,
I am trying Teneo but encountered an issue, see below the stacktrace and versions of Teneo I use. Help is appreciated.
Thanks for spending the time.
gr. Ludwig
<<<<
Can you do a repost with an actual question, so I feel that a real human being is behind the post :-)
Thanks
gr. Martin
On 03/23/2012 11:39 AM, Ludwig Moser wrote:
> Quote:
>> org.eclipse.emf.teneo.classloader.ClassLoaderResolver setClassLoaderStrategy
>> Information: Class loader strategy set to: org.eclipse.emf.teneo.classloader.ContextClassLoaderStrategy
>> Exception in thread "main" java.lang.NullPointerException
>> at
>> org.eclipse.emf.teneo.annotations.parser.EAnnotationParserImporter.removeCommentLines(EAnnotationParserImporter.java:172)
>> at org.eclipse.emf.teneo.annotations.parser.EAnnotationParserImporter.process(EAnnotationParserImporter.java:163)
>> at
>> org.eclipse.emf.teneo.annotations.parser.EAnnotationParserImporter.processAnnotatedModelElement(EAnnotationParserImporter.java:97)
>>
>> at org.eclipse.emf.teneo.annotations.parser.EAnnotationParserImporter.process(EAnnotationParserImporter.java:75)
>> at org.eclipse.emf.teneo.annotations.parser.EAnnotationParserImporter.process(EAnnotationParserImporter.java:68)
>> at org.eclipse.emf.teneo.annotations.mapper.PersistenceMappingBuilder.buildMapping(PersistenceMappingBuilder.java:142)
>> at org.eclipse.emf.teneo.annotations.mapper.PersistenceMappingBuilder.buildMapping(PersistenceMappingBuilder.java:64)
>> at org.eclipse.emf.teneo.hibernate.mapper.GenerateHBM.createORMapperFile(GenerateHBM.java:112)
>> at org.eclipse.emf.teneo.hibernate.mapper.GenerateHBM.main(GenerateHBM.java:82)
>
>
> Versions:
> EMF SDK 2.7.2
> EMF Teneo Hibernate 1.2.0
> Hibernate 3.6.0
> javax persistence 2.0.1
--
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][Hibernate] [message #827734 is a reply to message #827502] |
Fri, 23 March 2012 18:32 |
Martin Taal Messages: 5468 Registered: July 2009 |
Senior Member |
|
|
Hi Ludwig,
Not sure why this exception happens, but normally I would not recommend using the GenerateHBM class for this. It is used
in eclipse ide/plugin environments.
Did you see this:
http://wiki.eclipse.org/Teneo/Hibernate/EMF_Hibernate_Integration_Details#Manual_Generation_of_OR_Mapping
Or better create a datastore, initialize it and then call getMappingXML on the datastore. But in any case most of the
time you don't the mapping xml at all. Just let Teneo do it in memory at runtime, as is shown here:
http://wiki.eclipse.org/Teneo/Hibernate/QuickStart
gr. Martin
On 03/23/2012 01:14 PM, Ludwig Moser wrote:
> sorry for the short throw in.
>
> some very nice guy told me that teneo with eclipselink does not create annotations, so i switched to teneo with hibernate.
> i still have my EMF ecore model and try to generate the mapping for this model.
>
> while executing the generate stuff i encounter the exception above.
> i am not sure if i do anything right, because i cannot find any working step by step examples or better tutorials.
>
> i tried to download an example of you via GIT, but somehow my eclipse cant receive data (probably blocked by our
> hardware firewall)
> so i tried to download each and every single file by rightclick saveas but also this failed, as eclipse says opening
> project but hangs at 4%.
>
> probably thats why i lost my patience and threw in this post too fast...
>
> sorry :)
--
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.03263 seconds