Peter Marklund

Peter Marklund's Home

Mon Jul 13 2015 06:01:46 GMT+0000 (Coordinated Universal Time)

Clojure on Heroku Gotcha - Missing SSL certificates and jdk-overlay to the rescue

In order to get my Clojure app on Heroku to talk to the Geckoboard HTTPS REST API (at I needed to add the file .jdk-overlay/jre/lib/security/cacerts that I copied from my local Java installation (it's under $JAVA_HOME). Apparently it's due to licensing issues that Heroku can't include the necessary certificates in their Java installation. For more, see Customizing the JDK at the Heroku dev center.

Here is an example REPL session that reproduces the problem:

(require '[clj-http.client :as client])
(client/post "" {:body "some body here"})
SunCertPathBuilderException unable to find valid certification path to requested target (