0

I am using spring framework for my application on RHEL 6 and making calls over https. However, this fails with the following error.

InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty; nested exception is javax.net.ssl.SSLException: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty"

I believe this has to do with truststores being empty so I have created a new truststore and added a self signed CA cert to it. However, the application doesn't seem to pick up the JAVA_OPT that I am exporting. I also tried MAVEN_OPTS but no luck their either.

-Djavax.net.debug=all -Djavax.net.ssl.trustStore=/tools/java/jdk1.7.0_67/jre/lib/security/XXXXXX -Djavax.net.ssl.trustStorePassword=XXXXXX

Is this a known issue with spring framework? Or is there another way that I should be passing these options to the application externally? Or is setting a system.properties the only way?

Yonkee
  • 1,781
  • 3
  • 31
  • 56
  • This is a separate issue as it is with Spring Boot only, and not permissions related as I get the same error when running the application as root. – Yonkee Mar 30 '15 at 02:18
  • It is the same error message and therefore it is the same issue. And do read the entire answer. The truststore you specifed was not found, *or* you didn't have permission to open it, *or* as per @AdamPlumb's [answer](http://stackoverflow.com/a/25188331/207421), you didn't specify the correct truststore *type.* – user207421 Mar 30 '15 at 03:14

0 Answers0