0

On GeoFence startup, it states that it could not find relation geofence.gf_gfuser. My schema name is geofence.

I am using SQL views instead of tables. This post states that Hibernate will not have a problem reading from views. So why does this error occur?

Any insight would be appreciated.

Stacktrace:

Caused by: org.postgresql.util.PSQLException: ERROR: relation "geofence.gf_gfuser" does not exist

Additional config

geofence-datasource-ovr.properties

geofenceVendorAdapter.databasePlatform=org.hibernatespatial.postgis.PostgisDialect
geofenceDataSource.driverClassName=org.postgresql.Driver
geofenceDataSource.url=jdbc:postgresql://<host>:<port>/<db>
geofenceDataSource.username=<username>    
geofenceDataSource.password=<password>
geofenceEntityManagerFactory.jpaPropertyMap[hibernate.default_schema]=<schema>

geofenceEntityManagerFactory.jpaPropertyMap[hibernate.hbm2ddl.auto]=none
geofenceEntityManagerFactory.jpaPropertyMap[javax.persistence.validation.mode]=none
geofenceEntityManagerFactory.jpaPropertyMap[hibernate.validator.apply_to_ddl]=false
geofenceEntityManagerFactory.jpaPropertyMap[hibernate.validator.autoregister_listeners]=false
Werner Raath
  • 1,322
  • 3
  • 16
  • 34

1 Answers1

0

I ended up using the Foreign Data Wrapper PostgreSQL plugin to connect to the views.

Since the FDW connects to a database and references a table/view and creates a foreign table, linking GeoFence to those tables instead of the views fooled it into using the tables.

Note: My foreign tables and views are in seperate schemas, but in the same database.

Werner Raath
  • 1,322
  • 3
  • 16
  • 34