title: Spring Boot - Oracle TCPS connection using thin driver
body: <p>I need some advice on setting up tcps connection to oracle 12c database in springboot application</p>
  
  <p>I have the following configuration in application properties:</p>
  
  <pre><code>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
  </code></pre>
  
  <p>I have wallet located as specified and osdt cert, osdt core, oraclepki jars in classpath and </p>
  
  <pre><code>security.provider.11=oracle.security.pki.OraclePKIProvider in java.security
  </code></pre>
  
  <p>However, I'm getting the following error:</p>
  
  <blockquote>
    <p>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</p>
  </blockquote>
  
  <p>I also tried to create keystore and import p12 oracle wallet into it and set it up in application properties like so:</p>
  
  <pre><code>server.ssl.key-store = C:\\Path\\To\\Key\\Store\\keyStore.jks
  server.ssl.key-store-password = keystore_password
  </code></pre>
  
  <p>Can anyone advice me on how to resolve it?</p>