Forum Stats

  • 3,767,820 Users
  • 2,252,720 Discussions
  • 7,874,337 Comments

Discussions

Invalid Certificate path

mjocasio23
mjocasio23 Member Posts: 4 Red Ribbon
edited Oct 30, 2019 1:51AM in Java User Groups Discussions

Error occurred while performing folder replication for 'XXXX': sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target: sun.security.validator.ValidatorException:

Answers

  • 4122407
    4122407 Member Posts: 1
    edited Oct 30, 2019 1:51AM

    You need to add the certificate for App2 to the truststore file of the used JVM located at %JAVA_HOME%\lib\security\cacerts.

    First you can check if your certificate is already in the truststore by running the following command: keytool -list -keystore "%JAVA_HOME%/jre/lib/security/cacerts" (you don't need to provide a password)

    If your certificate is missing, you can get it by downloading it with your browser and add it to the truststore with the following command:

    keytool -import -noprompt -trustcacerts -alias <AliasName> -file <certificate> -keystore <KeystoreFile> -storepass <Password>

    After import you can run the first command again to check if your certificate was added.