• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

hibernate-tools.jar

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Good afternoon in my timezone.

I already had seen a few posts with similar questions , but the answer to them don't correct my problem.

First of all i'm new in hibernate, and i'm trying to learn JPA to.
I'm reading the "java persistence with hibernate" book and doing the first exercise "Hello World" persisting the messages objects.
the build.xml file have the follow taskdef and target :

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

<target name="schemaexport" depends="build, copymetafiles"
description="Exports a generated schema to DB and file">
<hibernatetool destdir="${basedir}">
<classpath path="${build}"/>
<configuration configurationfile="${build}/hibernate.cfg.xml"/>
<hbm2ddl

update = "true"
create="true"
export="true"
outputfilename="message-ddl.sql"
delimiter=";"
format="true"/>
</hibernatetool>
</target>

when i run this in the command-line it throws the following error:
Taskdef A class needed by class org.hibernate.tool.ant.EnversHibernateToolTask cannot be found org/hibernate/tool/ant/HibernateToolTask

I think this class is defined in the hibernate-tools.jar, i had download hibernate-distribution-3.6.4.Final-dist.zip file but within this zip there is no such jar.
I already have seen posts anwers talking about a plugins folder , saying that jar is in this folder(plugins) , but there is no such folder inside that zip.
1) So where i can get this hibernate-tools.jar ?
2)Is the hibernate-tools.jar necessary, am i doing something wrong ?

I am a little desperate because i can not advance with that.

With the best regards.
 
I didn't do it. You can't prove it. Nobody saw me. The sheep are lying! This tiny ad is my witness!
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic