My dev environment has been upgraded to use java11. This is so I can deploy the latest version of Geoserver (2.23.2)
The server I am running is:
OS: SunOS version 5.11
Tomcat v 10.1.13
JVM 11.0.20.1+1-LTS
Geoserver failed to start when deployed with error messages like this:
21-Sep-2023 09:16:46.156 SEVERE [http-nio-8080-exec-34] org.apache.catalina.core.StandardContext.listenerStart Error configuring application listener of class [org.springframework.web.context.request.RequestContextListener]
java.lang.NoClassDefFoundError: javax/servlet/ServletRequestListener
Having looked into why this was happening it seems Tomcat 10.x has replaced java/servlet with Jakarta/servlet.
The Geoserver documentation for Web archives states:
Note
GeoServer has been mostly tested using Tomcat, and so is the recommended application server. GeoServer requires a newer version of Tomcat (7.0.65 or later) that implements Servlet 3 and annotation processing. Other application servers have been known to work, but are not guaranteed.
Having followed the Tomcat documentation for migrating from 9.x to 10.x Geoserver has successfully deployed and is now working.
Is this how Geoserver needs to be deployed into Tomcat 10.x for the time being?
Regards,
Graham Humphries | System Analyst
Department of State Growth
4 Salamanca Place, Hobart TAS 7000 | GPO Box 536, Hobart TAS 7001
In recognition of the deep history and culture of this island, I acknowledge and pay my respects to all Tasmanian Aboriginal people; the past, and present custodians of the Land.