Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't list or add a datastore for Geoserver #191

Open
rfazimut opened this issue Oct 16, 2024 · 3 comments
Open

Can't list or add a datastore for Geoserver #191

rfazimut opened this issue Oct 16, 2024 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@rfazimut
Copy link

Describe the bug
With the current version, from the connection tab, I cannot add a database or iterate the list of database defined on the geoserver with this message:

File "C:\Users/rfortin/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\geocatbridge\servers\views\geoserver.py", line 184, in _addGeoserverPgDatastores
datastores = list(chain.from_iterable(worker_result))
TypeError: 'KeyError' object is not iterable

To Reproduce
Steps to reproduce the behavior:

  1. Add connection Geoserver
  2. Specify parameter and credential
  3. Select File-based...
  4. Test Connection == OK
  5. Change storage to Import into PostGIS database (managed by GeoServer)
    Datastore are defined on the server
  6. CLick Add datastore
  7. Specifiy parameter
  8. Click OK
  9. The error message shows.

Expected behavior
Datastore is added or listed from the Geoserver

Screenshots
If applicable, add screenshots to help explain your problem.

Environment info (please complete the following information):
Bridge version: GeoCat Bridge 4.5.1 for QGIS 3.16+
QGIS version: 3.22.5-Białowieża (rev c2723178)
OS version: Windows 10 10.0.19045
Python version: 3.9.5 (rev 0a7dcbd)

Additional context
GeoServer 2.26

@GeoSander GeoSander added the bug Something isn't working label Oct 16, 2024
@GeoSander
Copy link
Member

GeoSander commented Oct 16, 2024

Thanks for reporting @rfazimut.

Three additional questions I have:

  1. If there already is a PostGIS datastore on GeoServer (defined manually perhaps using the GS web UI -
    not using Bridge), and you select Import into PostGIS database (managed by GeoServer) (so at step 5 above), can you at least confirm that the combobox below it gets populated with some existing datastores?

  2. Which parameters (at step 7) do you specify? I don't mean the exact values (user, pass, etc.) but I would like to know which fields you are setting.

  3. After step 8 (OK), does the "Add datastore" dialog close first before the error appears?

Thanks,
Sander

@rfazimut
Copy link
Author

rfazimut commented Oct 17, 2024 via email

@GeoSander
Copy link
Member

Thanks for the info @rfazimut.

Besides the fact that this is not supposed to happen and we need to fix the user experience (in case there is an error accessing/listing the datastore), there also seems to be something peculiar about your datastore(s).

Since you get a 500 when using the Direct Connect approach, could you perhaps share the error that GeoServer throws (see GeoServer logs in web UI)?

Concerning the Reference existing PostGIS tables (if possible) option, you can right-click on it to get more info as to what that does:
image

That option will only work if:

  • The QGIS input layer source is a PostGIS vector/feature table;
  • You are using the Import into PostGIS (direct connect) storage method.

In that case it will work the way you thought it would.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants