
java
tangchunyl
这个作者很懒,什么都没留下…
展开
-
org.hibernate.SessionException: Session is closed!
使用hibernate4+spring4用 sessionFactory.getCurrentSession(),得到session时时而报 org.hibernate.SessionException: Session is closed!错误。 现得解决方法如下: 对于OpenSessionInViewFilter,需要在web.xml文件中配置。但一定要放在Struts fi原创 2014-04-01 15:25:31 · 779 阅读 · 0 评论 -
HibernateException: Illegal attempt to associate a collection with two open sessions
HibernateException: Illegal attempt to associate a collection with two open sessions 修改sessionFactory.openSession() 为sessionFactory.getCurrentSession()原创 2014-04-01 15:25:56 · 523 阅读 · 0 评论