连接数据库Oracle12c异常解决:Connections could not be acquired from the underlying database

Caused by: java.sql.SQLException: Connections could not be acquired from the underlying database!

之前本地使用的oracle11g,结果服务器上来了一个Oracle12c,瞬间就连不上了,害得我花费了好几天时间。

具体解决方案如下:

首先ping 或者telnet数据库看是否是通的,如果不通那累死也连不上呢。

其次确认驱动版本,尽量使用6以上版本

最后确认数据库连接写法,正确写法为:jdbc:oracle:thin:@//127.0.0.1:1521/orcl

然后再次尝试

猜你喜欢

转载自blog.csdn.net/li_wen_jin/article/details/84257570