I ran into a situation where the KML output requests with time templates
caused some errors. Although it was pretty easy to fix, I hope this
description can prevent others from having the same issue. This occured
with Geoserver 1.6-beta3.
Here is my setup...
The info.xml file for the truck_obs feature type refers to the osu_freight
datastore:
<featureType datastore = "osu_freight" >
<name>truck_obs</name>
...
</featureType>
The catalog.xml file maps the osu_freight datastore to the mtri_postgis
namespace:
<datastore namespace = "mtri_postgis" enabled = "true" id =
"osu_freight" >
<connectionParams >
<parameter value = "mtri_postgis" name = "namespace" />
...
</connectionParams>
</datastore>
When the time template for the feature type is utilized, geoserver throws an
error to the log file that refers to the namespace 'mtri' (note: this is not
the namespace that was configured in the catalog.xml file)
INFO | jvm 1 | 2007/10/19 09:31:47 | 171381089 [btpool0-1] WARN
org.geoserver.kml - Error occured processing 'time' template: Could not
locate FeatureTypeConfig 'mtri:truck_obs'
INFO | jvm 1 | 2007/10/19 09:31:47 | 171381089 [btpool0-1] WARN
org.geoserver.ows -
INFO | jvm 1 | 2007/10/19 09:31:47 | java.io.IOException
INFO | jvm 1 | 2007/10/19 09:31:47 | at
org.vfny.geoserver.wms.responses.map.kml.KMZMapProducer.writeTo(KMZMapProducer.java:134)
INFO | jvm 1 | 2007/10/19 09:31:47 | at
org.vfny.geoserver.wms.responses.GetMapResponse.writeTo(GetMapResponse.java:539)
Why did this happen? Because I mistakenly ended up with the same uri for
two namespaces in the catalog.xml file, and the time template seems to have
picked up the wrong one. (I know that this is a no-no, but I was using the
UI to add the namespace and I didn't check to see if it was unique)
<namespaces >
<namespace uri = "http://www.mtri.org" prefix = "mtri" />
<namespace uri = "http://www.mtri.org" prefix = "mtri_postgis" />
</namespaces>
Once I made the URI values unique, the error message went away.
Here are some thoughts on how to keep this from happening to other users:
- change the time templating so that it doesn't assume the URI values will
be unique
- have the GeoServer UI prevent users from adding a non-unique URI
Tyler
--
View this message in context: http://www.nabble.com/non-unique-namespace-URI-cause-error-with-KML-time-templates-tf4653372.html#a13295134
Sent from the GeoServer - User mailing list archive at Nabble.com.