Hi, i am a newbie to the hibernate and i have a mapping xml file. what i want is to generate a pojo(setter-getter) file from the given mapping file through Ant Task.i tries to implement the following code but i got the following error:- BUILD FAILED java.lang.NoClassDefFoundError: org/hibernate/cfg/Configuration
My Build.xml is:-
<project name="new" basedir="." > <path id=" C:\dot\new\src\lib"> <path location="C:/dot/new/lib/hibernate-tools.jar" /> </path> <taskdef name="hibernatetool" classname="org.hibernate.tool.ant.HibernateToolTask" classpathref=" C:\dot\new\src\lib" /> <target name="gen_hibernate" description="generate hibernate classes"> <hibernatetool destdir="src"> <configuration configurationfile="hibernate.cfg.xml"/> <hbm2java jdk5="true"/> </hibernatetool> </target> </project>
My directory structure is as follows:- new |-src | |-build.xml | |-hibernate.cfg.xml | |-mapping file |-lib |-gen_hibernate
i hv all my jars in lib folder.
Please respond.................eagerly waiting, Thanks in advance Paramita
|