While migrating to the newest stable Tomcat Server, it seems that latest versions of GeoServer (2.18, 2.19RC) is no more compatible with Tomcat 10, likely due to the fact that The Java package has changed from javax.servlet to jakarta.servlet as part of the migration to Servlet 5.0 API. See https://tomcat.apache.org/migration-10.html.

When deploying the Geoserver .war to Tomcat 10, we get

org.apache.catalina.core.StandardContext.listenerStart Error configuring application listener of class [org.geoserver.GeoserverInitStartupListener] java.lang.NoClassDefFoundError: javax/servlet/ServletContextListener

Are there any plans that GeoServer will run with this setting in near future?

What alternatives do we have?

1 Answer 1


This question appeared some time ago on the geoserver-users mailing list https://sourceforge.net/p/geoserver/mailman/message/37217720/.

On 09-02-2021 18:59

I'm trying to deploy Geoserver 2.18.2 with Tomcat 10.0.2 in a Debian 10 Machine.

I'm doing exactly what I was used to do with previous versions of Tomcat: simply deploy the war inside the webapps folder. But it refuses to work.

In the catalina.out file I get the following error: At least one JAR was scanned for TLDs yet contained no TLDs.

Has anyone experienced this before? Does Geoserver work with Tomcat 10?

You may be the first to try. As noted in the migration guide [1] "There is a significant breaking change between Tomcat 9.0.x and Tomcat 10.0.x. The Java package used by the specification APIs has changed from javax... to jakarta...."

Since Geoserver relies on a number of JEE technologies that have pretty much all been migrated to Jakarta projects basically any code in Geoserver using a "javax" package is likely to be broken.

[1] https://tomcat.apache.org/migration-10.html

Your alternatives are:

  1. Stay with Tomcat 9
  2. If you have a talent to program with Java fix the code and make a pull request
  3. Use commercial support channels http://geoserver.org/support/
  4. Wait until someone else takes steps 2) or 3).

Not the answer you're looking for? Browse other questions tagged or ask your own question.