Hi,

With Geoserver 2.3.1, we're trying to use the app schema extension and get a 
Java error see below:

24 Feb 15:40:37 ERROR [geoserver.ows] -
java.lang.RuntimeException: Error applying mapping with targetAttribute 
19112:territoryOfUse/gml:Polygon
      at 
org.geotools.data.complex.DataAccessMappingFeatureIterator.computeNext(DataAccessMappingFeatureIterator.java:776)
      at 
org.geotools.data.complex.AbstractMappingFeatureIterator.next(AbstractMappingFeatureIterator.java:172)
      at 
org.geotools.data.complex.AbstractMappingFeatureIterator.next(AbstractMappingFeatureIterator.java:55)
...
      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
      at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassCastException: 
org.geotools.feature.type.GeometryTypeImpl cannot be cast to 
org.opengis.feature.type.ComplexType
      at org.geotools.data.complex.filter.XPath.set(XPath.java:603)
      at org.geotools.data.complex.filter.XPath.set(XPath.java:555)
      at 
org.geotools.data.complex.DataAccessMappingFeatureIterator.setAttributeValue(DataAccessMappingFeatureIterator.java:446)
      at 
org.geotools.data.complex.DataAccessMappingFeatureIterator.computeNext(DataAccessMappingFeatureIterator.java:773)

A section of our mapping file is:
  <targetTypes>
    <FeatureType>
      
<schemaUri>http://frameworkwfs.usgs.gov/framework/schemas/gazetteer/1.0.0/gmlsf1/iso/2005/gmd/gmd.xsd</schemaUri>
      
<schemaUri>file:C:/OSP-Gazetteer/data/geoserver%20data/workspaces/iso19112/iso19112.xsd</schemaUri>
    </FeatureType>
  </targetTypes>
  <typeMappings>
    <FeatureTypeMapping>
      <sourceDataStore>Common Datastore</sourceDataStore>
      <sourceType>Common</sourceType>
      <targetElement>19112:SI_Gazetteer</targetElement>
      <attributeMappings>
        <AttributeMapping>
          <targetAttribute>19112:SI_Gazetteer</targetAttribute>
          <idExpression>
            <OCQL>getId()</OCQL>
          </idExpression>
        </AttributeMapping>
        <AttributeMapping>
          <targetAttribute>
            19112:name
          </targetAttribute>
          <sourceExpression>
            <OCQL>name</OCQL>
          </sourceExpression>
        </AttributeMapping>
        <AttributeMapping>
          <targetAttribute>
            19112:scope
          </targetAttribute>
          <sourceExpression>
            <OCQL>scope</OCQL>
          </sourceExpression>
        </AttributeMapping>
        <AttributeMapping>
          <targetAttribute>
            19112:territoryOfUse
          </targetAttribute>
          <targetAttributeNode>
            gml:PolygonPropertyType
          </targetAttributeNode>
        </AttributeMapping>
        <AttributeMapping>
          <targetAttribute>
            19112:territoryOfUse/gml:Polygon
          </targetAttribute>
          <ClientProperty>
            <name>srsName</name>
            <value>srs</value>
          </ClientProperty>
        </AttributeMapping>
        <AttributeMapping>
          <targetAttribute>
            
19112:territoryOfUse/gml:Polygon/gml:Exterior/gml:LinearRing/gml:PosList
          </targetAttribute>
          <sourceExpression>
            <OCQL>extent</OCQL>
          </sourceExpression>
        </AttributeMapping>
        <AttributeMapping>
          <targetAttribute>
            19112:custodian
          </targetAttribute>
          <targetAttributeNode>
            gmdsf1:CI_ResponsiblePartyPropertyType
          </targetAttributeNode>
        </AttributeMapping>
        <AttributeMapping>
          <targetAttribute>
            19112:custodian/gmdsf1:CI_ResponsibleParty/gmdsf1:organizationName
          </targetAttribute>
          <sourceExpression>
            <OCQL>organisation</OCQL>
          </sourceExpression>
        </AttributeMapping>
        <AttributeMapping>
          <targetAttribute>
            19112:custodian/gmdsf1:CI_ResponsibleParty/gmdsf1:role
          </targetAttribute>
          <sourceExpression>
            <OCQL>role</OCQL>
          </sourceExpression>
        </AttributeMapping>
      </attributeMappings>
    </FeatureTypeMapping>
  </typeMappings>
</as:AppSchemaDataAccess>

Any help or clues as to what we're doing wrong would be appreciated.

Regards,

Andrew
------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to