I'm trying to configure my e-mail on Jenkins/Hudson, and I constantly receive the error:
java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be
non-empty
I've seen a good amount of information online about the error, but I have not gotten any to work. I'm using Sun's JDK on Fedora Linux (not OpenJDK).
Here are a few things I've tried. I tried following the advice from this post, but copying the cacerts from Windows over to my Fedora box hosting Jenkins didn't work. I tried following this guide as I'm trying to configure Gmail as my SMTP server, but it didn't work either. I also tried to download and move those cacert files manually and move them over to my Java folder using a variation of the commands on this guide.
I am open to any suggestions as I'm currently stuck right now. I have gotten it to work from a Windows Hudson server, but I am struggling on Linux.
You have to add the above two lines to your code. It is not able to find the truststore.
You may also encounter this error after upgrading to Spring Boot 1.4.1 (or newer) because it brings along Tomcat 8.5.5 as part of its dependencies.
The problem is due to the way that Tomcat deals with the trust store. If you happen to have specified your trust store location as the same as your keystore in the Spring Boot configuration, you'll likely get the
trustAnchors parameter must be non-empty
message when starting the application.Simply remove the
server.ssl.trust-store
configuration unless you know that you need it, in which case consult the links below.The following issues contain more details about the problem:
I encountered this problem with the Android SDK sdkmanager. For me this solution worked:
The 'cacert' file was a tiny one (22B). I have installed oracle-java8-installer from ppa:webupd8team/java (according to this manual: https://docs.nativescript.org/start/ns-setup-linux).
This fixed the problem for me on Ubuntu:
(found here: https://bugs.launchpad.net/ubuntu/+source/ca-certificates-java/+bug/1396760)
ca-certificates-java
is not a dependency in the Oracle JDK/JRE so this must be explicitly installed.I ran into this exact problem on OS X, using JDK 1.7, after upgrading to OS X v10.9 (Mavericks). The fix that worked for me was to simply reinstall the Apple version of Java, available at http://support.apple.com/kb/DL1572.
I've had lot of security issues after upgrading to OS X v10.9 (Mavericks):
trustAnchors
parameter must be non-emptyI applied this Java update and it fixed all my issues: http://support.apple.com/kb/DL1572?viewlocale=en_US