Press "Enter" to skip to content

How to fix Tomcat error – org.apache.catalina.startup.ClassLoaderFactory validateFile

Symptom

while updating to Tomcat 7.0.84, errors ...

Feb 01, 2018 10:50:00 AM org.apache.catalina.startup.ClassLoaderFactory validateFile
WARNING: Problem with directory [/usr/share/tomcat7/"/usr/share/tomcat/lib/*.jar"], exists: [false], isDirectory: [false], canRead: [false]
Feb 01, 2018 10:53:37 AM org.apache.catalina.startup.ClassLoaderFactory validateFile
WARNING: Problem with directory [/usr/share/tomcat7/"/usr/share/tomcat/lib"], exists: [false], isDirectory: [false], canRead: [false]
Feb 01, 2018 10:53:37 AM org.apache.catalina.startup.ClassLoaderFactory validateFile
WARNING: Problem with directory [/usr/share/tomcat7/"/usr/share/tomcat/lib/*.jar"], exists: [false], isDirectory: [false], canRead: [false]
Feb 01, 2018 10:53:37 AM org.apache.catalina.startup.ClassLoaderFactory validateFile
WARNING: Problem with directory [/usr/share/tomcat7/"/usr/share/tomcat/lib"], exists: [false], isDirectory: [false], canRead: [false]
Feb 01, 2018 10:53:37 AM org.apache.catalina.startup.ClassLoaderFactory validateFile
WARNING: Problem with directory [/usr/share/tomcat7/"/usr/share/tomcat/lib/*.jar"], exists: [false], isDirectory: [false], canRead: [false]

How to fix

before

${catalina.base}/conf/catalina.properties
# Note: Values are enclosed in double quotes ("...") in case either the
#       ${catalina.base} path or the ${catalina.home} path contains a comma.
#       Because double quotes are used for quoting, the double quote character
#       may not appear in a path.
common.loader="${catalina.base}/lib","${catalina.base}/lib/*.jar","${catalina.home}/lib","${catalina.home}/lib/*.jar"

after

${catalina.base}/conf/catalina.properties
common.loader=${catalina.base}/lib,${catalina.base}/lib/*.jar,${catalina.home}/lib,${catalina.home}/lib/*.jar

Cause

with running Tomcat 7 and Tomcat 8 with same conf/ files, the change has been made as following:

http://tomcat.apache.org/tomcat-8.0-doc/changelog.html

55620: Enable Tomcat to start when either $CATALINA_HOME and/or $CATALINA_BASE contains a comma character. Prevent Tomcat from starting when $CATALINA_HOME and/or $CATALINA_BASE contains a semi-colon on Windows. Prevent Tomcat from starting when $CATALINA_HOME and/or $CATALINA_BASE contains a colon on inux/FreeBSD/etc.`

now running OK both 7 and 8.

Be First to Comment

发表评论

电子邮件地址不会被公开。 必填项已用*标注