[Geoserver-devel] [jira] (GEOS-6255) Unable to use hyphenated namespace prefix for nested element

Guy Chisholm created BugGEOS-6255
Unable to use hyphenated namespace prefix for nested element

Issue Type:

BugBug

Affects Versions:

2.4.3

Assignee:

Rini Angreani

Components:

Application schema

Created:

06/Jan/14 10:51 AM

Description:

When trying nest a feature from a separate workspace (and therefore a different mapping file) that has a hyphen in the namespace prefix (e.g. tn-ro), Geoserver throws a runtime error reporting that the namespace has not been declared (see stacktrace below). If I take out the hyphen (e.g. tnro) from all the namespace prefix occurrences in question across all my mapping files (i.e. containing and nested), then it all works as expected.

 
...
Caused by: java.lang.IllegalArgumentException: No namespace set: The namespace has not been declared in the app-schema mapping file for name: (tn-ro:Road) [Check the Namespaces section in the config file] 
	at org.geotools.feature.type.Types.degloseName(Types.java:544)
	at org.geotools.data.complex.NestedAttributeMapping.getNestedFeatureType(NestedAttributeMapping.java:469)
	at org.geotools.data.complex.DataAccessMappingFeatureIterator.setAttributeValue(DataAccessMappingFeatureIterator.java:496)
	at org.geotools.data.complex.DataAccessMappingFeatureIterator.computeNext(DataAccessMappingFeatureIterator.java:1007)

All the workspaces (including the one with the hypenated prefix) work as expected on their own.

Environment:

Web archive (WAR)
Tomcat Version: Apache Tomcat/7.0.42
JVM Version: 1.7.0_40-b43
OS Name: OS X 10.8.5

Project:

GeoServer

Priority:

MajorMajor

Reporter:

Guy Chisholm

This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: [http://www.atlassian.com/software/jira](http://www.atlassian.com/software/jira)