Pre-bound JDBC Connection found!解决办法
来源:互联网 发布:音频提取软件手机软件 编辑:程序博客网 时间:2024/06/10 06:16
今天在做项目时遇到了这种错误:Pre-bound JDBC Connection found! HibernateTransactionManager does not support running within DataSourceTransactionManager if told to manage the DataSource itself. It is recommended to use a single HibernateTransactionManager for all transactions on a single DataSource, no matter whether Hibernate or JDBC access..刚开始时真的不知道怎么办好,上百度查很多人多说是jdbc和Hibernate事物不兼容的问题,说不能在hibernate事物中嵌套事物,但我试了统一使用hibernate的事物,还是会报上述的错误,到后来我认真查看了程序的日志并通过多次的验证发现:原来是因为我在程序了里像这样
DefaultTransactionDefinition def = new DefaultTransactionDefinition();def.setPropagationBehavior(TransactionDefinition.PROPAGATION_REQUIRED);TransactionStatus status = txManager.getTransaction(def);显性启动了事务,当发生错误往外抛异常时,起的事务没有rollback,在等待超时的时间内,重新请求会发生这种问题。遇到这种问题的朋友可以试下这种解决方法。
0 0
- Pre-bound JDBC Connection found!解决办法
- invalid bound statement (not found)解决办法
- BindingException: Invalid bound statement (not found) 错误解决办法
- 有关mybatis的Invalid bound statement (not found)的解决办法
- Invalid bound statement (not found): xxx.xxxx.method解决办法
- org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection解决办法
- “Found interface com.mysql.jdbc.Connection, but class was expected ”
- POJ 2566 Bound Found
- POJ-2566-Bound Found
- poj 2566Bound Found
- poj 2566 Bound Found
- poj 2566 Bound Found
- poj 2566 Bound Found
- POJ 2566 Bound Found
- POJ2566-Bound Found
- 【POJ】2566 Bound Found
- POJ 2566 Bound Found
- poj 2566 Bound Found
- 集合
- 前端学习网站
- 查询比50号部门某个员工工资高的员工信息
- 多线程
- JDBC的批处理
- Pre-bound JDBC Connection found!解决办法
- 仿QQ5.0侧边栏(拖拽,动画)
- js 学习
- ESP8266-01细玩笔记(一)
- 《php和mysql web开发》笔记——第8章 设计Web数据库
- Matlab基础知识
- java.lang.Exception: 索引中丢失 IN 或 OUT 参数::2 解决方法
- Git Bug分支
- xml解析