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
|