-->
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: HBM2JAVA for Hibernate3
PostPosted: Mon Jan 08, 2007 6:33 am 
Newbie

Joined: Mon Jan 08, 2007 6:25 am
Posts: 6
Hi All,

So i downloaded Hibernate3 and Hibernate-Tools-3.2.0.beta8 (from which i extracted hibernate-tools.jar), and when i try to compile i get the following error:

Quote:
Could not create type hbm2java due to java.lang.NoSuchMethodException: org.hibernate.tool.ant.Hbm2JavaExporterTask.<init>(org.apache.tools.ant.Project)



my ant file looks like this:

Code:
<taskdef name="hbm2java"
             classname="org.hibernate.tool.ant.Hbm2JavaExporterTask"
             classpathref="project.class.path"/>
   
    <!-- Generate the java code for all mapping files in our source tree -->
    <target name="codegen" description="Generate Java source from the O/R mapping files">
      
       <hbm2java output="${source.root}">
          <fileset dir="${source.root}">
              <include name="**/*.hbm.xml"/>
           </fileset>         
       </hbm2java>
      
    </target>


I think its something within the libraries i'm doing wrong..but can't figure it out. Can anyone please give me a clear guide on what to do?!

Best Regards
NickyF


Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate version:

Mapping documents:

Code between sessionFactory.openSession() and session.close():

Full stack trace of any exception that occurs:

Name and version of the database you are using:

The generated SQL (show_sql=true):

Debug level Hibernate log excerpt:


Problems with Session and transaction handling?

Read this: http://hibernate.org/42.html

Quote:


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 08, 2007 8:47 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
maybe you are using some old ant version.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 08, 2007 9:04 am 
Newbie

Joined: Mon Jan 08, 2007 6:25 am
Posts: 6
I'm currently using apache-ant1.6.5


Thanks
Nicik


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 08, 2007 9:07 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
please show the full stacktrace then.

(and do verify you don't have duplicate incompatible jars on the classpath)

_________________
Max
Don't forget to rate


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.