I am running a Spring Boot application with embedded Tomcat via the spring-boot-maven-plugin which uses a Oracle JDBC driver. On startup of the application I get an exception
[WARN] org.apache.tomcat.util.scan.StandardJarScanner [] - Failed to scan [file:/.../.m2/repository/com/oracle/database/jdbc/ojdbc8/19.10.0.0/oraclepki.jar] from classloader hierarchy (main)
java.io.IOException: java.lang.reflect.InvocationTargetException
...
Caused by: java.lang.reflect.InvocationTargetException: null
...
Caused by: java.nio.file.NoSuchFileException: /.../.m2/repository/com/oracle/database/jdbc/ojdbc8/19.10.0.0/oraclepki.jar
I found this Tomcat issue: https://bz.apache.org/bugzilla/show_bug.cgi?id=62560 There they added the mentioned oraclepki.jar file to https://github.com/apache/tomcat/blob/9.0.44/conf/catalina.properties But oraclepki.jar is missing in https://github.com/spring-projects/spring-boot/blob/master/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/tomcat/TldPatterns.java although the comment says
// Same as Tomcat
which is not true if I compare this with Tomcats catalina.properties.
Would it be possible to update TOMCAT_SKIP of TldPatterns.java to the value of jarsToSkip of catalina.properties?
Comment From: philwebb
Thanks for raising this @rmueller83. I've aligned the properties and also added a test to ensure they don't drift again.
Comment From: rmueller83
Thank you for the quick fix and the extra effort with the test case! 👍