0

I just fresh installed ubuntu utopic on a vm and then installed java (both 8 and then 7 when I first saw the error) and leiningen. When running lein deps or lein repl it seems to fail with this error:

$ lein deps
Could not transfer artifact org.clojure:clojure:pom:1.6.0 from/to central (https://repo1.maven.org/maven2/): java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
Could not transfer artifact org.clojure:tools.nrepl:pom:0.2.6 from/to central (https://repo1.maven.org/maven2/): java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
Could not transfer artifact clojure-complete:clojure-complete:pom:0.2.3 from/to central (https://repo1.maven.org/maven2/): java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
This could be due to a typo in :dependencies or network issues.
If you are behind a proxy, try setting the 'http_proxy' environment variable.

$ lein version
java Leiningen 2.5.0 on Java 1.7.0_65 OpenJDK 64-Bit Server VM

$ java -version
java version "1.7.0_65"
OpenJDK Runtime Environment (IcedTea 2.5.3) (7u71-2.5.3-0ubuntu1)
OpenJDK 64-Bit Server VM (build 24.65-b04, mixed mode)

I believe this is because of some issue with the cacerts. I can't find which package might be the right one to contain all of the proper keys for java however.

Alex Miller
  • 69,183
  • 25
  • 122
  • 167
MichaelB
  • 1,092
  • 2
  • 16
  • 32
  • Also, it might be worth noting that /etc/ssl/certs/java/cacerts is entirely missing – MichaelB Oct 27 '14 at 18:30
  • I generated my own keystore containing all of the certs from /etc/ssl/certs/ and put it as /etc/ssl/certs/java/cacerts. Now everything works fine. I am pretty sure that some package postinstall or something should have done this for me. – MichaelB Oct 27 '14 at 20:52
  • For some reason `update-ca-certificates -f` needed to be run in order to automatically put the certificates in the correct file. – Portablejim Feb 05 '15 at 06:52

0 Answers0