-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 
Author Message
 Post subject: Can't get hbm2java to work!
PostPosted: Sun Nov 20, 2005 9:54 am 
Newbie

Joined: Sun Nov 20, 2005 9:32 am
Posts: 2
Hi all,

I just created a new project using Hibernate3 and added the latest Hibernate Tools to it. I followed the instruction on installing them and how to use the hbm2java subtask in Ant. When running my gode-gen ant task I always run into an Exception.

Exception:

SCHWERWIEGEND: Method needsEqualsHashCode threw exception for reference $pojo in template pojo/PojoEqualsHashcode.vm at [1,5]
20.11.2005 14:14:21 org.apache.velocity.tools.generic.log.CommonsLogLogSystem logVelocityMessage
SCHWERWIEGEND: Method get threw exception for reference $templates in template pojo/Pojo.vm at [17,1]
org.hibernate.tool.hbm2x.ExporterException: MethodInvocationException while processing template Pojo. Invocation of method 'get' in class org.hibernate.tool.hbm2x.TemplateHelper$Templates threw exception class org.hibernate.tool.hbm2x.ExporterException : MethodInvocationException while processing template pojo/PojoEqualsHashcode.vm. Invocation of method 'needsEqualsHashCode' in class org.hibernate.tool.hbm2x.pojo.EntityPOJOClass threw exception class java.lang.NoSuchMethodError : org.hibernate.mapping.Property.isNaturalIdentifier()Z


The rest of the stack trace is a little much to post. So, can anybody help me with that???

Thanks,

Kimba


Top
 Profile  
 
 Post subject:
PostPosted: Sun Nov 20, 2005 10:04 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
use the hibernate that comes with the tools for your ant task.
(the code generator is dependent on 3.1 code)

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 21, 2005 4:49 am 
Beginner
Beginner

Joined: Mon Jan 24, 2005 11:56 am
Posts: 24
Hi,

Go to your eclipse plug-in folder and find the org.hibernate.eclipse_XXX folder. There is a lib folder in it use jars in this folder.
If you install Ecplise on f:\eclise and use HibernateTool 3.1.0 beta 1 then the path will look like this:

F:\eclipse\plugins\org.hibernate.eclipse_3.1.0.beta1\lib\hibernate


Regrads,
Alireza Fattahi
--------------------------
Please rate if it helped!


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 22, 2005 10:17 pm 
Newbie

Joined: Mon Nov 21, 2005 11:18 pm
Posts: 6
Thanks Max... I was running into the same exact problem as Kimba74 and then I used the hibernate3.jar file within

/HibernateTools-3.1.0.beta1 Folder/plugins/org.hibernate.eclipse_3.1.0.beta1/lib/hibernate

And the hbm2java works like a charm now!

Thank you!


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.