georchestra / mapstore2-georchestra

geOrchestra newest viewer
Other
6 stars 23 forks source link

georchestra/mapstore 22.0.x serie - postgresql JDBC driver too old for postgresql server 14 #539

Open pmauduit opened 2 years ago

pmauduit commented 2 years ago

I am currently working on deploying a georchestra on a host with the last ubuntu LTS version, which provides postgresql server 14. Using the docker image georchestra/mapstore:22.0.2-georchestra, the bootstrap fails, with the following stacktrace:

mapstore_1               | ERROR 2022-06-08 10:58:33.716 org.springframework.web.context.ContextLoader::initWebApplicationContext:220 - Context initialization failed
mapstore_1               | org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'geostoreInitializer' defined in URL [file:/usr/local/tomcat/webapps/mapstore/WEB-INF/classes/applicationContext.xml]: Invocation of init method failed; nested exception is javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: Cannot open connection
[...]
mapstore_1               | Caused by: org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (The authentication type 10 is not supported. Check that you have configured the pg_hba.conf file to include the client's IP address or subnet, and that it is using an authentication scheme supported by the driver.)
mapstore_1               |  at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1225)
mapstore_1               |  at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880)
mapstore_1               |  at org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider.getConnection(InjectedDataSourceConnectionProvider.java:47)
mapstore_1               |  at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:423)
mapstore_1               |  ... 59 more
mapstore_1               | Caused by: org.postgresql.util.PSQLException: The authentication type 10 is not supported. Check that you have configured the pg_hba.conf file to include the client's IP address or subnet, and that it is using an authentication scheme supported by the driver.
mapstore_1               |  at org.postgresql.core.v3.ConnectionFactoryImpl.doAuthentication(ConnectionFactoryImpl.java:396)
mapstore_1               |  at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:108)
mapstore_1               |  at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:66)
mapstore_1               |  at org.postgresql.jdbc2.AbstractJdbc2Connection.<init>(AbstractJdbc2Connection.java:125)
mapstore_1               |  at org.postgresql.jdbc3.AbstractJdbc3Connection.<init>(AbstractJdbc3Connection.java:30)
mapstore_1               |  at org.postgresql.jdbc3.Jdbc3Connection.<init>(Jdbc3Connection.java:24)
mapstore_1               |  at org.postgresql.Driver.makeConnection(Driver.java:393)
mapstore_1               |  at org.postgresql.Driver.connect(Driver.java:267)
mapstore_1               |  at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38)
mapstore_1               |  at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:294)
mapstore_1               |  at org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:1247)
mapstore_1               |  at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1221)
mapstore_1               |  ... 62 more

Looking into the classpath, we can see that the jdbc driver provided is a pretty old one: postgresql-8.4-702.jdbc3.jar. The docker image with the latest tag is providing a 42.2.23 version which seems fine with the v14 of postgresql though.

Since our stable version of geOrchestra is based on tag from the 2021.02.xx branch, will it be possible to upgrade the postgresql jdbc driver version in this specific branch ?