You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have found the issue that the adminrules are not working when using a schema other then public on a postgis setup. The admin rule lookup query uses references to the public.gf_adminrule and public.gf_gsinstance tables.
The solution was to create a dedicated database for the geofence instance and using its public schema.
The used version was a 3.3-SNAPSHOT
##Old config
geofenceVendorAdapter.databasePlatform=org.hibernatespatial.postgis.PostgisDialect
geofenceDataSource.driverClassName=org.postgresql.Driver
geofenceDataSource.url=jdbc:postgresql://postgresqldmz.domain.be:5432/dbgis
geofenceDataSource.username=geofencedev
geofenceDataSource.password=***
geofenceEntityManagerFactory.jpaPropertyMap[hibernate.default_schema]=geofencedev
geofenceEntityManagerFactory.jpaPropertyMap[hibernate.hbm2ddl.auto]=update
geofenceEntityManagerFactory.jpaPropertyMap[javax.persistence.validation.mode]=none
geofenceEntityManagerFactory.jpaPropertyMap[hibernate.validator.apply_to_ddl]=false
geofenceEntityManagerFactory.jpaPropertyMap[hibernate.validator.autoregister_listeners]=false
# Switch the DAOs from DB to LDAP
geofence_dao_registry.selectedType = LDAP
NEW config:
geofenceVendorAdapter.databasePlatform=org.hibernatespatial.postgis.PostgisDialect
geofenceDataSource.driverClassName=org.postgresql.Driver
geofenceDataSource.url=jdbc:postgresql://postgresqldmz.domain:5432/geofencedev2
geofenceDataSource.username=geofencedev2
geofenceDataSource.password=***
geofenceEntityManagerFactory.jpaPropertyMap[hibernate.default_schema]=public
geofenceEntityManagerFactory.jpaPropertyMap[hibernate.hbm2ddl.auto]=update
geofenceEntityManagerFactory.jpaPropertyMap[javax.persistence.validation.mode]=none
geofenceEntityManagerFactory.jpaPropertyMap[hibernate.validator.apply_to_ddl]=false
geofenceEntityManagerFactory.jpaPropertyMap[hibernate.validator.autoregister_listeners]=false
# Switch the DAOs from DB to LDAP
geofence_dao_registry.selectedType = LDAP
The text was updated successfully, but these errors were encountered:
I've been checking if this is a geofence persistence issue or a geoserver extension configuration.
add a maven profile to test postgres.
We need a maven profile in the geofence/modules/rest/test in order to be able to switch from H2 to PG to test the PG schema configuration.
check geofence-server configuration.
If geofence persistence is ok, it should be a matter of configuration (the datasource PropertyOverrider bean and related properties files)
add documentation about datasource bean and overrides.
Also, some documentation should be added about how db configuration is performed.
I have found the issue that the adminrules are not working when using a schema other then public on a postgis setup. The admin rule lookup query uses references to the public.gf_adminrule and public.gf_gsinstance tables.
The solution was to create a dedicated database for the geofence instance and using its public schema.
The used version was a 3.3-SNAPSHOT
The text was updated successfully, but these errors were encountered: