Spring 整合 hibernate 时,抛异常: createQuery is not valid without active transaction
来源:互联网 发布:维尔迪数据 编辑:程序博客网 时间:2024/05/19 13:18
在ssh4中的sessionFactory配置文件中应将hibernate.current_session_context_class设为org.springframework.orm.hibernate3.SpringSessionContext(默认为此值),并应用spring管理事务。
如果为<prop key="hibernate.current_session_context_class">thread</prop> 则会报该异常。
解决方案:
将 <prop key="hibernate.current_session_context_class">thread</prop> 删除,
或者改为默认值:org.springframework.orm.hibernate3.SpringSessionContext
0 0
- Spring 整合 hibernate 时,抛异常: createQuery is not valid without active transaction
- spring和hibernate整合时异常(详解): getFlushMode is not valid without active transaction
- spring和hibernate整合时异常(详解): getFlushMode is not valid without active transaction
- createQuery is not valid without active transaction异常
- createQuery is not valid without active transaction
- createQuery is not valid without active transaction
- createQuery is not valid without active transaction
- ssh整合报错org.hibernate.HibernateException: createQuery is not valid without active transaction
- Spring管理Hibernate 报 createQuery is not valid without active transaction 错误
- 使用S2SH框架时,出现org.hibernate.HibernateException: createQuery is not valid without active transaction
- spring+hibernate进行线程操作时异常:save is not valid without active transaction
- [Error]: createQuery is not valid without active transaction
- SSH 整合报org.hibernate.HibernateException: ...... is not valid without active transaction异常
- 异常积累(一)createQuery is not valid without active transaction
- spring整合hibernate的时候使用session的时候报:is not valid without active transaction
- spring 管理 hibernate 事物,抛异常 org.hibernate.HibernateException: save is not valid without active transa
- ssh整合是出现异常: getFlushMode is not valid without active transaction
- hibernate中: is not valid without active transaction
- 利用ThreadLocal & Filter 实现事务处理
- 使用 <base> 标签解决 相对路径问题
- Hibernate 多对多 HQL 查询
- Android Activity 全局管理 终极解决方案
- 设置字体加粗
- Spring 整合 hibernate 时,抛异常: createQuery is not valid without active transaction
- Spring4 整合 Hibernate4
- windows连虚拟机mongodb
- 如何产生已知概率密度函数的随机数?
- hdu 1242 Rescue
- LintCode之报数
- [网络流]最大流算法 Dinic
- django 注册、登录、第三方接口程序
- 对JAVASCRIPT匿名函数的理解(透彻版)