Karthik Vignesh
Karthik Vignesh

Reputation: 1

PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException unable to find valid certification path to requested target

i'm trying to get a orderId from Razorpay api through java but ended up with this error.RazorpayException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

i have also set the razorpay.crt in my lib/security path of my jdk-18 still getting this error

Upvotes: -1

Views: 52

Answers (1)

Karthik Vignesh
Karthik Vignesh

Reputation: 1

System.setProperty("javax.net.ssl.trustStore", "C:\Program Files\Java\jdk-18.0.2.1\lib\security\cacerts"); System.setProperty("javax.net.ssl.trustStorePassword", "changeit"); i added these lines in my method it is now working fine

Upvotes: 0

Related Questions