六狼论坛

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博账号登陆

只需一步,快速开始

搜索
查看: 52|回复: 0

No CurrentSessionContext configured

[复制链接]

升级  42.67%

98

主题

98

主题

98

主题

举人

Rank: 3Rank: 3

积分
328
 楼主| 发表于 2013-2-3 14:44:23 | 显示全部楼层 |阅读模式
   blog迁移至:http://www.micmiu.com
 
hibernate 配置启动报错,错误信息如下:
 
org.hibernate.HibernateException: No CurrentSessionContext configured!at org.hibernate.impl.SessionFactoryImpl.getCurrentSession(SessionFactoryImpl.java:540)at michael.jdbc.c3p0.C3p0HibernateExample.main(C3p0HibernateExample.java:31) 
解决办法:在配置文件:hibernate.cfg.xml 添加属性:current_session_context_class
 
<property name="current_session_context_class">thread</property>  
 
转载请注明来自:Michael's blog @ http://sjsky.iteye.com

-----------------------------------分 ------------------------------------隔 ------------------------------------线 --------------------------------------
您需要登录后才可以回帖 登录 | 立即注册 新浪微博账号登陆

本版积分规则

快速回复 返回顶部 返回列表