4

I need some advice on setting up tcps connection to oracle 12c database in springboot application

I have the following configuration in application properties:

spring.datasource.url=jdbc:oracle:thin:@(description=(address=(protocol=tcps)(host=hostname.company.corp)(port=1601))(connect_data=(service_name=servicename.company.com)))
oracle.net.wallet_location=(source=(method=file)(method_data=(directory=C:\\ora12\\client_1\\network\\admin)))
oracle.net.tns_admin=C:\\ora12\\client_1\\network\\admin
spring.datasource.username=username
spring.datasource.password=password

I have wallet located as specified and osdt cert, osdt core, oraclepki jars in classpath and

security.provider.11=oracle.security.pki.OraclePKIProvider in java.security

However, I'm getting the following error:

Caused by: java.security.cert.CertPathValidatorException: Path does not chain with any of the trust anchors at sun.security.provider.certpath.PKIXCertPathValidator.validate(Unknown Source) at sun.security.provider.certpath.PKIXCertPathValidator.engineValidate(Unknown Source) at java.security.cert.CertPathValidator.validate(Unknown Source) ... 104 common frames omitted

I also tried to create keystore and import p12 oracle wallet into it and set it up in application properties like so:

server.ssl.key-store = C:\\Path\\To\\Key\\Store\\keyStore.jks
server.ssl.key-store-password = keystore_password

Can anyone advice me on how to resolve it?

Yakiv
  • 623
  • 2
  • 8
  • 19

0 Answers0