Helping the JVM if it thinks that the trustAnchors parameter is empty

Jun 24, 2020 00:00 · 84 words · 1 minute read programming java

When talking to services over HTTPS from within your Java-App, you might come across the InvalidAlgorithmParameterException telling you that the trustAnchors parameter must be non-empty. Chances are that the JVM has problems opening the used truststore.

In my case, it simply couldn’t open it, because I didn’t provide the password to open the tuststore.

To fix that, provide the password with a JVM startup parameter.

changeit ist the default password for the default truststore. Use whatever password you set, to protect your truststore.

If you want to get in touch with me, send me an email