Hi all,
I'm passing the following query to the WFS:
<wfs:GetFeature xmlns:wfs="http://www.opengis.net/wfs" version="1.1.0"
service="WFS" xmlns:aa="http://myns/"
xmlns:ogc="http://www.opengis.net/ogc">
<wfs:Query typeName="aa:feature_type">
<Filter>
<Between>
<PropertyName>error</PropertyName>
<LowerBoundary>0</LowerBoundary>
<UpperBoundary>10000</UpperBoundary>
</Between>
</Filter>
</wfs:Query>
</wfs:GetFeature>
When I try and do this I get an exception:
<ows:Exception exceptionCode="NoApplicableCode">
<ows:ExceptionText>java.util.NoSuchElementException: Could not
aquire feature:org.geotools.data.DataSourceException: Error Performing
SQL query: SELECT &quot;id&quot;,
encode(asBinary(force_2d(&quot;location&quot;),&apos;XDR&
;apos;),&apos;base64&apos;), &quot;error&quot; FROM
&quot;public&quot;.&quot;bathing_area&quot; WHERE LIMIT
1000000
Could not aquire feature:org.geotools.data.DataSourceException: Error
Performing SQL query: SELECT &quot;id&quot;,
encode(asBinary(force_2d(&quot;location&quot;),&apos;XDR&
;apos;),&apos;base64&apos;), &quot;error&quot; FROM
&quot;public&quot;.&quot;bathing_area&quot; WHERE LIMIT
1000000
Error Performing SQL query: SELECT &quot;id&quot;,
encode(asBinary(force_2d(&quot;location&quot;),&apos;XDR&
;apos;),&apos;base64&apos;), &quot;error&quot; FROM
&quot;public&quot;.&quot;bathing_area&quot; WHERE LIMIT
1000000
ERROR: syntax error at or near
&quot;LIMIT&quot;</ows:ExceptionText>
</ows:Exception>
On inspecting the SQL in the exception report I can see that the WHERE
clause is left empty. Surely it should be:
SELECT "id", encode(asBinary(force_2d("location"),'XDR'),'base64'),
"error" FROM "public"."feature_type" WHERE "error" BETWEEN 0 AND 10000
LIMIT 1000000
I can get around it with the obvious:
<wfs:GetFeature xmlns:wfs="http://www.opengis.net/wfs" version="1.1.0"
service="WFS" xmlns:aa="http://myns/"
xmlns:ogc="http://www.opengis.net/ogc">
<wfs:Query typeName="aa:feature_type">
<Filter>
<And>
<PropertyIsGreaterThan>
<PropertyName>error</PropertyName>
<Literal>0</Literal>
</PropertyIsGreaterThan>
<PropertyIsLessThan>
<PropertyName>error</PropertyName>
<Literal>10000</Literal>
</PropertyIsLessThan>
</And>
</Filter>
</wfs:Query>
</wfs:GetFeature>
Is this a known bug?
Many thanks,
Mark Lidstone
Tel: +44 (0)23 80232222; Fax: +44 (0)23 80232891
BMT Cordah Ltd
Grove House
7 Ocean Way
Ocean Village
Southampton
SO14 3TJ
BMT Cordah Ltd.
A member of the BMT group of companies
Registered Office: Investment House, 6 Union Row, Aberdeen AB10 1DQ
Registered in Scotland No. 163413
http://www.bmtcordah.com/
http://www.bmt.org/
The contents of this e-mail and any attachments are intended only for the use of the e-mail addressee(s) shown. If you are not that person, or one of those persons, you are not allowed to take any action based upon it or to copy it, forward, distribute or disclose the contents of it and you should please delete it from your system. BMT Cordah Limited does not accept liability for any errors or omissions in the context of this e-mail or its attachments, which arise as a result of Internet transmission, nor accept liability for statements which are those of the author and not clearly made on behalf of BMT Cordah Limited.