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 至最新版本.
随机推荐
- echart参数设置——曲线图
{ title: { text: '请求返回码分布', subtext: '实时数据' }, tooltip: { trigger: 'axis', position: function (point ...
- nginx 配置简单网站项目(linux下)
1.新建html2与html3两个网站项目测试,而html是本身就有,记得到/etc/hosts 添加dns记录 2.修改nginx.conf文件 3.测试访问 中间用到一些nginx的命令,就不截图 ...
- MySQL参数log_bin_trust_function_creators介绍-存储过程和复制
MySQL的有个参数log_bin_trust_function_creators,官方文档对这个参数的介绍.解释如下所示: log_bin_trust_function_creators Comma ...
- windows任务管理器怎么知道多个IIS网站进程分别对应哪个网站
摘要: 1.IIS网站对应的进程名一般叫w3wp.exe (windows2008系统为例,其他类似) 2.windows默认的任务管理器只能看到多个同名的进程名w3wp.exe,没法区别分别对应哪个 ...
- Linux之删除带有空格的文件(而不是目录)
大家平时工作中对不带空格的文件接触较多.这样一来删除操作也是比较简单的.但是有时我们会接触带有空格的文件.对于这种文件我们应该如何删除呢? 首先我们演示一下find命令结合xargs命令删除不带空格的 ...
- 使用sstream来进行类型转换
在某种情况下,我们不得不进行整型等数据类型与字符串类型的转换,比如,将“1234”转换为整数,常规的我们可以使用atoi函数来进行转换,或者是写一个循环来做转换,我们在这里也可以使用sstream类来 ...
- css实现不定高度的元素垂直居中问题
<!DOCTYPE html> <html> <head lang="en"> <meta charset="UTF-8&quo ...
- 让你提前认识软件开发(31):数据库脚本中的begin与end
版权声明:本文为博主原创文章.对文章内容有不论什么意见或建议,欢迎与作者单独交流.作者QQ(微信):245924426. https://blog.csdn.net/zhouzxi/article/d ...
- 转://批量更新sequence的存储
前言: ORACLE的序列(SEQUENCE)A SCHEMA OBJECT THAT GENERATES A SERIAL LIST OF UNIQUE NUMBERS FOR TABLE COLU ...
- blinker语音控制Arduino/esp8266开关灯-滑动条使用-文本框交互
总链接: https://www.arduino.cn/thread-78393-1-1.html 语音控制:https://doc.blinker.app/?file=005-App%E4%BD% ...