1.Unable to construct current session context [](Unable to load class [])
这个问题是session环境无法构建,很明显是hibernate.hbm.xml出现了问题,我仔细看了一下我的配置文件
原来:
<!-- 使用getCurrentSession时添加这个属性 -->
<property name="hibernate.current_session_context_class"></property>这里的没有写值,使用本地事务应该是thread。
改正后:<property name="hibernate.current_session_context_class">thread</property>
注:
使用getCurrentSession()需要在hibernate.cfg.xml文件中加入如下配置:
* 如果使用的是本地事务(jdbc事务)
<property name="hibernate.current_session_context_class">thread</property>
* 如果使用的是全局事务(jta事务)
<property name="hibernate.current_session_context_class">jta</property>
分享到:
相关推荐
这是hibernate4.1.7GA版的帮助文档,希望能帮助您。
框架sprinigmvc4.1.6+spring4.1.6+hibernate4.1.7+maven整合
基于ExtJS 4.2.1+Hibernate 4.1.7+Spring MVC 3.2.8的通用后台管理系统
ExtJS 4.2+Hibernate 4.1.7+Spring MVC 3.2.8完成的后台管理项目,觉得是值得参考的实用项目 下载链接
hibernate4.1.7.chm api
Spring MVC 3.2.8支持的最高Hibernate版本是4.1.7,更高的Hibernate版本和Spring MVC 3.2.8组合会遇到兼容问题。 4、Hibernate集成二级缓存框架Ehcache。 5、数据库是MySQL、Oracle和SQL Server,Hibernate的Dialect...
hibernate4.1.7文档APIchm格式的,超好用
本文件为ssh(spring4.2.4+struts2.3.24+hibernate4.1.7)框架的jar包,欢迎大家来下载。
Struts2.3.4.1+Hibernate4.1.7+Spring3.1.2项目框架搭建所需要的jar包
通用后台管理系统(ExtJS4.2+Hibernate4.1.7+SpringMVC3.2.8).pdf
Spring MVC 3.2.8支持的最高Hibernate版本是4.1.7,更高的Hibernate版本和Spring MVC 3.2.8组合会遇到兼容问题。 4、Hibernate集成二级缓存框架Ehcache。 5、数据库是MySQL、Oracle和SQL Server,Hibernate的Dialect...
Spring MVC 3.2.8支持的最高Hibernate版本是4.1.7,更高的Hibernate版本和Spring MVC 3.2.8组合会遇到兼容问题。 4、Hibernate集成二级缓存框架Ehcache。 5、数据库是MySQL、Oracle和SQL Server,Hibernate的Dialect...
最新SSH开发的全部JAR集合_Struts2.3.4.1+Hibernate4.1.7+Spring3.1.20_SSH
Spring MVC 3.2.8支持的最高Hibernate版本是4.1.7,更高的Hibernate版本和Spring MVC 3.2.8组合会遇到兼容问题。 4、Hibernate集成二级缓存框架Ehcache。 5、数据库是MySQL、Oracle和SQL Server,Hibernate的Dialect...
附带jar包,直接导入myeclipse即可正常启动
直接导入myeclipse即可使用测试
使用maven搭建整合这三个框架,导入myeclipse即可测试使用
附带jar包,直接导入myeclipse即可正常启动
。。。