Embedded tomcat giving failed to scan jars from classloader hierarchy

user3592502 picture user3592502 · Jun 17, 2017 · Viewed 10.6k times · Source

I am newly trying out Embedded tomcat version 8.0.15. Downloaded the maven dependency into my project.

Create the necessary context and instances. Tomcat server is coming up fine. But I am getting the below warnings

Jun 17, 2017 9:50:44 PM org.apache.tomcat.util.scan.StandardJarScanner scan 
WARNING: Failed to scan  [file:/C:/Users/raghavender.n/.m2/repository/xalan/xalan/2.7.2/xercesImpl.jar] from classloader hierarchy
java.io.FileNotFoundException:C:\Users\raghavender.n\.m2\repository\xalan\xalan\2.7.2\xercesImpl.jar (The system cannot find the file specified)
WARNING: Failed to scan [file:/C:/Users/raghavender.n/.m2/repository/xalan/xalan/2.7.2/xml-apis.jar] from classloader hierarchy
java.io.FileNotFoundException: C:\Users\raghavender.n\.m2\repository\xalan\xalan\2.7.2\xml-apis.jar (The system cannot find the file specified)

<!-- https://mvnrepository.com/artifact/org.apache.tomcat.embed/tomcat-embed-core -->
<dependency>
    <groupId>org.apache.tomcat.embed</groupId>
    <artifactId>tomcat-embed-core</artifactId>
    <version>8.5.15</version>
</dependency>

How can i disable/avoid the warnings from embedded tomcat jar?

Answer

zmingchun picture zmingchun · Jun 7, 2018

you can add server.tomcat.additional-tld-skip-patterns=*.jar in application.propertiesfile or server: tomcat: additional-tld-skip-patterns: '*.jar' in application.ymlfile.

Refer : The Jar Scanner ComponentThe official reply.