您的位置:首页 > 其它

hibernate反向生成奇葩错误

2016-04-28 22:45 651 查看

错误场景

最近搞一个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 class
Received 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
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: