Closed archaeogeek closed 4 years ago
This problem also occurs when there's an entry in the geometry_columns table for a table that no longer exists (which can only happen when the version of PostGIS is quite old).
@archaeogeek you can test it on your version. You will have to copy this file in your Talend installationplugins/org.talend.sdi.designer.components/components/sGeoBasicOperation/sGeoBasicOperation_main.javajet
and then when the focus is in your job workspace, you can use CTRL+SHIFT+F3 to reload components (or if it does not work, restart talend) to reload the change.
@fxprunayre that seems to work just fine thanks! Happy to close
If scan_vector encounters a table with no rows in it, then it exits with the following error:
It fails to process any further tables and moves on to publish_metadata. I have managed to replicate this in the following way:
1) Create a clean postgresql database with postgis enabled (I am using PostgreSQL 9.5 and PostGIS 2.5) 2) Create two spatial tables (I'm using dbmanager in qgis 2.18) 3) Add some features to the second table (the one that appears second in public.geometry_columns) 4) Run metadata crawler (run 0.1 job) and get the nullpointer exception, no metadata created 5) Add some features to the first table (the one appearing first in public.geometry_columns) 6) Run metadata crawler (run 0.1 job) and get no nullpointer exception- metadata is created for both tables
I have experimented further with adding additional schemas, and re-ordering the tables so that the table with no features appears lower down the list in geometry_columns and seem to be able to replicate the problem consistently.
Is there any way to get scan_vector to skip tables with no rows (and hence no spatial extent, I assume) and continue to the next table without triggering a fatal error?