question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Incomplete database setup with PostGIS 3

See original GitHub issue

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

image

[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:closed
  • Created 4 years ago
  • Comments:10 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
FxKucommented, Nov 5, 2019

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.

1reaction
FxKucommented, Nov 5, 2019

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

PostGIS 3.0.9dev Manual
2.6 Creating a spatial database using EXTENSIONS . ... PostGIS 3.0.9dev Manual iii. 2.11.1 Softupgrade .
Read more >
Add PostGIS spatial functions to a custom schema other than ...
Here are example commands for installing the PostGIS extension into a gc schema: CREATE SCHEMA gc; CREATE EXTENSION postgis SCHEMA gc;.
Read more >
PostGIS setup with Ubuntu 20.04.2 - CYBERTEC PostgreSQL
PostGIS must be enabled within each database separately. This implies that PostGIS must be registered as an extension within PostgreSQL's ...
Read more >
26.3. Continuous Archiving and Point-in-Time Recovery (PITR)
However, the existence of the log makes it possible to use a third strategy for backing up databases: we can combine a file-system-level...
Read more >
Set Up a PostGIS Database With Docker - Alex Urquhart
It means that you can download and run software like Postgres + PostGIS on any machine with minimal configuration very quickly. For anyone...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found