Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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
like image 457
Gavriil Avatar asked Oct 20 '25 03:10

Gavriil


1 Answers

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

like image 153
Spangen Avatar answered Oct 22 '25 22:10

Spangen



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!