just found a solution on my own:
The "Certificate Chain Error" error message does not reflect the chain problem in Truststore, but rather the chain problem on the server.
So, in case this can help, itβs quite normal to upload multiple Truststore certificates (chain) to trust multiple servers in https. You just need one alias per server (the alias name does not matter) and the certificates (chains) needed to trust this server.
There is no need to reset when switching communications to another server. Just upload all the server certificate chains to a single method myTrustManagerFactory.init (mytrustStore.jks).
source share