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

19,521

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

Share:
19,521
Gavriil
Author by

Gavriil

Updated on June 04, 2022

Comments

  • Gavriil
    Gavriil almost 2 years

    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
    
  • Gavriil
    Gavriil over 6 years
    I'm using oracle-8-jdk on Ubuntu MATE 17.10, tried you command but still getting the error..
  • Michael Gates
    Michael Gates about 6 years
    @Gavriil Did you ever solve this issue?
  • Nishant Bhakta
    Nishant Bhakta almost 6 years
    Have you found any answer for this. I am into this problem right now.