-->
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: Hibernate tolls error
PostPosted: Fri May 20, 2005 5:34 pm 
Newbie

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}/h­ibernate-tools.jar"/>
<pathelement path="${hibernate.tools.dir}/l­ib/jdom.jar"/>
<pathelement path="${hibernate.tools.dir}/l­ib/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.to­ol.hbm2java.Hbm2JavaTask"
classpathref="hibernate.tools.­classpath"/>
<hbm2java config="${config.dir}/hibernat­e/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/MappingExcept­ion
at
net.sf.hibernate.tool.hbm2java­.Hbm2JavaTask.processFile(Hbm2­JavaTask.java:145)
at
net.sf.hibernate.tool.hbm2java­.Hbm2JavaTask.execute(Hbm2Java­Task.java:93)
at
org.apache.tools.ant.UnknownEl­ement.execute(UnknownElement.j­ava:275)
at org.apache.tools.ant.Task.perf­orm(Task.java:364)
at org.apache.tools.ant.Target.ex­ecute(Target.java:341)
at org.apache.tools.ant.Target.pe­rformTasks(Target.java:369)
at org.apache.tools.ant.Project.e­xecuteTarget(Project.java:1214­)
at org.apache.tools.ant.Project.e­xecuteTargets(Project.java:106­2)
at
org.eclipse.ant.internal.ui.an­tsupport.InternalAntRunner.run­(InternalAntRunner.java:377)
at
org.eclipse.ant.internal.ui.an­tsupport.InternalAntRunner.mai­n(InternalAntRunner.java:135)


at
net.sf.hibernate.tool.hbm2java­.Hbm2JavaTask.processFile(Hbm2­JavaTask.java:149)
at
net.sf.hibernate.tool.hbm2java­.Hbm2JavaTask.execute(Hbm2Java­Task.java:93)
at
org.apache.tools.ant.UnknownEl­ement.execute(UnknownElement.j­ava:275)
at org.apache.tools.ant.Task.perf­orm(Task.java:364)
at org.apache.tools.ant.Target.ex­ecute(Target.java:341)
at org.apache.tools.ant.Target.pe­rformTasks(Target.java:369)
at org.apache.tools.ant.Project.e­xecuteTarget(Project.java:1214­)
at org.apache.tools.ant.Project.e­xecuteTargets(Project.java:106­2)
at
org.eclipse.ant.internal.ui.an­tsupport.InternalAntRunner.run­(InternalAntRunner.java:377)
at
org.eclipse.ant.internal.ui.an­tsupport.InternalAntRunner.mai­n(InternalAntRunner.java:135)


Your help would be appreciate.
M_A


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.