Hello,
I have a GWT 2.10.0 project compiled in Java 11, built with Maven 3.8.4 through the GWT-maven-plugin, and deployed to a WebLogic 14c server. Recently I have seen errors related to the Tomcat JAR scanner and the embedded server utilized in development mode. The application was working but after the upgrade to version 2.10.0, errors fill the server out log in WebLogic that the Tomcat StandardJarScanner failed to scan JAR files from the classloader hierarchy along with a silent failure of the application itself. After ensuring GWT was starting in Production Mode, I added the following elements to the configuration section of the plugin to ensure the server would not start up:
<noServer>true</noServer>
<compilerArgs>
<arg>-noincremental</arg>
</compilerArgs>
After recompiling with these changes the application was able to function normally once again but the errors regarding the JAR scanner being unable to scan from the classloader hierarchy remained. The JARs it attempted to scan were ones that are not part of the application nor in any of the dependency trees of the dependencies of the gwt-maven-plugin.
I want to disable that JAR scanning and the errors it produces when the application is started. I attempted to do so by adding a context.xml to the webapp/META-INF to the scanning with configuration to limit the scanner but it did not seem to have an effect. Here are logs for the errors happening in the out file for the WL server the application is deployed to:
Failed to scan <JarFile> from classloader hierarchy
Java.io.IOException: java.lang.reflect.InvocationTargetException
at org.apache.tomcat.util.compat.Jre9Compat.jarFileNewInstance(Jre9Compat.java:209)
at org.apache.tomcat.util.scan.JarFileUrlJar.<init>(JarFileUrlJar.java:65)
at org.apache.tomcat.util.scan.JarFactory.newInstance(JarFactory.java:49)
at org.apache.tomcat.util.scan.StandardJarScanner.process(StandardJarScanner.java:387)
at org.apache.tomcat.util.scan.StandardJarScanner.processURLs(StandardJarScanner.java:322)
at org.apache.tomcat.util.scan.StandardJarScanner.doScanClassPath(StandardJarScanner.java:284)
at org.apache.tomcat.util.scan.StandardJarScanner.scan(StandardJarScanner.java:235)
at org.apache.jasper.servlet.TldScanner.scanJars(TldScanner.java:262)
at org.apache.jasper.servlet.TldScanner.scan(TldScanner.java:104)
at org.apache.jasper.servlet.JasperInitializer.onStartup(JasperInitializer.java:101)
at weblogic.servlet.internal.WebAppServletContext.initContainerInitializers(WebAppServletContext.java:1428)
...
Additionally, in the server log file there is this outputted on startup:
<warning: No org.apache.tomcat.JarScanner set in ServletContext. Falling back to default JarScanner implementation.>
Help is very much appreciated!
Thank you,
Aynesh Patel