关闭

在hibernate-extensions中使用hbm2java出错

标签: javahibernate
1606人阅读 评论(2) 收藏 举报
分类:

Caused by:
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.executeSortedTargets(Project.java:1216)
 at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
 at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
 at org.eclipse.ant.internal.ui.antsupport.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
 at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
 at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run(InternalAntRunner.java:423)
 at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.main(InternalAntRunner.java:137)

 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.executeSortedTargets(Project.java:1216)
 at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
 at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
 at org.eclipse.ant.internal.ui.antsupport.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
 at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
 at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run(InternalAntRunner.java:423)
 at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.main(InternalAntRunner.java:137)

愿因是使用的hibernate版本为3.1,而hibernate3的pachage已经变成了org.hibernate,但是在hibernate-extensions-2.1.3的hibernate-tools.jar中类文件所引用的仍是net.sf.hibernate.。

0
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:58200次
    • 积分:632
    • 等级:
    • 排名:千里之外
    • 原创:8篇
    • 转载:15篇
    • 译文:0篇
    • 评论:5条
    文章分类
    最新评论