GWT 2.10.0 and TLD/JAR Scanner Error

Skip to first unread message

Aynesh Patel

Apr 28, 2023, 4:45:27 PM4/28/23
to GWT Users

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:


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.lang.reflect.InvocationTargetException
at org.apache.tomcat.util.compat.Jre9Compat.jarFileNewInstance(
at org.apache.tomcat.util.scan.JarFileUrlJar.<init>(
at org.apache.tomcat.util.scan.JarFactory.newInstance(
at org.apache.tomcat.util.scan.StandardJarScanner.process(
at org.apache.tomcat.util.scan.StandardJarScanner.processURLs(
at org.apache.tomcat.util.scan.StandardJarScanner.doScanClassPath(
at org.apache.tomcat.util.scan.StandardJarScanner.scan(
at org.apache.jasper.servlet.TldScanner.scanJars(
at org.apache.jasper.servlet.TldScanner.scan(
at org.apache.jasper.servlet.JasperInitializer.onStartup(
at weblogic.servlet.internal.WebAppServletContext.initContainerInitializers(

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.>

This link ( mentioned that the org.apache.tomcat.util.scan.StandardJarScanner can originate from apache-jsp JARs which gwt-dev 2.10.0 has a dependency. I confirmed this in my IDE and maven repository but I have been unable to prevent the scanning of the classpath hierarchy for TLDs. Is there a way to disable this scanning of TLDs and JAR files from the classloader hierarchy?

Help is very much appreciated!

Thank you,
Aynesh Patel

Colin Alworth

Apr 30, 2023, 2:21:50 PM4/30/23
to GWT Users
I think a little more detail could help us to identify the problem, but to start with, gwt-dev should never be on your server classpath - and neither should its dependencies. If you have gwt-dev.jar or GWT's preferred apache-jsp.jar on your server classpath, you should remove that (either build your client separately from your server code, or exclude those dependencies from being provided at runtime by maven). Given that you are using WebLogic rather than Tomcat already, I'm guessing that this is the source of your problem.

Aynesh Patel

May 1, 2023, 8:25:45 PM5/1/23
to GWT Users
That seemed the be the issue. Gwt-dev was already set to a provided scope in Maven but there was an oversight in its dependencies. Htlmunit and apache-jsf wee being included on the classpath due to overriding the version and not setting the scope. Made sure everything under gwt-dev isn't on the classpath and it seems to be deploying normally with a few minor errors related to server configuration that can be fixed. Thank you very much!
Reply all
Reply to author
0 new messages