Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

UCP configured thru tomcat global data sources is not working

User_MHHCAAug 13 2021 — edited Aug 13 2021

Hi Team,
We are planning to use UCP in our project, but having below issues. can some one please help?
we are using tomcat jndi global data sources, so i have tried to change the connection string as per https://www.oracle.com/a/tech/docs/application-checklist-for-continuous-availability-for-maa.pdf
page 5 as below. the server is coming up but connection pool is not getting created, failing with below error though user has access to both DB hosts, service.
***tomcat server version: tomcat 9.0.50
***jdbc driver , upc.jar downloaded from ojdbc8.jar from https://www.oracle.com/database/technologies/appdev/jdbc-ucp-19-11-c-downloads.html
**** java 8.x
****oracle DB version: Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit
<Resource auth="Container" autoCommit="false"
connectionFactoryClassName="oracle.jdbc.pool.OracleDataSource"
description="UCP Pool in Tomcat"
factory="oracle.ucp.jdbc.PoolDataSourceImpl"
fastConnectionFailoverEnabled="true" initialPoolSize="1"
maxPoolSize="1" minPoolSize="1" name="xxxx"
password="test"
type="oracle.ucp.jdbc.PoolDataSource"
url="jdbc:oracle:thin:@(DESCRIPTION = (CONNECT_TIMEOUT= 10)(RETRY_COUNT=10)(RETRY_DELAY=3) (ADDRESS_LIST = (LOAD_BALANCE=on) (ADDRESS = (PROTOCOL = TCP)(HOST=host.com)(PORT=1521))) (ADDRESS_LIST = (LOAD_BALANCE=on) (ADDRESS = (PROTOCOL = TCP)(HOST=host2.com)(PORT=1521))) (CONNECT_DATA=(SERVICE_NAME = service.com)))"
username="test" validationQuery="select 1 from dual" />

Error:
image.png
image.png

Comments
Post Details
Added on Aug 13 2021
0 comments
404 views