Spring Boot and Hikari Connection Pool: ORA-12514 TNS:listener does not currently know of service requested in connect descriptor

Viewed 43

I'm having an issue that has gone from "annoyance" to "flip the desk".

I have a very basic Spring Boot MVC service with the following Hikari Connection Pool setup:

spring.datasource.username=ME
spring.datasource.password=mypassword
#spring.datasource.url=jdbc:oracle:thin:@SERVICE
spring.datasource.url=jdbc:oracle:thin:@localhost:1521/SERVICE
# need the duplicate because hikari is "special", but it's the spring default
#spring.datasource.jdbc-url=jdbc:oracle:thin:@SERVICE
spring.datasource.jdbc-url=jdbc:oracle:thin:@localhost:1521/SERVICE

# HikariCP settings
spring.datasource.hikari.minimumIdle=5
spring.datasource.hikari.maximumPoolSize=5
spring.datasource.hikari.idleTimeout=30000
spring.datasource.hikari.maxLifetime=2000000
spring.datasource.hikari.connectionTimeout=30000
spring.datasource.hikari.poolName=HikariPool
# leak detection - 30 seconds/30k ms
spring.datasource.hikari.leak-detection-threshold=30000

It seems that a connection is being held. I've tried restarting my Oracle Service and Listener with no luck, and the only solution seems to be to reboot.

Can anyone assist?

Update: I removed Hikari and used this:

spring.datasource.type=org.springframework.jdbc.datasource.SimpleDriverDataSource

I no longer think this is directly related to Hikari.

Edit 2:

Here's the actual "caused by" root exception:

Caused by: oracle.net.ns.NetException: Listener refused the connection with the following error:
ORA-12514, TNS:listener does not currently know of service requested in connect descriptor
  (CONNECTION_ID=Z0U0SUlgTNuHsXgisq9YSA==)
    at oracle.net.ns.NSProtocolNIO.createRefusePacketException(NSProtocolNIO.java:816) ~[ojdbc8-21.5.0.0.jar:21.5.0.0.0]
    at oracle.net.ns.NSProtocolNIO.handleConnectPacketResponse(NSProtocolNIO.java:396) ~[ojdbc8-21.5.0.0.jar:21.5.0.0.0]
    at oracle.net.ns.NSProtocolNIO.negotiateConnection(NSProtocolNIO.java:207) ~[ojdbc8-21.5.0.0.jar:21.5.0.0.0]
    at oracle.net.ns.NSProtocol.connect(NSProtocol.java:350) ~[ojdbc8-21.5.0.0.jar:21.5.0.0.0]
    at oracle.jdbc.driver.T4CConnection.connect(T4CConnection.java:2372) ~[ojdbc8-21.5.0.0.jar:21.5.0.0.0]
    at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:657) ~[ojdbc8-21.5.0.0.jar:21.5.0.0.0]
    ... 85 common frames omitted

That particular CONNECTION_ID is randomized and different each time.

0 Answers
Related