I have GeoServer 2.26 with plugins app-schema, and 2 comunity plugins, smart-data-loader and ogcapi-features.
I have a PostGIS store and try to add a Smart Data Loader. I get the domain model view in the GUI. On attempt to save the store I get errors cited below.
I see no error in the database log, (but a bunch of SELECT statements).
Postgres is version 13.15.
Both GeoServer and Postgres/PostGIS are in running in docker containers.
Am I in the right forum for such a question ?
The reWriteBatchedInserts seems to be not set correctly in the plugin’s Java code (?)
GeoServers Error message:
Error creating data store, check the parameters. Error message: Unable to obtain connection: Cannot create PoolableConnectionFactory (oid type bytea?reWriteBatchedInserts=false not known and not a number)
The server log has these:
16 Nov 16:20:34 WARN [data.store] - Error obtaining new data store
java.io.IOException
. . .
Caused by: java.lang.RuntimeException: Unable to obtain connection: Cannot create PoolableConnectionFactory (oid type bytea?reWriteBatchedInserts=false not known and not a number)
at org.geotools.jdbc.JDBCDataStore.createConnection(JDBCDataStore.java:2343)
. . .
Caused by: org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (oid type bytea?reWriteBatchedInserts=false not known and not a number)
at org.apache.commons.dbcp.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:1549)
. . .
Caused by: org.postgresql.util.PSQLException: oid type bytea?reWriteBatchedInserts=false not known and not a number
at org.postgresql.core.Oid.valueOf(Oid.java:142)
at org.postgresql.jdbc.PgConnection.getOidSet(PgConnection.java:479)
at org.postgresql.jdbc.PgConnection.getBinaryEnabledOids(PgConnection.java:449)
at org.postgresql.jdbc.PgConnection.(PgConnection.java:291)
at org.postgresql.Driver.makeConnection(Driver.java:446)
Looks like PostGisNG GeoTools driver automatically adds the postgresql connection URL configurations query parameter: ?reWriteBatchedInserts=true/false
This looks a recent addition to latest GeoServer versions during this (2024) year.
You can start checking if you are adding some extra values on the database field on the postgis store, in any case this url parameter will be added by the driver causing this wrong behavior building a malformed JDBC URL. Same check applies if a JNDI connection is in use.
Maybe would you like to share your datastore parameters to build the postgisNG datastore on GeoServer? (you can omit passwords and host names).
I see your datastore definition is correct. Due to the new added URL parameters to the JDBC connection URL coming from Postgresql geotools store module, smart data loader is not able to recognize and separate the database identifier from the remaining text adding parameters.