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

Cascading delete lets GeoServer throw exceptions #20

Open
ridoo opened this issue Jun 25, 2024 · 0 comments
Open

Cascading delete lets GeoServer throw exceptions #20

ridoo opened this issue Jun 25, 2024 · 0 comments

Comments

@ridoo
Copy link
Member

ridoo commented Jun 25, 2024

Python context geoserver/helpers.py: get_store() raises FailedRequestError when calling from geoserver/helpers.py: cascading_delete():

  try:
      store = get_store(cat, name, workspace=ws)
  except FailedRequestError:
      if ogc_server_settings.DATASTORE:
          try:
              layers = Dataset.objects.filter(alternate=dataset_name)
              for layer in layers:
                  store = get_store(cat, layer.store, workspace=ws)
          except FailedRequestError:
              logger.debug("the store was not found in geoserver")
      else:
          logger.debug("the store was not found in geoserver")
  if ws is None or store is None:
      logger.debug("cascading delete was called on a layer where the workspace was not found")

Not sure, if this will leave uncleaned artifacts.

Corresponding GeoServer log output:

geoserver4geonode_datapackage  | 25 Jun 13:32:13 ERROR  [geoserver.rest] - No such wms store: geonode,horizon_data
geoserver4geonode_datapackage  | org.geoserver.rest.ResourceNotFoundException 404 NOT_FOUND: No such wms store: geonode,horizon_data
geoserver4geonode_datapackage  |        at org.geoserver.rest.catalog.WMSStoreController.getExistingWMSStore(WMSStoreController.java:181)
geoserver4geonode_datapackage  |        at org.geoserver.rest.catalog.WMSStoreController.wmsStoreGet(WMSStoreController.java:93)
geoserver4geonode_datapackage  |        at jdk.internal.reflect.GeneratedMethodAccessor586.invoke(Unknown Source)
geoserver4geonode_datapackage  |        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
geoserver4geonode_datapackage  |        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
geoserver4geonode_datapackage  |        at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant