
Krishna SusrithaM.04052 (Customer) asked a question.
Hi,
I'm getting this error when a request is sent to OKTA from the application. javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
When I'm trying to hit the request from the browser it is working fine and the digital certificate is also verified correctly. When I'm trying from the command prompt also it is working correctly and the digital certificate is also verified correctly. Can you please help me with this issue?
Thanks in advance.

Hi Krishna,
Casiana here from Okta Support.
You will need to include your certification in your Java keystore. You may want to review the following guides about how to do so:
https://developer.okta.com/blog/2015/12/02/tls-client-authentication-for-services, https://developer.okta.com/blog/2017/08/23/five-java-tips#2-use-tls-always, and https://www.ibm.com/support/pages/how-import-certificate-java-keystore-using-java-keytool-and-ikeyman
If you need further assistance, you can open a support case from your Admin Portal.
Hope you will have a great day!
Casiana Ababei
Technical Support Engineer
Okta Global Customer Care