I am using GeoServer 2.2 and with a WPS that creates a Layer and uses the ImportProcess to add it to a datastore of type ‘Directory of spatial files (shapefiles)’. It works great on a fresh deployment, but fails after a server restart.
The issue seems to be that after a server restart, the DataStore implementation is a wrapper class:
org.geoserver.feature.retype.RetypingDataStore (fails)
Whereas on a fresh deploy, the DataStore implementation class is:
org.geotools.data.directory.DirectoryDataStore (works)
The ImportProcess always calls createSchema() on the datastore. DirectoryDataStore has an implementation for this method but the RetypingDataStore is hardcoded to throw an UnsupportedOperationException. I don’t know know why GeoServer uses the RetypingDataStore on restart - the only thing I can think of is that on a fresh deployment, the datastore storage directory is empty whereas on restart there are some layer files in the datastore directory.
More details are below. Does anyone know why this is happening?
Thanks in advance,
–ee
A few more details
The ImportProcess is:
org.geoserver.wps.gs.ImportProcess
The datastore.xml
DataStoreInfoImpl-3fd1a82d:134489c7d5f:-7ffe site_map Datastore for the dynamic sites data layers Directory of spatial files (shapefiles) true WorkspaceInfoImpl--721d3cdd:1396e705af5:-8000 true America/Chicago shape true ISO-8859-1 shapefile true file:/some/path/in/the/webapp http://www.mynamespace.com/geoserver <__default>false