Search code examples
javatomcatssllucee

Lucee Error - java.security.cert.CertificateException: No X509TrustManager implementation available


In converting an ACF website to Lucee, we're facing some configuration issues. Our environment is Lucee5, Tomcat7, and Java.

There seems to be something not configured correctly for Lucee to be able to access an endpoint webservice via SSL. The same code works without any issues on CF9 on the same sever in a different Tomcat container.

The test call:

cfhttp(method="GET", charset="utf-8", url="https://our_lucee_server.org/wf/webservice/wf_webservice.cfc?wsdl", result="result") {
}
writeDump(result);

results in a:

java.security.cert.CertificateException: No X509TrustManager implementation available

It's been suggested that the endpoint serving the WSDL is the issue and that either Tomcat or Apache needs to be configured. Since Lucee is the program throwing the error, how can I determine what's preventing Lucee from accessing the endpoint?

The WSDL can be accessed no problem from a browser.

Things we've tried.

  • importing the SSL into Lucee from the target domain using Lucee server admin and restarting.

  • Spinning up an instance of Lucee using CommandBox, and then copying the cacerts file from CommandBox to the Lucee Server.


Solution

  • the final solution for us was running the following two commands. this is for a CentOS7, Java 8, Tomcat, Lucee5 set up ...

    step 1: back up the lucee keystore:

    mv /opt/tomcatxxx/webapps/xxxx/WEB-INF/lucee-server/context/security/cacerts /opt/tomcatxxx/webapps/xxxx/WEB-INF/lucee-server/context/security/cacerts.bak
    

    (where /opt/tomcatXXX/webapps/XXX/WEB-INF/ is the path to the lucee instance)

    step 2: make a symbolic link between the java keystore and the lucee keystore

    ln -s /opt/tomcatxxx/conf/s2s-ubertruststore_01_10_18.jks /opt/tomcatxxx/webapps/xxxx/WEB-INF/lucee-server/context/security/cacerts
    

    Essentially, the keystore that came with Lucee5 didn't work out of the box. Pointing the lucee keystore to the working Java keystore fixed it.

    Step 3: Restart Tomcat and lucee