java javax.net.ssl.SSLException - trustAnchors 参数必须非空
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/47921563/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
javax.net.ssl.SSLException - the trustAnchors parameter must be non-empty
提问by Gavriil
When I try to run ./gradlew run
I keep getting:
当我尝试跑步时,./gradlew run
我不断收到:
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
尝试过curl -v https://services.gradle.org/distributions/gradle-4.4.1-bin.zip
,效果很好
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
采纳答案by Spangen
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.
您没有提到您使用的是哪个 JDK 或 OS/发行版,但它可能ca-certificates-java
不是 Oracle JDK/JRE 中的依赖项,因此必须明确安装。
You might need to run
你可能需要运行
sudo /var/lib/dpkg/info/ca-certificates-java.postinst configure