Image showing TrustAnchors parameter must be non-empty

TrustAnchors parameter must be non-empty

affiliate best offer

I have successfully installed and made to work an Hudson installation on Windows machine. Now I am trying to move my installation to a Linux server.

When I perform the installation and run it, gives me an error.

Here is how I fixed it.

My setup

I have installed a Fedora Linux and a Java Sun on top of it (I am not using the Open JDK).

Then I installed Jenkins on top of my Java Application.

But when I try it, I get this error:

java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be
    non-empty

What I have tried to fix the issue

Copy the CACERTS from my windows to my Linux machine

I followed the steps on this post.

The idea is that the path inside my ubuntu server /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/security/cacerts was a broken link to /etc/ssl/certs/java/cacerts.

That lead me to this bug: https://bugs.launchpad.net/ubuntu/+source/ca-certificates-java/+bug/983302 The README for ca-certificates-java eventually showed the actual fix:

run

update-ca-certificates -f

Then run this command:

apt-get install ca-certificates-java

But for my case, it didn’t work. It just marked it as manually installed.

Configure GMail as SMTP server

The steps for this attempt are in this post.

My assumption was that the error was due to Java not trusting the certificate from GMail.

Newer version of JVM solve the problem. Ruben Suarez provides a solution for those cannot upgrade.

To solve the problem, you must add Gmail’s certificate to the default cacerts keystore. Follow the details in the link above to implement this.

Copy my cacerts from Windows into Java on my linux machine.

In this attempt, I downloaded the cacert files manually and move them over to my Java folder.

But that didn’t solve my problem either.

The solution

This bizarre message means that the trustStore you specified was:

  1. empty,
  2. not found, or
  3. couldn’t be opened (due to wrong/missing trustStorePassword, or file access permissions, for example).

The point 2 (not found) was my problem. Let me explain.

My mistake was in the environment variable CATALINA_HOME.

In my setup, I use the ${CATALINA_HOME}\conf. But in my environment variable, there was not the CATALINA_HOME so the setup ${CATALINA_HOME}\conf was rendered as \conf which is not the correct path for the configuration.

Conclusion

To fix this problem I had to create the ${CATALINA_HOME} environment variable.

So one takeaway from this problem is that, when you install java, you better perform ALL the configurations and test them before you build on top of it.

Full Bright

Full Bright

A professional and sympathic business man.

Contact

Contact Us

To order one of our services, navigate to the order service page

Address

10 rue de Penthièvre,
75008 Paris

Email Us

hello at bright-softwares dot com

Open Hours

Monday - Friday
9:00AM - 05:00PM