-->
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: HibernateToolTask: NoSuchMethodError
PostPosted: Sun Aug 28, 2005 11:36 am 
Regular
Regular

Joined: Tue May 24, 2005 9:06 am
Posts: 64
Hibernate version: 3.1beta1
Hibernate version: 3.1.0alpha5
Name and version of the database you are using: MySQL 5.0.11

The following Ant task yields a NoSuchMethodErrorException:

<taskdef name="hibernatetool"
classname="org.hibernate.tool.ant.HibernateToolTask"
classpathref="hibernateToolTask.classpath"/>

<hibernatetool destdir="${mysql.dir}">
<annotationconfiguration configurationfile="${hibernate.cfg.xml}"/>
<hbm2ddl drop="false" outputfilename="createTables.gen.sql"/>
</hibernatetool>

Full stack trace of any exception that occurs:
java.lang.NoSuchMethodError: org.hibernate.tool.hbm2ddl.SchemaExport.setFormat(Z)Lorg/hibernate/tool/hbm2ddl/SchemaExport;
at org.hibernate.tool.ant.Hbm2DDLGeneratorTask.execute(Hbm2DDLGeneratorTask.java:46)
at org.hibernate.tool.ant.HibernateToolTask.execute(HibernateToolTask.java:122)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
at org.apache.tools.ant.Task.perform(Task.java:364)
at org.apache.tools.ant.Target.execute(Target.java:341)
at org.apache.tools.ant.Target.performTasks(Target.java:369)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
at org.apache.tools.ant.Main.runBuild(Main.java:668)
at org.apache.tools.ant.Main.startAnt(Main.java:187)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)


Top
 Profile  
 
 Post subject:
PostPosted: Sun Aug 28, 2005 2:57 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
use the hibernate 3.1 .jar from the tools....

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 29, 2005 12:37 am 
Regular
Regular

Joined: Tue May 24, 2005 9:06 am
Posts: 64
Now Ant produces this error message:

[hibernatetool] 1. task: hbm2ddl (Generates database schema)
BUILD FAILED
java.lang.NoSuchMethodError: org.hibernate.cfg.Mappings.<init>(Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/List;Ljava/util/List;Lorg/hibernate/cfg/NamingStrategy;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;)V


Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 29, 2005 1:17 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
using annotations with the tools has a bug - you will need to build the cvs version of annotations (see other topics that has done this)

_________________
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.