spring声明式管理事务+ hibernate + save is not valid without active transaction
2014-12-31 17:29
423 查看
spring整合hibernate时,spring使用注解配置声明式事务,并且applicationContext.xml配置正确,
还出现save is not valid without active transaction错误
那么很有可能是你在hibernate.cfg.xml文件中配置了
<property name="current_session_context_class">thread</property>
只要删了这个就行了
还出现save is not valid without active transaction错误
那么很有可能是你在hibernate.cfg.xml文件中配置了
<property name="current_session_context_class">thread</property>
只要删了这个就行了
相关文章推荐
- spring 管理 hibernate 事务 load is not valid without active transaction
- spring 管理 hibernate 事物,抛异常 org.hibernate.HibernateException: save is not valid without active transa
- spring+hibernate进行线程操作时异常:save is not valid without active transaction
- Spring管理Hibernate 报 createQuery is not valid without active transaction 错误
- Exception in thread "main" org.hibernate.HibernateException: save is not valid without active transaction
- org.hibernate.HibernateException: save is not valid without active transaction
- spring和hibernate整合时异常(详解): getFlushMode is not valid without active transaction
- spring整合hibernate的时候使用session的时候报:is not valid without active transaction
- spring整合hibernate的时候报异常org.hibernate.HibernateException: createQuery is not valid without active transaction
- spring和hibernate整合时异常(详解): getFlushMode is not valid without active transaction
- org.hibernate.HibernateException: save is not valid without active transaction
- Exception in thread "main" org.hibernate.HibernateException: save is not valid without active transa
- [transaction] org.hibernate.HibernateException: createQuery is not valid without active transaction
- 使用S2SH框架时,出现org.hibernate.HibernateException: createQuery is not valid without active transaction
- org.hibernate.HibernateException: delete is not valid without active transaction
- 解决load,get,save 等is not valid without active transaction异常的原因。
- hibernate错误:load is not valid without active transaction
- hibernate中: is not valid without active transaction
- org.hibernate.HibernateException: getFlushMode is not valid without active transaction
- getHibernateFlushMode is not valid without active transaction;