![]() |
|
|
|
|
Issue Type:
|
Bug
|
|
Affects Versions:
|
9.2 |
|
Assignee:
|
Rini Angreani
|
|
Components:
|
main |
|
Created:
|
27/May/13 2:47 AM
|
|
Description:
|
The first line of code belows assumes property name unmaps to AttributeDescriptor. For xpath attributes like xlink:href, they actually don't have a descriptor and unmap to Name. This causes ClassCastException.
This occurs when:
- a complex feature type has a geometry with native CRS.
- the filter on the type involves xpath attributes (e.g. xlink:href)
This should occur with/without joining.
private CoordinateReferenceSystem findPropertyCRS(PropertyName propertyName) {
AttributeDescriptor at = (AttributeDescriptor) propertyName.evaluate(featureType);
[Geoserver-users] app-schema query fails with org.geotools.feature.NameImpl cannot be cast to org.opengis.feature.type.AttributeDescriptor
From: Sen, Marcus A. <mase@bg...> - 2013-05-15 15:24
I have been testing some queries to a complex feature service using app-schema and am getting the following exception report for one query:
<ows:ExceptionReport version="1.0.0"
xsi:schemaLocation="http:
xmlns:xsi="http: xmlns:ows="http://www.opengis.net/ows">
<ows:Exception exceptionCode="NoApplicableCode">
<ows:ExceptionText>java.lang.ClassCastException: org.geotools.feature.NameImpl cannot be cast to org.opengis.feature.type.AttributeDescriptor
org.geotools.feature.NameImpl cannot be cast to org.opengis.feature.type.AttributeDescriptor</ows:ExceptionText>
</ows:Exception>
</ows:ExceptionReport>
{/code}
Details as below:
Tested versions v2.3.1 and nightly build of 2013-05-09
The source data is in PostGIS with the tables created by the scripts in https:
The GeoServer app-schema configuration files are as in the data directory https:
app-schema joining has been switched on.
The query which fails with the above exception is:
Query 1 (fails)
---
<?xml version="1.0" encoding="UTF-8"?>
<wfs:GetFeature xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd"
xmlns:gsml="http://xmlns.geosciml.org/GeoSciML-Core/3.1"
xmlns:gsmlgu="http://xmlns.geosciml.org/GeologicUnit/3.1" xmlns:ogc="http://www.opengis.net/ogc"
xmlns:wfs="http://www.opengis.net/wfs"
xmlns:gml="http://www.opengis.net/gml/3.2" service="WFS"
version="1.1.0"
maxFeatures="100"
outputFormat="gml32">
<wfs:Query typeName="gsml:MappedFeature">
<ogc:Filter>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>gsml:specification/gsmlgu:GeologicUnit/gsml:relatedFeature/gsmlga:GeologicHistory/gsml:relatedFeature/gsmlga:GeologicEvent/gsmlga:olderNamedAge/@xlink:href</ogc:PropertyName>
<ogc:Literal>http://resource.geosciml.org/classifier/ics/ischart/Devonian</ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:Filter>
</wfs:Query>
</wfs:GetFeature>
|
|
Fix Versions:
|
10-beta |
|
Project:
|
GeoTools
|
|
Priority:
|
Major
|
|
Reporter:
|
Rini Angreani
|
|
|
|
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
|
------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may
_______________________________________________
GeoTools-Devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel