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 至最新版本.
随机推荐
- The packaging and installation process of Android programs
D:\android\adt-bundle-windows-x86-20131019\sdk\platform-tools工具的路径. 安卓工程经过eclipse编译然后通过aapt工具打包生成一个. ...
- gitlab-ci的注意点
在使用gitlab搭配gitlab-runner进行ci配置时,发现两个问题,略记如下备忘: 1. 若发现ci job控制台显示无法下载该项目,但当前提交代码人和ci用户都确实具备该项目的访问权限时, ...
- Spring boot 入门篇
详见:https://www.cnblogs.com/ityouknow/p/5662753.html 什么是Spring Boot Spring Boot 是由 Pivotal 团队提供的全新框架, ...
- Android QMI机制
android QMI机制---概论 android QMI机制---QMUX android QMI机制---Qcril初始化流程 android QMI机制---QCRIL消息发送 android ...
- Windows 10更新后频繁死机、假死(SSD)
问题详情: 新版的Windows改变了更新策略,无法设置为不更新系统.在系统更新后,之前的部分设定也会神奇丢失,包括之前设定的解决的这个卡顿问题.于是重新爬文章找解决方案,在这里做个备份. 本文章内容 ...
- nginx、tomcat调优方向及压测网站步骤
nginx调优方向: 1.所用事件处理模型 2.进程数 3.每个进程的连接数 4.压缩 5.缓存 tomcat调优方向: 1.内存 2.总内存 3.初始申请内存 4.线程内存 5.GC方面 tomca ...
- ccf题库20170903--Json查询
题目如下: 试题编号: - 试题名称: JSON查询 时间限制: .0s 内存限制: .0MB 问题描述: 问题描述 JSON (JavaScript Object Notation) 是一种轻量级的 ...
- Linux 小知识翻译 - 「Linux和CPU的兼容性」
Linux刚开始是作为可运行在 Intel 的 「i386」CPU上,与POSIX兼容的内核来开发的. 而现在主流的Linux是指能在所谓「PC」上运行的内核.「PC」是指采用「IA(intel架构) ...
- 【HTTP缓存】浏览器缓存理论知识
时间:2016-12-12 17:51:30 作者: zhongxia 零.前言 这里主要写的是理论,具体实践的比较少,后期写一个实践教程,内容基本都是从参考文章里面抄过来的[看完文章,顺便写做下笔记 ...
- Ceph基础知识和基础架构认识
1 Ceph基础介绍 Ceph是一个可靠地.自动重均衡.自动恢复的分布式存储系统,根据场景划分可以将Ceph分为三大块,分别是对象存储.块设备存储和文件系统服务.在虚拟化领域里,比较常用到的是Cep ...