Reputation: 11
When I am executing the following query
(require '[clj-http.client :as http])
(http/post "https://www.googleapis.com/oauth2/v1/userinfo"
{:query-params {:access_token "token"}})
SunCertPathBuilderException unable to find valid certification path to requested target sun.security.provider.certpath.SunCertPathBuilder.build (SunCertPathBuilder.java:141)
This error also sometimes appears when executing the code
ExceptionInfo clj-http: status 404 slingshot.support/stack-trace (support.clj:201)
If someone could help me, I would appreciate it ...
Upvotes: 1
Views: 200
Reputation: 11
Thank you Denis for the prompt response! I have reviewed the links, however what I found is to change the JDK 8 to JDK 7. But I would like to know why this situation occurs.
Upvotes: 0
Reputation: 3346
You'll need to review these two sections:
Enable logging at the debug level, so you can get a better idea of why it's failing: https://github.com/dakrone/clj-http#logging
I think the issue is related to missing configuration for calls to an HTTPS address. Try changing the call as shown here: https://github.com/dakrone/clj-http#keystores-trust-stores . Here is an example answer that shows how to set SSL certs in more detail: https://stackoverflow.com/a/1710543/483566
Upvotes: 1