我正在使用spring boot 1.5.0.release,我想使用oracle RAC(快速连接故障转移)和像这样的jdbc字符串将我的应用程序连接到oracle数据库:
spring.datasource.url:jdbc:oracle:thin:jdbc:oracle:thin:@(DESCRIPTION=(ENABLE=BROKEN)(LOAD_BALANCE=ON)(FAILOVER=ON)(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=rac1-vip-ent.mncplaymedia.com)(PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=rac2-vip-ent.mncplaymedia.com)(PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=rac3-vip-ent.mncplaymedia.com)(PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=rac4-vip-ent.mncplaymedia.com)(PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=rac5-vip-ent.mncplaymedia.com)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=ent)(FAILOVER_MODE=(TYPE=SELECT)(METHOD=BASIC)(RETRIES = 180)(DELAY = 5))))
spring.datasource.username:xxxx
spring.datasource.password:xxx
spring.datasource.driver-class-name:oracle.jdbc.driver.OracleDriver
我收到错误Datasource返回null如下:
Caused by: java.sql.SQLTransientConnectionException: DataSource returned null unexpectedly
at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:343) ~[HikariCP-2.5.1.jar:na]
at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:506) ~[HikariCP-2.5.1.jar:na]
... 71 common frames omitted
之前有任何人遇到此问题,请帮我解决此问题。抱歉我的英语不好。