How to handle BTS service certificate error


This article will give you the information to handle the certification error in BTS service.


Error message will be similar to PKIX path building failed: unable to find valid certification path to requested target

Instructions to Install BT certificate

These instructions are for production Basware BTS (Business Transactions Sender) which is used to deliver documents to Basware BT (

To replace the certificate for this service you need to perform the following steps 

1. Stop Basware BTS service
2. Download certificate from this location:
3. Extract from Zip and place certificate to BTS installation folder\jre\bin
* Example path: C:\Program Files (x86)\Basware\BTS\jre\bin
4. Open command prompt and use mouse right click "Run as Administrator" when opening
5. Browse to BTS installation folder\jre\bin
* Example: C:\Program Files (x86)\Basware\BTS\jre\bin
6. Enter command: keytool -import -alias -keystore BTS installation folder\jre\lib\security\cacerts -trustcacerts -file
* Example command with full path: keytool -import -alias -keystore "C:\PROGRAM FILES\Basware\BTS\jre\lib\security\cacerts" -trustcacerts -file
* Note double quotes must be used if there are spaces in the path e.g. "C:\PROGRAM FILES\Basware\BTS\jre\lib\security\cacerts"
7. Enter password: changeit
8. Trust certificate: Yes
9. Start Basware BTS service


If you receive this error message at Step 6: keytool error: java.lang.Exception: Certificate not imported, alias <> already exists

then run the following command to delete the existing certificate: keytool -delete -alias -keystore BTS installation folder\jre\lib\security\cacerts

please then follow Step 6 again along with the remaining steps.

Security certificate with intermediate file: