站内搜索:
首页 >> 前端 >> 内容
No CurrentSessionContext configured 异常解决

时间:2013/10/28 14:01:11

Exception in thread "main" org.hibernate.HibernateException: No CurrentSessionContext configured!

这个异常发生的原因是因为在hibernate.cfg.xml中没有设置:

 

<property name="current_session_context_class">thread</property>  

 

 

 

在以上hibernate的配置文件中添加上面的配置即可!

  • 上一篇:scheam中的<anyAttribute>元素
  • 下一篇:dojo mobile笔记1--moveTo与url的区别与共性以及相关注意事项
  • 返回顶部