My two cents:In my case, cacerts was not a folder, but a file, and also it was presents on two pathsAfter discover it, error disappeared after copy the .jks file over that file.
# locate cacerts /usr/java/jdk1.8.0_221-amd64/jre/lib/security/cacerts/usr/java/jre1.8.0_221-amd64/lib/security/cacerts
After backup them, I copy the .jks over.
cp /path_of_jks_file/file.jks /usr/java/jdk1.8.0_221-amd64/jre/lib/security/cacertscp /path_of_jks_file/file.jks /usr/java/jre1.8.0_221-amd64/lib/security/cacerts
Note: this basic trick resolves this error on a Genexus project, in spite file.jks is also on the server.xml file of the Tomcat.