参考:https://stackoverflow.com/questions/9851528/java-lang-noclassdeffounderror-org-hibernate-cfg-configuration/9853106

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的更多相关文章

  1. 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 ...

  2. java.lang.NoClassDefFoundError: org/hibernate/cfg/Configuration解决方法

    Autowiring of fields failed; nested exception is...........Error creating bean with name 'siteOperat ...

  3. Caused by: java.lang.NoClassDefFoundError: org/hibernate/cfg/Configuration

    1.错误描述 usage: java org.apache.catalina.startup.Catalina [ -config {pathname} ] [ -nonaming ] { -help ...

  4. java.lang.NoClassDefFoundError: org/hibernate/cfg/Configuration

    java.lang.NoClassDefFoundError: org/hibernate/cfg/Configuration 最近在做项目的时候遇到了这个问题,很是困扰,多次尝试后发现是jar包的问 ...

  5. 解决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 ...

  6. java.lang.NoClassDefFoundError: org/hibernate/service/ServiceRegistry] 类似问题

    使用Hibernate时出现以上错误,在Java Project中运行无误,但是来到Dynamic Web Project中却出现了如下错误: hibernate 报错:java.lang.NoCla ...

  7. java.lang.NoClassDefFoundError: org/hibernate/validator/internal/engine/DefaultClockProvider

    ①在springboot的spring-boot-starter-web默认引入了以下依赖: <dependency> <groupId>com.fasterxml.jacks ...

  8. java.lang.NoClassDefFoundError: org/hibernate/QueryTimeoutException

    在做ssh整合的时候报错:java.lang.NoClassDefFoundError: org/hibernate/QueryTimeoutException org.springframework ...

  9. 解决java.lang.NoClassDefFoundError: org.jdom.Content

    报错:java.lang.NoClassDefFoundError: org.jdom.Content 解决办法: 更新lib目录下的jdom.jar 至最新版本.

随机推荐

  1. Fiddler抓包使用教程-基本功能介绍

    转载请标明出处:http://blog.csdn.net/zhaoyanjun6/article/details/72932886 本文出自[赵彦军的博客] Fiddler 基本页面 会话列表功能介绍 ...

  2. (网页)20个JS 小技巧超级实用

    转自CSDN: 1. 将彻底屏蔽鼠标右键 oncontextmenu=”window.event.returnValue=false”< table border oncontextmenu=r ...

  3. android recovery代码修改之原生建议

    我们都知道recovery升级的时候,是根据升级脚本updater-script里面的函数,去一步步执行的,比如mount,format等相关的操作,有时候我们需要增加一些自己特殊的更新的接口,这时候 ...

  4. Modo教程合集44部

    Modo教程合集44部 教程说明:英文视频教程,大部分有工程文件,但不是全部 教程格式:Flv.MP4格式,大部分高清,确保能看清软件上的文字 发货方式:百度网盘下载链接(教程较多,可转存到自己的网盘 ...

  5. 配置文件读取工具类--PropertiesUtil

    /** * 属性工具类 * @author admin * 参考:https://www.cnblogs.com/doudouxiaoye/p/5693454.html */ public class ...

  6. python第九十一天----第十六周作业

    实现功能: 1.非编辑模式 ​ 可以对每行进行选择,全选,取消,反选 : 2.编辑模式 ​ 进入编辑模式时: 如果行被选中,则被选中的行变为可编辑状态,未选中则不改变 ​ 退出编辑模式时: 保存所有的 ...

  7. C++基础算法学习——熄灯问题

    有一个由按钮组成的矩阵, 其中每行有6个按钮, 共5行– 每个按钮的位置上有一盏灯– 当按下一个按钮后, 该按钮以及周围位置(上边, 下边,左边, 右边)的灯都会改变状态26熄灯问题 POJ1222– ...

  8. 设计 MySQL 数据表的时候一般都有一列为自增 ID,这样设计原因是什么,有什么好处?

    知乎采集: MyISAM/InnoDB默认用B-Tree索引(可理解为"排好序的快速查找结构"). InnoDB中,主索引文件上直接存放该行数据,称为聚簇索引.次索引指向对主键的引 ...

  9. CRM项目之stark组件(1)

    admin组件 admin组件的简单使用 Django 提供了基于 web 的管理工具. Django 自动管理工具是 django.contrib 的一部分.你可以在项目的 settings.py ...

  10. cpu的组成及分工

    控制单元是上帝:掌控一切: 运算单元只负责算术和逻辑运算,运算的指令由控制单元提供,数据由寄存器提供: 存储单元:一方面给运算单元提供输入输出,另一方面在控制单元的控制下和内存通信: 控制单元使用运算 ...