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 至最新版本. 
随机推荐
- Android中使用progurad混淆代码
			第一步,取消project.properties中关于progurad的注释,开启progurad,默认的配置文件会被加载进来. proguard.config=${sdk.dir}/tools/pr ... 
- MVP架构分析与搭建
			一个项目的核心就是架构 1.什么是MVP:MVP是一种项目架构设计模式. 其实MVP的本质就是将view和model完全隔离出来,通过Presenter (主持人) 统一调度管理. 
- Django 信息
			Request information USER admin GET No GET data POST No POST data FILES No FILES data COOKIES Variabl ... 
- EntityFramework Code-First 简易教程(八)-------一对一
			配置一对一(One-to-One)关系: 两个实体中,如果一个实体的一个实例与另一个实体相关,则我们就叫做一对一关系 查看如下代码: public class Student { public Stu ... 
- 转:SQL Server中服务器角色和数据库角色权限详解
			当几个用户需要在某个特定的数据库中执行类似的动作时(这里没有相应的Windows用户组),就可以向该数据库中添加一个角色(role).数据库角色指定了可以访问相同数据库对象的一组数据库用户. 数据库角 ... 
- mysql 临时数据突然变大
			晚上收到紧报警,一台数据库服务器磁盘空间使用快速从50%使用率到80%.我们生产的数据库都磁盘是>2T 登录机器发现*.myd文件异常大 登入数据库查询进程 mysql>showproce ... 
- sqlserver 拆分
			有表tb, 如下:id value----------- -----------1 aa,bb2 aaa,bbb,ccc欲按id,分拆value列, 分拆后结果如下:id value--------- ... 
- git svn 流程
			$ git svn clone http://192.168.10.208/svn/DeptDoc $ git svn rebase $ git commit -asm "svn tra ... 
- Alpha冲刺! Day9 - 砍柴
			Alpha冲刺! Day9 - 砍柴 今日已完成 晨瑶:继续补充gitkraken教程. 昭锡:实现主页基本布局. 永盛:进一步了解了框架,为框架生成的模型填充了假数据到数据库. 立强:文章模块基本实 ... 
- 变量计算——强制类型转换的js面试题
			console.log(1+"2"+"2"); console.log(1++"2"+"2"); console.log ... 
