错误场景

最近搞一个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

hibernate反向生成奇葩错误的更多相关文章

  1. idea中Hibernate反向生成工具

    HIbernate反向生成工具 1.使用idea数据库集成工具连接所需数据库 第一步 View-->Tool windows---->Database 第二步 找到所需连接的数据库 第三步 ...

  2. Snail—Hibernate反向生成实体类及配置文件

    今天学习了Hibernate的反向生成类文件 第一步.打开myeclipse中的database视图,找到对应的表,选中后右键单击. watermark/2/text/aHR0cDovL2Jsb2cu ...

  3. hibernate反向生成

    1.在Myeclipse Database Explore中创建一个库的链接. 2.在Myeclipse中创建一个web工程,添加反向生成相关的引用.即在项目上右键,弹出Myeclipse选择add  ...

  4. hibernate 反向生成 实体类

    1,配置数据库连接 步骤. 点击    windows   -> open perspective  - >   myeclipse datebase  Exprorer 打开了dateb ...

  5. idea下的hibernate反向生成插件

    阅读目录 1. 打开 DataBase 窗口,添加数据源 2. 添加 hibernate 持久层支持,生成实体 Bean /配置文件 谈起 Hibernate 应该得知道 Gavin King 大叔, ...

  6. 【IntelliJ Idea】idea下hibernate反向生成工具,根据数据表生成实体

    idea插件很齐全,不像ecplise一样.所以直接来步骤吧: 1.选择项目,右键-->Add Frameworks Support-->勾选Hibernate-->勾选Import ...

  7. hibernate反向生成映射文件报错

    报错原因:可能是你的数据库里的某个表没设置主键.

  8. Intellij Idea反向生成Hibernate实体类

    每次根据数据库的表反向生成实体类老不记得步骤...脑子不够用,这里特意记录一下.碰到的问题也及时更新到这里来. 1. 工程添加Hibernate支持 两种方式: 第一种:工程上右键选择 "A ...

  9. 反向生成hibernate实体类和映射文件

    工欲善其事,必先利其器.我们可以使用IDE来根据数据库中的表反向生成实体类和映射文件,虽然这些东西手写也并不是难度很大,但是如果存在大量的简单工作需要我们做,也会显得很麻烦. 写在前面 我们反向生成的 ...

随机推荐

  1. 前端 velocity(.vm)模板里写ajax出现解析异常

    异常信息:Caused by: org.apache.velocity.exception.ParseErrorException: Encountered "{" at dist ...

  2. 2017.11.17 Demo-stm8+temperature timeing control

    1Find the lab and add in project. Downtown  it from ST  official website..compile it to ensure it pa ...

  3. js 取任意两个数之间的随机整数

    function getRandomInt(min, max) { min = Math.ceil(min); max = Math.floor(max); return Math.floor(Mat ...

  4. Leetcode 589. N-ary Tree Preorder Traversal

    DFS,两种实现方式,递归和栈. """ # Definition for a Node. class Node: def __init__(self, val, chi ...

  5. Windows上包管理器之Chocolatey初体验

    一直使用Windows开发项目,前段时间使用了一段时间的macOS,感觉使用homebrew和npm去安装一些常用的包真的是方便啊,最近又使用回Windows,由于电脑比较新,发现里面连Git都没有, ...

  6. bzoj 3173 最长上升子序列

    Written with StackEdit. Description 给定一个序列,初始为空.现在我们将\(1\)到\(N\)的数字插入到序列中,每次将一个数字插入到一个特定的位置.每插入一个数字, ...

  7. LA3890 Most Distant Point from the Sea

    题意 PDF 分析 可以二分答案,检验就用半平面交,如果平面非空则合法. 时间复杂度\(O(T n \log^2 n)\) 代码 #include<iostream> #include&l ...

  8. 洛谷 P1312 Mayan游戏

    题解:搜索+模拟 剪枝: 最优性剪枝:x从小到大,y从小到大,第一次搜到的就是字典序最小 的最优解. 最优性剪枝:把一个格子和左边格子交换,和左边格子和右边格 子交换是等价的,显然让左边格子和右边交换 ...

  9. CoreDNS kubernetes 安装使用

     kubernetes 以前是skydns 后面变为 dnsmasq,coredns 也是一个不错的工具 1. 准备环境 安装 kubernetes 配置 kubelet 的cluster-dns 2 ...

  10. SublimeText3常用插件安装与使用

    packagecontroller的安装 https://packagecontrol.io/ 安装了它就可以更好的进行插件的安装和管理 复制代码,打开控制面板[ctrl+·]将代码拷贝,即可进行安装 ...