Details
Description
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)