[Geoserver-devel] [JIRA] (GEOS-8117) KVP parsing may fail if service or version is not set

Torben Barsballe created an issue

GeoServer / BugGEOS-8117

KVP parsing may fail if service or version is not set

Issue Type:

BugBug

Assignee:

Unassigned

Components:

WCS, WFS, WMS

Created:

28/Apr/17 10:13 PM

Priority:

MediumMedium

Reporter:

Torben Barsballe

So far, I have only observed issues with WFS requests.

Omitting the “service=wfs” parameter from a KVP-encoded request generally works just fine, as long as you are using the applicable virtual service endpoint. However, sometimes it doesn’t. All testing is done with a GeoServer 2.10.2 installation with no extensions:

With service=wfs:

http://localhost:8080/geoserver/wfs?service=wfs&request=GetFeature&typenames=sf:roads&version=2.0.0

returns all property values for all features in sf:roads

http://localhost:8080/geoserver/wfs?service=wfs&request=GetFeature&typenames=sf:roads&version=2.0.0&propertyname=

returns all property values for all features in sf:roads

http://localhost:8080/geoserver/wfs?service=wfs&request=GetFeature&typenames=sf:roads&version=2.0.0&propertyname=*

returns all property values for all features in sf:roads

http://localhost:8080/geoserver/wfs?service=wfs&request=GetFeature&typenames=sf:roads&version=2.0.0&propertyname=cat

returns all values for cat property for all features in sf:roads

http://localhost:8080/geoserver/wfs?service=wfs&request=GetFeature&typenames=sf:roads&version=2.0.0&propertyname=cat,label

returns all values for cat and label properties for all features in sf:roads

Without service=wfs:

http://localhost:8080/geoserver/wfs?request=GetFeature&typenames=sf:roads&version=2.0.0

returns all property values for all features in sf:roads

http://localhost:8080/geoserver/wfs?request=GetFeature&typenames=sf:roads&version=2.0.0&propertyname=

<ows:Exception exceptionCode="NoApplicableCode">
  <ows:ExceptionText>java.lang.NullPointerException</ows:ExceptionText>
</ows:Exception>

http://localhost:8080/geoserver/wfs?request=GetFeature&typenames=sf:roads&version=2.0.0&propertyname=*

<ows:Exception exceptionCode="NoApplicableCode">
  <ows:ExceptionText>java.lang.NullPointerException</ows:ExceptionText>
</ows:Exception>

http://localhost:8080/geoserver/wfs?request=GetFeature&typenames=sf:roads&version=2.0.0&propertyname=cat

<ows:Exception exceptionCode="NoApplicableCode">
  <ows:ExceptionText>
    java.lang.ClassCastException: java.lang.String cannot be cast to java.util.Collection java.lang.String cannot be cast to java.util.Collection
  </ows:ExceptionText>
</ows:Exception>

http://localhost:8080/geoserver/wfs?request=GetFeature&typenames=sf:roads&version=2.0.0&propertyname=cat,label

<ows:Exception exceptionCode="NoApplicableCode">
  <ows:ExceptionText>
    java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 Index: 0, Size: 0
  </ows:ExceptionText>
</ows:Exception>

Add Comment

Add Comment

This message was sent by Atlassian JIRA (v1000.910.0#100040-sha1:0b083fc)

Atlassian logo