`
sjsky
  • 浏览: 905466 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论

No CurrentSessionContext configured

阅读更多

   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

-----------------------------------分 ------------------------------------隔 ------------------------------------线 --------------------------------------

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics