hibernate 解决 java.lang.NoClassDefFoundError: org/hibernate/cfg/Configuration
You're getting the error because the hibernate libraries are not available to Tomcat. In your picture, below the hibernate library set there is an empty set called 'Web App Libraries' - this is the set your hibernate libraries need to be in.
Right click your project -> Build Path -> Configure Build Path, and remove the hibernate set from the build path. Now import the jars into the WEB-INF/lib folder. Refresh your project and now you should see them listed in the 'Web App Libraries' set (i appreciate this is somewhat annoying that you have to import them into your code base - someone else might know a better way to do this that doesn't involve copying the jars in)
这里要put into lib 一下(虽然以前不put影响的也只是打war包后的项目,没想到这里居然会导致找不到hibernate的jar包,以后只要有新包引入,一定会第一时间put into lib 进去)
然后再测试功能,功能正常

hibernate 解决 java.lang.NoClassDefFoundError: org/hibernate/cfg/Configuration的更多相关文章
- hibernate 解决 java.lang.NoClassDefFoundError: Could not initialize class org.hibernate.validator.internal.engine.xxx 这类的问题
<!-- 解决 java.lang.NoClassDefFoundError: Could not initialize class org.hibernate.validator.intern ...
- java.lang.NoClassDefFoundError: org/hibernate/cfg/Configuration解决方法
Autowiring of fields failed; nested exception is...........Error creating bean with name 'siteOperat ...
- Caused by: java.lang.NoClassDefFoundError: org/hibernate/cfg/Configuration
1.错误描述 usage: java org.apache.catalina.startup.Catalina [ -config {pathname} ] [ -nonaming ] { -help ...
- java.lang.NoClassDefFoundError: org/hibernate/cfg/Configuration
java.lang.NoClassDefFoundError: org/hibernate/cfg/Configuration 最近在做项目的时候遇到了这个问题,很是困扰,多次尝试后发现是jar包的问 ...
- 解决Could not open Hibernate Session for transaction; nested exception is java.lang.NoClassDefFoundError: org/hibernate/engine/transaction/spi/TransactionContext
我使用的是5.2.8的hibernate的jar包,运行的时候却报错Could not open Hibernate Session for transaction; nested exception ...
- java.lang.NoClassDefFoundError: org/hibernate/service/ServiceRegistry] 类似问题
使用Hibernate时出现以上错误,在Java Project中运行无误,但是来到Dynamic Web Project中却出现了如下错误: hibernate 报错:java.lang.NoCla ...
- java.lang.NoClassDefFoundError: org/hibernate/validator/internal/engine/DefaultClockProvider
①在springboot的spring-boot-starter-web默认引入了以下依赖: <dependency> <groupId>com.fasterxml.jacks ...
- java.lang.NoClassDefFoundError: org/hibernate/QueryTimeoutException
在做ssh整合的时候报错:java.lang.NoClassDefFoundError: org/hibernate/QueryTimeoutException org.springframework ...
- 解决java.lang.NoClassDefFoundError: org.jdom.Content
报错:java.lang.NoClassDefFoundError: org.jdom.Content 解决办法: 更新lib目录下的jdom.jar 至最新版本.
随机推荐
- Java:匿名类,匿名内部类
本文内容: 内部类 匿名类 首发日期 :2018-03-25 内部类: 在一个类中定义另一个类,这样定义的类称为内部类.[包含内部类的类可以称为内部类的外部类] 如果想要通过一个类来使用另一个类,可以 ...
- drop all database objects
/*Use this sql to drop all objects in a database.*/ -- Drop all SPdeclare @dropSp varchar(max)=''sel ...
- CSS| 框模型-輪廓
轮廓(outline)是绘制于元素周围的一条线,位于边框边缘的外围,可起到突出元素的作用.CSS outline 属性规定元素轮廓的样式.颜色和宽度. 相關屬性 outline-color 属性 ou ...
- Linux删除文件实现回收站功能
转载于 https://blog.csdn.net/u014057054/article/details/52126494 从事过服务器维护的人都知道rm.rm -rf 的厉害,执行起来一点也不马虎, ...
- 第3章 Git使用人门
[初识Github] 首先让我们大家一起喊一句“Hello Github”.YEAH!就是这样. Git是一个分布式的版本控制系统,最初由Linus Torvalds编写,用作Linux内核代码的管理 ...
- MATLAB矩阵的LU分解及在解线性方程组中的应用
作者:凯鲁嘎吉 - 博客园http://www.cnblogs.com/kailugaji/ 三.实验程序 五.解答(按如下顺序提交电子版) 1.(程序) (1)LU分解源程序: function [ ...
- 阿里八八β阶段Scrum(3/5)
今日进度 叶文滔: 添加了侧边栏调用数据库用户名的功能,因为对Navigation View的不熟悉,走了很多弯路,尝试了三种方法才成功调用. 俞鋆: 研究了几个图像识别的api,最终决定使用ocr. ...
- RBAC权限管理系统数据模型
懒得多写了,懂的看建表脚本就懂了... -- ---------------------------- -- Table structure for ucb_user -- ------------- ...
- c++引用lib和dll的方法总结
C++ 调用.lib的方法: 一: 隐式的加载时链接,有三种方法 1 LIB文件直接加入到工程文件列表中 在VC中打开File View一页,选中工程名,单击鼠标右键,然后选中"Add F ...
- js对象属性与Bom
1JavaScript 的对象 1.1字符串 1.2Array对象 1.3Date对象 1.4Math对象 1.5Function对象(重点) 2 Bom对象 1 JavaScript对象 在Ja ...