Making a web service call to an external server fails and the following is seen in the application server log:
sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
The certificate presented by the external server is not trusted by Appian because it has not been imported to the trust store.
If the connection to the external server originates from one of the services documented here, upload the certificate (.pem) to the Trusted Server Certificates section of the Admin Console. Otherwise:
If the connection to the external server originates from one of the services documented here, upload the certificate (.pem) to the Trusted Server Certificates section of the Admin Console. Otherwise, refer to the steps below to import the certificate into the Java trust store. Note: In Appian 19.1 and later, Java comes bundled with Appian so <APPIAN_HOME>/java should be used instead of JAVA_HOME.
<APPIAN_HOME>/java
JAVA_HOME
$JAVA_HOME/bin/keytool -import -trustcacerts -file #PATH TO FILE# -alias ##ALIASNAME## -keystore $JAVA_HOME/jre/lib/security/cacerts
"%JAVA_HOME%\bin\keytool" -import -trustcacerts -file #PATH TO FILE# -alias ##ALIASNAME## -keystore "%JAVA_HOME%\jre\lib\security\cacerts"
$JAVA_HOME/bin/keytool -list -keystore $JAVA_HOME/jre/lib/security/cacerts | grep ##ALIASNAME##
"%JAVA_HOME%\bin\keytool" -list -keystore "%JAVA_HOME%\jre\lib\security\cacerts" | findstr ##ALIASNAME##
| grep ##ALIASNAME##
| findstr ##ALIASNAME##
Note: certificates imported using the steps above will be cleared on site restart and need to be re-imported to the trust store.
This article applies to all versions of Appian.
Last Reviewed: May 2023