Incomplete database setup with PostGIS 3
See original GitHub issueIssue Description
Hi, I am trying to establish the connection to the 3DCityDB instance but there is an error I ca not identify. The citydb schema is already created on my database and I don’tknow how to load the missing citydb_pkg as stated on the log. I would be happy with some help! By the way, if there is a best place to discuss issues related with 3D CityDB and/or CityGML, please, inform me. Thanks
[19:20:23 INFO] Connecting to database profile 'Berlin model'. [19:20:26 ERROR] Connection to database could not be established. [19:20:26 ERROR] Check the following stack trace for details: [19:20:26 ERROR] java.sql.SQLException: Failed to retrieve version information from the 3D City Database instance. at org.citydb.database.adapter.postgis.UtilAdapter.getCityDBVersion(UtilAdapter.java:76) at org.citydb.database.adapter.AbstractUtilAdapter.getDatabaseInfo(AbstractUtilAdapter.java:94) at org.citydb.database.connection.DatabaseConnectionPool.connect(DatabaseConnectionPool.java:159) at org.citydb.database.DatabaseController.connect(DatabaseController.java:73) at org.citydb.modules.database.gui.view.DatabasePanel.connect(DatabasePanel.java:463) at org.citydb.modules.database.gui.view.DatabasePanel$1.doInBackground(DatabasePanel.java:311) at org.citydb.modules.database.gui.view.DatabasePanel$1.doInBackground(DatabasePanel.java:307) at javax.swing.SwingWorker$1.call(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at javax.swing.SwingWorker.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Caused by: org.postgresql.util.PSQLException: ERROR: schema "citydb_pkg" does not exist Position: 15 at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2440) at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2183) at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:308) at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:441) at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:365) at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:307) at org.postgresql.jdbc.PgStatement.executeCachedSql(PgStatement.java:293) at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:270) at org.postgresql.jdbc.PgStatement.executeQuery(PgStatement.java:224) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.tomcat.jdbc.pool.StatementFacade$StatementProxy.invoke(StatementFacade.java:114) at com.sun.proxy.$Proxy45.executeQuery(Unknown Source) at org.citydb.database.adapter.postgis.UtilAdapter.getCityDBVersion(UtilAdapter.java:66) ... 12 more
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (6 by maintainers)
Ok, was relatively easy to solve (at least for a correct database setup - haven’t tested imports etc.). In PostGIS 3, all the raster functionality has been moved to its own extension
postgis_raster
. You simply have to add this extension to your DB, too.This is something we should def. check when creating the DB. Either we enforce users to create this extension - or we check if the extension is missing and do not create the corresponding tables. This would be similar to what we already do in Oracle. I would prefer the latter and would write a PR for it.
I know that Postgres 12 and PostGIS 3 removed some legacy code. Some of what the 3DCityDB seems to use. Will check what it is and provide a fix.