JDBC1DataStore fails to provide a feature reader when query requires less
attributes than those used in the filter
------------------------------------------------------------------------------------------------------------------
Key: GEOT-1069
URL: http://jira.codehaus.org/browse/GEOT-1069
Project: GeoTools
Issue Type: Bug
Components: data jdbc
Affects Versions: 2.3.M0, 2.2.2, 2.4.M0
Reporter: Andrea Aime
Fix For: 2.2.3, 2.3.1, 2.4.M0
A query like this:
<?xml version="1.0" encoding="UTF-8"?>
<wfs:GetFeature service="WFS" version="1.0.0"
xmlns:gml="http://www.opengis.net/gml"
xmlns:ogc="http://www.opengis.net/ogc"
xmlns:wfs="http://www.opengis.net/wfs"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<wfs:Query typeName="topp:world">
<ogc:PropertyName>the_geom</ogc:PropertyName>
<ogc:Filter>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>name</ogc:PropertyName>
<ogc:Literal>United States</ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:Filter>
</wfs:Query>
</wfs:GetFeature>
makes JDBC1DataStore throw the following exception:
Caused by: java.lang.IllegalArgumentException: FeatureReader allready produces
contents with the correct schema
at
org.geotools.data.ReTypeFeatureReader.typeAttributes(ReTypeFeatureReader.java:88)
at
org.geotools.data.ReTypeFeatureReader.<init>(ReTypeFeatureReader.java:68)
at
org.geotools.data.jdbc.JDBC1DataStore.getFeatureReader(JDBC1DataStore.java:699)
at
org.geotools.data.jdbc.JDBCFeatureCollection.reader(JDBCFeatureCollection.java:78)
because the code tries to re-type a feature reader that already provide the
requested attributes.
This happens only if some of the properties used in the filter are not among
the query requested properties (which happens quite likely when the query has
been setup by the streaming renderer)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel