Jar files missing in tomcat8 startup

2019-07-30 13:13发布

问题:

I am currently working on cloud migration activities. We have installed a new “Apache Tomcat/8.0.43” in cloud server and transferred the war files from local to cloud. while starting the tomcat server I’m getting below error :

WARNING [localhost-startStop-1] org.apache.tomcat.util.scan.StandardJarScanner.scan Failed to scan [file:/usr/share/java/tomcat8/gdk_custom.jar] from classloader hierarchy java.io.FileNotFoundException: /usr/share/java/tomcat8/gdk_custom.jar (No such file or directory)

Similary, I am getting FileNotFoundException for below jars :

 java.io.FileNotFoundException: /usr/share/java/tomcat8/orai18n-utility.jar (No such file or directory)
 java.io.FileNotFoundException: /usr/share/java/tomcat8/orai18n-collation.jar (No such file or directory)
 java.io.FileNotFoundException: /usr/share/java/tomcat8/orai18n-translation.jar (No such file or directory)
 java.io.FileNotFoundException: /usr/share/java/tomcat8/orai18n-net.jar (No such file or directory)
 java.io.FileNotFoundException: /usr/share/java/tomcat8/orai18n-servlet.jar (No such file or directory)
 java.io.FileNotFoundException: /usr/share/java/tomcat8/orai18n-lcsd.jar (No such file or directory)
 java.io.FileNotFoundException: /usr/share/java/tomcat8/orai18n-tools.jar (No such file or directory)

Please help me to fix this.

回答1:

Generally JARs should be kept in tomcat's lib directory, rather you can scanAllDirectories. Have a look at JARScanner ( its about conf/context.xml ) and try all attributes of JarScanner with value true.



回答2:

See Answer to question Tomcat cannot find gdk_custom.jar

To prevent Tomcat from looking for the not needed Jars, add the following line in /conf/context.xml:

<Context>
  ...
  <JarScanner scanManifest="false"/>
</Context>