Reputation: 151
I have meet one issue:
There is one database,it could be connected by sqldeveloper tools
But I want to use c3p0 to connect the database with the jdbcurl:
jdbc:oracle:thin:@2.2.6.11:2709:hl.webtest.com
get these error: WARN - com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@55854763 -- Acquisition Attempt Failed!!! Clearing pending acquires. While trying to acquire a needed new resource, we failed to succeed more than the maximum number of allowed acquisition attempts (5). Last acquisition attempt exception: java.sql.SQLException: Listener refused the connection with the following error: ORA-12505, TNS:listener does not currently know of SID given in connect descriptor
at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:70)
why C3p0 throw the error? It seemed that the jdbcurl is wrong, what is correct jdbcurl with the Service Name?
Upvotes: 1
Views: 4784
Reputation: 48
jdbc:oracle:thin:@//2.2.6.11:2709/hl.webtest.com
it is use service_name, not the SID
You need the //
and the /
Upvotes: 3