javax.net.ssl.SSLException - the trustAnchors parameter must be non-empty [duplicate]

白昼怎懂夜的黑 提交于 2019-12-12 12:27:44

问题


When I try to run ./gradlew run I keep getting:

Downloading https://services.gradle.org/distributions/gradle-4.4.1-bin.zip

Exception in thread "main" javax.net.ssl.SSLException: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty

Tried curl -v https://services.gradle.org/distributions/gradle-4.4.1-bin.zip and works just fine

Connected to services.gradle.org (2400:cb00:2048:1::6810:aba6)
successfully set certificate verify locations:
CAfile: /etc/ssl/certs/ca-certificates.crt
CApath: /etc/ssl/certs

回答1:


You haven't mentioned which JDK or OS/distro you are using, but it's possible that ca-certificates-java is not a dependency in the Oracle JDK/JRE so this must be explicitly installed.

You might need to run

sudo /var/lib/dpkg/info/ca-certificates-java.postinst configure

See also Error - trustAnchors parameter must be non-empty



来源:https://stackoverflow.com/questions/47921563/javax-net-ssl-sslexception-the-trustanchors-parameter-must-be-non-empty

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!