-
Notifications
You must be signed in to change notification settings - Fork 8.6k
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
org.springframework.transaction.CannotCreateTransactionException: Could not open JDBC Connection for transaction; nested exception is java.sql.SQLException: interrupt #937
Comments
是否能提供错误信息? |
我这里也是频繁报这个错误
|
@wenshao 大神可否帮忙看看? |
我也遇到这个问题了,定时任务中线程调用数据库查询,报错:### Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection; nested exception is java.sql.SQLException: interrupt |
我也碰到了类似的问题,在中断某一个线程后,我紧跟着需要执行的数据库操作并没有执行。报错为 Could not open JDBC Connection for transaction; nested exception is java.sql.SQLException: interrupt |
我也与遇到这个报错 我一个定时线程 每隔5分钟会执行一次 运行一会就因为这个中断了 |
别在中断的interrupt线程里面写代码 |
已经解决 这个是我线程中一个线程cancel 还在执行了后面代码 报错 |
大神 getConnectionInternal中lock.lockInterruptibly()的意义是什么 我发现如果之前线程interrupt了,这里就会出现上面说的错误 |
双数据源,查询数据,报错中断,什么原因呢 |
2分钟一次的xxl-job定时任务,每天都出现十几次以上,任务超时时间是2分钟,并不是异常中断的3毫秒,求大神们帮忙看看 Error querying database. Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is java.sql.SQLException: interruptThe error may exist in com/business/cloud/mapper/BizBusinessTaskLogMapper.java (best guess)The error may involve com.business.cloud.mapper.BizBusinessTaskLogMapper.selectList_COUNTThe error occurred while executing a queryCause: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is java.sql.SQLException: interrupt
Caused by: org.apache.ibatis.exceptions.PersistenceException: Error querying database. Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is java.sql.SQLException: interruptThe error may exist in com/business/cloud/mapper/BizBusinessTaskLogMapper.java (best guess)The error may involve com.business.cloud.mapper.BizBusinessTaskLogMapper.selectList_COUNTThe error occurred while executing a queryCause: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is java.sql.SQLException: interrupt
Caused by: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is java.sql.SQLException: interrupt |
|
线程interrupt 中断后 在去结束的时候访问数据库报错
@OverRide
public void run() {
// TODO Auto-generated method stub
super.run();
while(isRun() && !this.isInterrupted()){
try {
Thread.sleep(1000*60l);
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
}
// 业务处理
The text was updated successfully, but these errors were encountered: