Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java.sql.SQLRecoverableException: 关闭的语句 #1708

Closed
qiufeng6407 opened this issue Apr 27, 2017 · 3 comments
Closed

java.sql.SQLRecoverableException: 关闭的语句 #1708

qiufeng6407 opened this issue Apr 27, 2017 · 3 comments

Comments

@qiufeng6407
Copy link

qiufeng6407 commented Apr 27, 2017

数据库连接池配置:
<property name="url" value="${jdbc.url}" /> <property name="username" value="${jdbc.user}" /> <property name="password" value="${jdbc.password}" /> <property name="initialSize" value="5" /> <property name="maxActive" value="30" /> <property name="minIdle" value="5" /> <property name="maxWait" value="60000" /> <property name="timeBetweenEvictionRunsMillis" value="3000" /> <property name="minEvictableIdleTimeMillis" value="300000" /> <property name="validationQuery" value="SELECT 'x'" /> <property name="testWhileIdle" value="true" /> <property name="testOnBorrow" value="false" /> <property name="testOnReturn" value="false" /> <property name="poolPreparedStatements" value="true" /> <property name="maxPoolPreparedStatementPerConnectionSize" value="20" /> <property name="filters" value="stat" />
数据库链接在运行时报错:
Caused by: java.sql.SQLRecoverableException: 关闭的语句
at oracle.jdbc.driver.OracleClosedStatement.exitImplicitCacheToActive(OracleClosedStatement.java:4667)
at oracle.jdbc.driver.OraclePreparedStatementWrapper.exitImplicitCacheToActive(OraclePreparedStatementWrapper.java:1607)
at com.alibaba.druid.util.OracleUtils.exitImplicitCacheToActive(OracleUtils.java:79)
at com.alibaba.druid.pool.PreparedStatementPool.get(PreparedStatementPool.java:66)
at com.alibaba.druid.pool.DruidPooledConnection.prepareStatement(DruidPooledConnection.java:326)
at com.ibatis.sqlmap.engine.execution.SqlExecutor.prepareStatement(SqlExecutor.java:497)
at com.ibatis.sqlmap.engine.execution.SqlExecutor.executeUpdate(SqlExecutor.java:75)
at com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.sqlExecuteUpdate(MappedStatement.java:216)
at com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeUpdate(MappedStatement.java:94)

请问有可能是什么原因导致的这个问题??在线等

@wenshao
Copy link
Member

wenshao commented Apr 27, 2017

网络有过中断?

@qiufeng6407
Copy link
Author

qiufeng6407 commented Apr 27, 2017

@wenshao
网络并没有中断过,我看这个问题有点像 pscache 的问题;
表现形式与 #1614一致;
就是前一个事务出错后,后面的调用全部出错;
版本1.0.28,是否这个问题还未修复,如果未修复,是不是可以将poolPreparedStatements改为false即可以避免?

@qiufeng6407
Copy link
Author

1.0.28关闭pscache,或者升级1.0.29

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants