• 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
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

Error with XDoclet In Hibernate

 
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear All,


I am getting error while i am generating .hbm.xml files using XDoclet.

This is the error i am getting

D:\suneel\databasework\LoginApp\WEB-INF\build.xml:41: Couldn't find the class xdoclet.modules.web.WebDocletTask on the classpath:

My build.xml file is


<project name="loginapp" basedir="." default="main">

<property name="src.dir" value="src"/>
<property name="springconf.files" value="src"/>
<property name="build.dir" value="build"/>
<property name="classes.dir" value="${build.dir}/classes"/>
<property name="jar.dir" value="${build.dir}/jar"/>
<property name="lib.dir" value="lib/xdoclet"/>
<property name="generated.home" value="generated.home"/>

<target name="compile" description="Generates class files">
<echo message="builiding classes"/>
<mkdir dir="${classes.dir}"/>
<javac srcdir="${src.dir}" destdir="${classes.dir}" classpathref="classpath"/>
</target>



<target name="generate"
description="Generates Hibernate class descriptor files."
depends="compile">
<echo message="Generates Hibernate class descriptor files."/>
<!-- Define the hibernatedoclet task -->
<taskdef name="hibernatedoclet"
classname="xdoclet.modules.hibernate.HibernateDocletTask">

<classpath>

<fileset dir="${lib.dir}/">
<include name="*.jar"/>
</fileset>
</classpath>
</taskdef>
<echo message="after Generates Hibernate class descriptor files."/>
<!-- Execute the hibernatedoclet task -->
<hibernatedoclet
destdir="${generated.home}"
excludedtags="@version,@author,@todo"
force="${generate.forced}"
mergedir="${generated.home}">
<echo message="Generates Hibernate doclet."/>
<fileset dir="${src.dir}">
<include name="**/com/itc/example/business/*.java"/>
</fileset>

<hibernate version="3.1"/>
</hibernatedoclet>

<!-- Upgrade grammar from Hibernate1 to Hibernate2 - not needed if you are using the <hibernate version="2.0"/> tag -->
<replace dir="${generated.home}" echo="building xml">

<include name="**/hibernate/*.hbm.xml"/>
<replacefilter token="readonly=" value="inverse="/>
<replacefilter token="role=" value="name="/>
<replacefilter token="hibernate-mapping.dtd" value="hibernate-mapping-2.0.dtd"/>
</replace>
<target name="file-list"
description="Create hibernate mapping file list">
<property name="generated.dir" location="target/classes"/>
<property name="hibernate.list.file" location="hbnfiles.xml"/>
<script language="beanshell" src="create_hbnfiles.bsh"/>
</target>
</target>
<path id="classpath">
<fileset dir="${lib.dir}/" includes="**/*.jar"/>
<path location="${springconf.files}"/>
</path>


<target name="clean">
<delete dir="${build.dir}"/>
</target>
<target name="main" depends="generate"/>
</project>


Can anybody help me to solve this problem..


Advance thanks to all

Regards
SuneelKota
 
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i think it a ant problem your classpath is wrong


try




but be sure that xdoclet file are well placed there
<property name="lib.dir" value="${base}/lib/xdoclet"/>
[ July 07, 2006: Message edited by: Benjamin Leonard ]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic