GeoServer

Inability to parse a kvp filter result in hard to understand error message

Details

  • Type: Bug Bug
  • Status: Open Open
  • Priority: Critical Critical
  • Resolution: Unresolved
  • Affects Version/s: 1.6.3
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None
  • Number of attachments :
    0

Description

The following request:

http://localhost:8080/geoserver/wfs?request=getfeature&service=wfs&version=1.0.0&typename=topp:r1kdata&filter=%3Cogc%3AFilter%3E%3Cogc%3APropertyIsEqualTo%3E%3Cogc%3APropertyName%3ESTATE_NAME%3C/ogc%3APropertyName%3E%3Cogc%3ALiteral%3ENew%20York%3C/ogc%3ALiteral%3E%3C/ogc%3APropertyIsEqualTo%3E%3C/ogc%3AFilter%3E%20

Using the filter:

<ogc:Filter><ogc:PropertyIsEqualTo><ogc:PropertyName>STATE_NAME</ogc:PropertyName><ogc:Literal>New York</ogc:Literal></ogc:PropertyIsEqualTo></ogc:Filter>

results in:

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)
...

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?

Activity

Hide
Andrea Aime added a comment -

To be on the same line as the POST requests I think we should have &strict=true influence also these kvp parsers

Show
Andrea Aime added a comment - To be on the same line as the POST requests I think we should have &strict=true influence also these kvp parsers

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated: