[ckan-dev] CKAN CSW Harvest - GeoServer Error
Derek Hohls
dhohls at csir.co.za
Sun Feb 7 15:49:12 UTC 2016
We are trying to setup our GeoServer for harvesting by CKAN.
The plug-in has been installed and all seems good.
If I use Python and owslib.csw, then I am able to communicate and get results e.g.
>>> from owslib.csw import CatalogueServiceWeb
URL = 'http://localhost:8080/geoserver/csw'
>>> csw = CatalogueServiceWeb(URL)
>>> csw.getrecords2(maxrecords=20)
>>> csw.results
{'matches': 25, 'nextrecord': 21, 'returned': 20}
>>> for rec in csw.records:
... print csw.records[rec].title
...
Tasmania water bodies
Tasmania cities
Tasmania state boundaries
Tasmania roads
USA Population
World rectangle
However, trying a harvest from CKAN results in "dc:" errors:
2016-02-07 15:37:49,325 DEBUG [ckanext.spatial.harvesters.csw.CSW.gather] Starting gathering for http://localhost:8080/geoserver/csw/
2016-02-07 15:37:49,325 INFO [ckanext.spatial.lib.csw_client] Making CSW request: getrecords2 {'typenames': 'csw:Record', 'maxrecords': 10, 'sortby': <owslib.fes.SortBy object at 0x7f0c541551d0>, 'outputschema': 'http://www.isotc211.org/2005/gmd', 'cql': None, 'startposition': 0, 'esn': 'brief', 'constraints': []}
2016-02-07 15:37:50,403 ERROR [ckanext.spatial.harvesters.csw.CSW.gather] Exception: Traceback (most recent call last):
File "/usr/lib/ckan/default/src/ckanext-spatial/ckanext/spatial/harvesters/csw.py", line 95, in gather_stage
for identifier in self.csw.getidentifiers(page=10, outputschema=self.output_schema(), cql=cql):
File "/usr/lib/ckan/default/src/ckanext-spatial/ckanext/spatial/lib/csw_client.py", line 127, in getidentifiers
csw.getrecords2(**kwa)
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/owslib/csw.py", line 341, in getrecords2
self._invoke()
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/owslib/csw.py", line 605, in _invoke
raise ows.ExceptionReport(self._exml, self.owscommon.namespace)
ExceptionReport: 'Request failed due to: Sorting on dc:identifier/dc:value is not supported.\nSorting on dc:identifier/dc:value is not supported.'
2016-02-07 15:37:50,455 INFO [ckanext.harvest.model] Error gathering the identifiers from the CSW server ['Request failed due to: Sorting on dc:identifier/dc:value is not supported.\nSorting on dc:identifier/dc:value is not supported.']
2016-02-07 15:37:50,462 ERROR [ckanext.harvest.queue] Gather stage failed
Can anyone help with this (running GeoServer 2.8 and CKAN 2.5)
Thanks
Derek
--
This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard.
The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html.
This message has been scanned for viruses and dangerous content by MailScanner,
and is believed to be clean.
Please consider the environment before printing this email.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20160207/6d71dda5/attachment-0002.html>
More information about the ckan-dev
mailing list