[Geoserver-users] Failing Postgis store when upgrading geoserver to 2.22.1

Dear,

I upgraded my geoserver instance to 2.22.1 and it created issues with all my postgis stores.

https://spatial.naturalsciences.be/

The previous version I had is 2.19.2

Now, when I try to connect/download my layers I get the following error message:

version="1.1.1" > <ServiceException>
java.lang.reflect.UndeclaredThrowableExceptionUnable to obtain connection: Cannot create PoolableConnectionFactory (Something unusual has occurred to cause the driver to fail. Please report this exception.)
Cannot create PoolableConnectionFactory (Something unusual has occurred to cause the driver to fail. Please report this exception.)
Something unusual has occurred to cause the driver to fail. Please report this exception.
class org.postgis.PGbox2d

The other type of data (GeoTiff, shapefiles, ...) are working as expected.

Do you have an idea on the reason of such an issue?

Many thanks for your help,

Nicolas de Ville

Nicolas:

Are you running GeoServer in Tomcat using JNDI (in order to share a connection pool). Or are you making each postgis datastore individually?

I do not know of a reason for such an issue so I am expecting that perhaps you have two database drivers loaded that are tripping on each other? It is common to move the postgresql driver from geoserver web application to tomcat libs (to setup a connection pool). If you just ugpraded geoserver perhaps you have two jdbc drivers trying to do the same activity.

···


Jody Garnett

I see a few ways forward:

  1. in the geoserver logs , you should be able to find the complete stack trace, of which this is only a part. Can you paste that here?
  2. There is a suspicious class org.postgis.PGbox2d in there. Maybe the postgres server has also been upgraded, and the postgis extension is missing?
  3. You have some kind of class loader conflict, e.g. 2 different postgres jdbc drivers. For tomcat: Can you tell which files postgresql*.* exist under tomcat/lib and under tomcat/webapps/geoserver/WEB-INF/lib . There should be only 1.

image001.png

···

Hans Yperman

Department IT

Vlaams Instituut voor de Zee vzw

InnovOcean Campus, Jacobsenstraat 1

8400 Oostende, België

:phone:+32 (0) 59 33 61 13

:e-mail: hans.yperman@…1715…

www.vliz.be


Van: Nicolas De Ville De Goyet <ndeville@…10529…>
Verzonden: dinsdag 7 februari 2023 15:09
Aan: GeoServer Mailing List List geoserver-users@lists.sourceforge.net
Onderwerp: [Geoserver-users] Failing Postgis store when upgrading geoserver to 2.22.1

Dear,

I upgraded my geoserver instance to 2.22.1 and it created issues with
all my postgis stores.

https://spatial.naturalsciences.be/

The previous version I had is 2.19.2

Now, when I try to connect/download my layers I get the following error
message:

version=“1.1.1” >
java.lang.reflect.UndeclaredThrowableExceptionUnable to obtain
connection: Cannot create PoolableConnectionFactory (Something unusual
has occurred to cause the driver to fail. Please report this exception.)
Cannot create PoolableConnectionFactory (Something unusual has occurred
to cause the driver to fail. Please report this exception.)
Something unusual has occurred to cause the driver to fail. Please
report this exception.
class org.postgis.PGbox2d

The other type of data (GeoTiff, shapefiles, …) are working as expected.

Do you have an idea on the reason of such an issue?

Many thanks for your help,

Nicolas de Ville


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@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Dear Jody and Hans,

Thanks a lot for your answers.

You nailed it properly both of you. There was a conflict between two postgres jdbc drivers.

One was under tomcat/lib and a new one was added under tomcat/webapps/geoserver/WEB-INF/lib when I made the upgrade.

Again thank you for your help, it would have taken me ages to find that…

Have a good evening,

Nicolas

image001.png

···

On 7/02/23 19:20, Hans Yperman wrote:

I see a few ways forward:

  1. in the geoserver logs , you should be able to find the complete stack trace, of which this is only a part. Can you paste that here?
  2. There is a suspicious class org.postgis.PGbox2d in there. Maybe the postgres server has also been upgraded, and the postgis extension is missing?
  3. You have some kind of class loader conflict, e.g. 2 different postgres jdbc drivers. For tomcat: Can you tell which files postgresql*.* exist under tomcat/lib and under tomcat/webapps/geoserver/WEB-INF/lib . There should be only 1.

Hans Yperman

Department IT

Vlaams Instituut voor de Zee vzw

InnovOcean Campus, Jacobsenstraat 1

8400 Oostende, België

:phone:+32 (0) 59 33 61 13

:e-mail: hans.yperman@anonymised.com1715…

www.vliz.be


Van: Nicolas De Ville De Goyet ndeville@anonymised.com
Verzonden: dinsdag 7 februari 2023 15:09
Aan: GeoServer Mailing List List geoserver-users@lists.sourceforge.net
Onderwerp: [Geoserver-users] Failing Postgis store when upgrading geoserver to 2.22.1

Dear,

I upgraded my geoserver instance to 2.22.1 and it created issues with
all my postgis stores.

https://spatial.naturalsciences.be/

The previous version I had is 2.19.2

Now, when I try to connect/download my layers I get the following error
message:

version=“1.1.1” >
java.lang.reflect.UndeclaredThrowableExceptionUnable to obtain
connection: Cannot create PoolableConnectionFactory (Something unusual
has occurred to cause the driver to fail. Please report this exception.)
Cannot create PoolableConnectionFactory (Something unusual has occurred
to cause the driver to fail. Please report this exception.)
Something unusual has occurred to cause the driver to fail. Please
report this exception.
class org.postgis.PGbox2d

The other type of data (GeoTiff, shapefiles, …) are working as expected.

Do you have an idea on the reason of such an issue?

Many thanks for your help,

Nicolas de Ville


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@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users