Inability to parse a kvp filter result in hard to understand error message
--------------------------------------------------------------------------
Key: GEOS-1914
URL: http://jira.codehaus.org/browse/GEOS-1914
Project: GeoServer
Issue Type: Bug
Affects Versions: 1.6.3
Reporter: Andrea Aime
Assignee: Justin Deoliveira
Priority: Critical
Fix For: 1.6.4
The following request:
Using the filter:
{code:xml}
<ogc:Filter><ogc:PropertyIsEqualTo><ogc:PropertyName>STATE_NAME</ogc:PropertyName><ogc:Literal>New York</ogc:Literal></ogc:PropertyIsEqualTo></ogc:Filter>
{code}
results in:
{code}
09 mag 14:42:10 WARN [geoserver.ows] -
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.ArrayList.RangeCheck(ArrayList.java:547)
at java.util.ArrayList.get(ArrayList.java:322)
at org.geotools.xml.EMFUtils.set(EMFUtils.java:143)
at org.geoserver.wfs.kvp.GetFeatureKvpRequestReader.querySet(GetFeatureKvpRequestReader.java:279)
at org.geoserver.wfs.kvp.GetFeatureKvpRequestReader.read(GetFeatureKvpRequestReader.java:126)
at org.geoserver.ows.Dispatcher.parseRequestKVP(Dispatcher.java:1016)
at org.geoserver.ows.Dispatcher.dispatch(Dispatcher.java:385)
at org.geoserver.ows.Dispatcher.handleRequestInternal(Dispatcher.java:185)
...
{code}
This happens because in the filter kvp parser the new parser fails to handle the filter, the old parser fails as well, and the return value is an empty collection which the EMF reflection in the dispatcher cannot handle properly (the first parser throws an exception, the second one returns null).
Imho we should throw an exception stating the filter is invalid instead of keep on going on when none of the parsers can handle the filter.
What do you think?
--
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