hibernate反向生成奇葩错误

来源:互联网 发布:淘宝网手套 编辑:程序博客网 时间:2024/05/01 02:00

错误场景

最近搞一个hibernate的项目,由于好久不用hibernate了,稍微有点生疏(自从用了ibatis–>mybatis后)。这个项目用了hibernate,和ibatis、mybatis一样都会遇到反向生成的问题,具体步骤参照这位小哥的,虽然有的地方根据描述找了好久才找到,但是整体还是能用。地址如下
http://jingyan.baidu.com/article/624e745955aa9534e8ba5ab4.html

错误描述

因为中间改了一个地方如下图蓝框中的部分,将默认的3.5改为了3.6(因为项目中的包用的是3.6的)
这里写图片描述
结果执行最后生成文件的时候就报了如下错误
这里写图片描述

org.hibernate.console.HibernateConsoleRuntimeException: Received a NoClassDefFoundError, probably the console configuration classpath is incomplete or contains conflicting versions of the same classReceived a NoClassDefFoundError, probably the console configuration classpath is incomplete or contains conflicting versions of the same class  java.lang.NoClassDefFoundError: Could not initialize class org.hibernate.cfg.reveng.OverrideRepository  Could not initialize class org.hibernate.cfg.reveng.OverrideRepository    java.lang.NoClassDefFoundError: Could not initialize class org.hibernate.cfg.reveng.OverrideRepository    Could not initialize class org.hibernate.cfg.reveng.OverrideRepository

最后参照了如下文章才得以解决
http://zhidao.baidu.com/link?url=USTwauWp5FiL-7r_iQKC7Tj0tpuWmnImdNOEBuIU2VEYiY_0ooI7yACIDFkazwzitgBsawB6WGAdG_WH2-g4Ta

0 0
原创粉丝点击