Joined: Fri May 20, 2005 5:30 pm Posts: 9
|
Hi,
I'm having an error when I tried to use the tool hbm2java.
I've created a target in ant and here's the result :
The target :
<path id="hibernate.tools.classpath">
<pathelement path="${hibernate.tools.dir}/hibernate-tools.jar"/>
<pathelement path="${hibernate.tools.dir}/lib/jdom.jar"/>
<pathelement path="${hibernate.tools.dir}/lib/velocity-1.3.1.jar"/>
<fileset dir="${hibernate.dir}/lib">
<include name="**/*.jar"/>
</fileset>
</path>
<target name="hbm2java"
description="Generate .java from .hbm files.">
<taskdef name="hbm2java"
classname="net.sf.hibernate.tool.hbm2java.Hbm2JavaTask"
classpathref="hibernate.tools.classpath"/>
<hbm2java config="${config.dir}/hibernate/hbm2java.xml"
output="${javasource.dir}/java">
<fileset dir="${javasource.dir}">
<include name="**/*.hbm.xml"/>
</fileset>
</hbm2java>
</target>
The error :
java.lang.NoClassDefFoundError: net/sf/hibernate/MappingException
at
net.sf.hibernate.tool.hbm2java.Hbm2JavaTask.processFile(Hbm2JavaTask.java:145)
at
net.sf.hibernate.tool.hbm2java.Hbm2JavaTask.execute(Hbm2JavaTask.java:93)
at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
at org.apache.tools.ant.Task.perform(Task.java:364)
at org.apache.tools.ant.Target.execute(Target.java:341)
at org.apache.tools.ant.Target.performTasks(Target.java:369)
at org.apache.tools.ant.Project.executeTarget(Project.java:1214)
at org.apache.tools.ant.Project.executeTargets(Project.java:1062)
at
org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run(InternalAntRunner.java:377)
at
org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.main(InternalAntRunner.java:135)
at
net.sf.hibernate.tool.hbm2java.Hbm2JavaTask.processFile(Hbm2JavaTask.java:149)
at
net.sf.hibernate.tool.hbm2java.Hbm2JavaTask.execute(Hbm2JavaTask.java:93)
at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
at org.apache.tools.ant.Task.perform(Task.java:364)
at org.apache.tools.ant.Target.execute(Target.java:341)
at org.apache.tools.ant.Target.performTasks(Target.java:369)
at org.apache.tools.ant.Project.executeTarget(Project.java:1214)
at org.apache.tools.ant.Project.executeTargets(Project.java:1062)
at
org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run(InternalAntRunner.java:377)
at
org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.main(InternalAntRunner.java:135)
Your help would be appreciate.
M_A
|
|