When trying to add a CSV store, I get the following error when publishing the layer:
Debugging into the issue a bit, I have determined the following: 1. The CSV Data Store in GeoTools requires the filename to be of the form "/Users/tbarsballe/Downloads/locations.csv" (no protocol) 2. The default data store handling in geoserver automatically prepends the protocol to the file connection parameter if you do not supply it, so if you try to save the DataStoreInfo with file = "/Users/tbarsballe/Downloads/locations.csv", what actually gets saved is file = "file:///Users/tbarsballe/Downloads/locations.csv". 3. The CSV data store does no validity / connection checks when the store is first saved, so this issue doesn't throw an error until you go to publish the layer. CSV Data Store likely needs a custom store page implementation in geoserver for the UI to work, although the GeoTools store could also be updated to be more robust to support the protocol in the file path. |