数据库连接错误

本文探讨了Spring框架下与Oracle数据库交互时遇到的五种典型问题,包括UncategorizedSQLException、无法回滚、MyBatis查询失败、创建连接异常和数据源健康检查失败。通过实例和解决策略,帮助读者理解并解决这些问题。
摘要由CSDN通过智能技术生成

0)
org.springframework.jdbc.UncategorizedSQLException: 
### Error querying database.  Cause: java.sql.SQLException: ORA-01089: immediate shutdown in progress - no operations are permitted

1)
Couldn't rollback jdbc connection. Io exception: Connection timed out
java.sql.SQLException: Io exception: Connection timed out
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112) ~[ojdbc14-10.2.0.4.0.jar:Oracle JDBC Driver version - "10.2.0.4.0"]

2)
org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.PersistenceException: 
### Error querying database.  Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection; nested exception is com.alibaba.druid.pool.GetConnectionTimeoutException: wait millis 60000, active 0, maxActive 35, creating 0

3)
create connection SQLException, url: jdbc:oracle:thin:@hxtrc-scan:1521/shhxnpaytaf2, errorCode 17002, state null
java.sql.SQLException: Io exception: Got minus one from a read call

4)
Error handling misfires: Failed to obtain DB connection from data source 'springNonTxDataSource.jobSchedulerFactoryBean': java.sql.SQLException: Io exception: Got minus one from a read call

5)
DataSource health check failed
org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection; nested exception is java.sql.SQLTransientConnectionException: HikariPool-1 - Connection is not available, request timed out after 30000ms.
 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值