org.springframework.dao.DataAccessResourceFailureException Io 异常: tConnection reset
2013-04-07 16:49
387 查看
最近程序老是出现等待一会后 操作程序页面 出现下面异常
org.springframework.dao.DataAccessResourceFailureException Io 异常: tConnection reset
通过测试是发现是dbcp连接池导致 因为服务器释放了 连接 浏览器客户端 没法检测到 当再次访问时 不会重新生成连接
所以通过配置
datasource.validationQuery=select 1 from dual
datasource.testOnBorrow=true
datasource.testWhileIdle=true
三个属性 来检测连接是否释放 释放获取一个新的连接
<property name="validationQuery" value="${datasource.validationQuery}"/>
<property name="testOnBorrow" value="${datasource.testOnBorrow}"></property>
<property name="testWhileIdle" value="${datasource.testWhileIdle}"></property>
org.springframework.dao.DataAccessResourceFailureException Io 异常: tConnection reset
通过测试是发现是dbcp连接池导致 因为服务器释放了 连接 浏览器客户端 没法检测到 当再次访问时 不会重新生成连接
所以通过配置
datasource.validationQuery=select 1 from dual
datasource.testOnBorrow=true
datasource.testWhileIdle=true
三个属性 来检测连接是否释放 释放获取一个新的连接
<property name="validationQuery" value="${datasource.validationQuery}"/>
<property name="testOnBorrow" value="${datasource.testOnBorrow}"></property>
<property name="testWhileIdle" value="${datasource.testWhileIdle}"></property>
相关文章推荐
- org.springframework.dao.DataAccessResourceFailureException: could not execute query; nested exceptio
- org.springframework.dao.DataAccessResourceFailureException: Cannot open connenction
- Spring架包变更org.springframework.dao.DataAccessResourceFailureException
- org.springframework.dao.InvalidDataAccessResourceUsageException异常
- org.springframework.dao.InvalidDataAccessResourceUsageException: could not execute query;
- org.springframework.dao.InvalidDataAccessResourceUsageException: could not get next sequence value
- org.springframework.dao.InvalidDataAccessResourceUsageException: could not execute query; nested exc
- org.springframework.dao.InvalidDataAccessResourceUsageException: could not insert:
- org.springframework.dao.InvalidDataAccessResourceUsageException: could not execute query;
- 七、org.springframework.dao.TransientDataAccessResourceException
- [hibernate]:org.springframework.dao.InvalidDataAccessResourceUsageException: could not execute query; nested exception is org.hi
- org.springframework.dao.InvalidDataAccessResourceUsageException: could not execute query
- org.springframework.dao.InvalidDataAccessResourceUsageException: could not execute query; nested exception is org.hibernate.exce
- org.springframework.dao.InvalidDataAccessResourceUsageException: could not execute query;
- org.springframework.dao.InvalidDataAccessResourceUsageException: could not execute query; nested exc
- org.springframework.dao.InvalidDataAccessResourceUsageException: could not get next sequence value
- 一般数据语句或者建表问题:yiorg.springframework.dao.InvalidDataAccessResourceUsageException:
- Request processing failed; nested exception is org.springframework.dao.TransientDataAccessResourceEx
- org.springframework.dao.InvalidDataAccessResourceUsageException: Could not execute JDBC batch update
- org.springframework.dao.InvalidDataAccessResourceUsageException