hibernate反向生成奇葩错误
错误场景
最近搞一个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
最后参照了如下文章才得以解决