-->
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.  [ 1 post ] 
Author Message
 Post subject: build.xml error org/hibernate/tool/ant/HibernateToolTask
PostPosted: Mon May 06, 2013 12:25 am 
Newbie

Joined: Mon May 06, 2013 12:06 am
Posts: 1
i m a beginner in hibernte. I m trying to build a basic hib progrm with Ant build. i m using hib 3.6.10 ,jboss tools 3.2.2 and apache ant 1.9.0


I get the below error:

E:\hiber\Hib_2\build.xml:21: taskdef A class needed by class org.hibernate.tool.ant.EnversHibernateToolTask cannot be found: org/hibernate/tool/ant/HibernateToolTask
using the classloader AntClassLoader

what could be the possible error? below are my build.xml and build.prop files.

Could anyone help on this? also, i am not sure what path (absolute or relative? if relative, relative to which directory?) to give in build.properties file.

build.xml:

<project name="sample">
<property file="build.properties"/>
<property name="src" location="src"/>
<property name="bin" location="bin"/>
<property name="sql" location="sql"/>
<property name="hibernate.tools" value="${hibernate.tools.home}${hibernate.tools.path}"/>
<path id="classpath.base">
<pathelement location="${src}"/>
<pathelement location="${bin}"/>
<pathelement location="${hibernate.home}/hibernate3.jar"/>
<fileset dir="${hibernate.home}/lib" includes="**/*.jar"/>
<pathelement location="${hsql.home}/lib/hsqldb.jar"/>
</path>
<path id="classpath.tools">
<path refid="classpath.base"/>
<pathelement
location="${hibernate.tools}/hibernate-tools.jar"/>
</path>
<taskdef name="htools"
classname="org.hibernate.tool.ant.EnversHibernateToolTask"
classpathref="classpath.tools"/>
<target name="exportDDL" depends="compile">
<htools destdir="${sql}">
<classpath refid="classpath.tools"/>
<configuration
configurationfile="${src}/hibernate.cfg.xml"/>
<hbm2ddl drop="true" outputfilename="sample.sql"/>
</htools>
</target>
<target name="compile">
<javac srcdir="${src}" destdir="${bin}" classpathref="classpath.base"/>
</target>
<target name="populateMessages" depends="compile">
<java classname="sample.PopulateMessages" classpathref="classpath.base"/>
</target>
......
...

build.properties:

hibernate.home=E:/hib_jars/hibernate-distribution-3.6.10.Final

hibernate.tools.home= E:/hib_jars/jbosstools-3.2.2.Final.aggregate-Update-2011-11-14_23-06-23-H1430

hibernate.tools.path=/plugins/org.hibernate.eclipse.libs_3.6.0.Final-v20130327-1513-B111/lib/tools/

hsql.home=E:/hib_jars


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

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.