-->
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: Generating pojo files from mapping xml file using Ant Task.
PostPosted: Fri Nov 20, 2009 12:57 pm 
Newbie

Joined: Fri Nov 20, 2009 12:40 pm
Posts: 4
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


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.