[Geoserver-users] Installing Geoserver 2.23.2 into Tomcat 10.1.13

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.

GeoServer cannot be deployed in Tomcat 10.x presently as we have not made the migration to Jakarta yet.

Please see https://github.com/geoserver/geoserver/wiki/Jakarta-EE as we begin to outline the work required.

···


Jody Garnett

Hi Graham,

You wrote that you have now Geoserver successfully deployed on Tomcat 10. Could you tell shortly for Jody and other users what did you actually do?

-Jukka Rahkonen-

···

Lähettäjä: Jody Garnett jody.garnett@anonymised.com
Lähetetty: torstai 21. syyskuuta 2023 4.07
Vastaanottaja: Humphries, Graham Graham.Humphries@anonymised.com
Kopio: geoserver-users@lists.sourceforge.net
Aihe: Re: [Geoserver-users] Installing Geoserver 2.23.2 into Tomcat 10.1.13

GeoServer cannot be deployed in Tomcat 10.x presently as we have not made the migration to Jakarta yet.

Please see https://github.com/geoserver/geoserver/wiki/Jakarta-EE as we begin to outline the work required.

Jody Garnett

On Sep 20, 2023 at 5:46:14 PM, “Humphries, Graham” <Graham.Humphries@anonymised.com> wrote:

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.


CONFIDENTIALITY NOTICE AND DISCLAIMER
The information in this transmission may be confidential and/or protected by legal professional privilege, and is intended only for the person or persons to whom it is addressed. If you are not such a person, you are warned that any disclosure, copying or dissemination of the information is unauthorised. If you have received the transmission in error, please immediately contact this office by telephone, fax or email, to inform us of the error and to enable arrangements to be made for the destruction of the transmission, or its return at our cost. No liability is accepted for any unauthorised use of the information contained in this transmission.


Geoserver-users mailing list

Please make sure you read the following two resources before posting to this list:

If you want to request a feature or an improvement, also see this: https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer

Geoserver-users@anonymised.comsts.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Op 21-09-2023 om 09:20 schreef Rahkonen Jukka:

Hi Graham,

You wrote that you have now Geoserver successfully deployed on Tomcat 10. Could you tell shortly for Jody and other users what did you actually do?

The Apache Tomcat community provides tooling to convert webapps from Java EE 8 to Jakarta EE 9; it's available at https://github.com/apache/tomcat-jakartaee-migration

I've not used it, but it's probably what Graham used.

-M

Deploying a working version of Geoserver into Tomcat 10 was pretty straight forward.

From the Tomcat migration docs:

Tomcat can convert an existing web application from Java EE 8 to Jakarta EE 9 at deployment time using the Apache Tomcat migration tool for Jakarta EE. To make use of the feature, the web application should be placed in the Host legacyAppBase folder (by default named webapps-javaee) and they will be converted to an equivalent Jakarta EE web application in the Host appBase folder (by default named webapps).

I created a directory called webapps-javaee at the same level as the Tomcat webapps directory. I then copied the geoserver.war file into the webapps-javee directory.

Tomcat then automatically ran its migration process and deployed the app into the webapps directory.

After this Geoserver was running. I installed the oracle plugin and updated the web.xml file to connect to my data directory.

I restarted Geoserver and could access all my layers etc. However, I have not tested Geoserver beyond some basic checks.

Cheers,

···

Graham Humphries

From: Rahkonen Jukka jukka.rahkonen@anonymised.com
Sent: Thursday, 21 September 2023 5:21 PM
To: Jody Garnett jody.garnett@anonymised.com; Humphries, Graham Graham.Humphries@anonymised.com
Cc: geoserver-users@lists.sourceforge.net
Subject: VS: [Geoserver-users] Installing Geoserver 2.23.2 into Tomcat 10.1.13

Hi Graham,

You wrote that you have now Geoserver successfully deployed on Tomcat 10. Could you tell shortly for Jody and other users what did you actually do?

-Jukka Rahkonen-

Lähettäjä: Jody Garnett <jody.garnett@anonymised.com>
Lähetetty: torstai 21. syyskuuta 2023 4.07
Vastaanottaja: Humphries, Graham <Graham.Humphries@anonymised.com>
Kopio: geoserver-users@lists.sourceforge.net
Aihe: Re: [Geoserver-users] Installing Geoserver 2.23.2 into Tomcat 10.1.13

GeoServer cannot be deployed in Tomcat 10.x presently as we have not made the migration to Jakarta yet.

Please see https://github.com/geoserver/geoserver/wiki/Jakarta-EE as we begin to outline the work required.

Jody Garnett

On Sep 20, 2023 at 5:46:14 PM, “Humphries, Graham” <Graham.Humphries@anonymised.com> wrote:

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.


CONFIDENTIALITY NOTICE AND DISCLAIMER
The information in this transmission may be confidential and/or protected by legal professional privilege, and is intended only for the person or persons to whom it is addressed. If you are not such a person, you are warned that any disclosure, copying or dissemination of the information is unauthorised. If you have received the transmission in error, please immediately contact this office by telephone, fax or email, to inform us of the error and to enable arrangements to be made for the destruction of the transmission, or its return at our cost. No liability is accepted for any unauthorised use of the information contained in this transmission.


Geoserver-users mailing list

Please make sure you read the following two resources before posting to this list:

If you want to request a feature or an improvement, also see this: https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer

Geoserver-users@anonymised.comsts.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

I performed a similar test previously, because our application uses reflection not everything is available to be caught by the tomcat migration process.

···


Jody Garnett