[Geoserver-devel] [jira] Created: (GEOS-2190) WFS GetFeature outputformat=json returns error when you try to explicity or implicity have propertytype include geometry.

WFS GetFeature outputformat=json returns error when you try to explicity or implicity have propertytype include geometry.
-------------------------------------------------------------------------------------------------------------------------

                 Key: GEOS-2190
                 URL: http://jira.codehaus.org/browse/GEOS-2190
             Project: GeoServer
          Issue Type: Bug
          Components: WFS
    Affects Versions: 1.6.4
            Reporter: Josh Rosenthal
            Assignee: Andrea Aime

There appears to be an error (included below) when one attempts to have a wfs getfeature with outputformat=json return geometry, as well as when one makes the requests without a propertyname field. This may be the same error, representing both an explicit and implicit attempt to get geometry.

Errors are demonstrated using MassGIS webservices... I think they're on 1.6.5 beta.

Working WFS-JSON
http://giswebservices.massgis.state.ma.us/geoserver/wfs?typename=massgis:GISDATA.USGSGRID_POLY&propertyname=QUAD_NAME,DIG_ID&request=getfeature&version=1.1.0&service=wfs&cql_filter=INTERSECT(SHAPE,POINT(237914.77%20945347.5))&outputformat=json

Not working WFS-JSON with explicit naming of geometry field (SHAPE for massgis layers)
http://giswebservices.massgis.state.ma.us/geoserver/wfs?typename=massgis:GISDATA.USGSGRID_POLY&propertyname=QUAD_NAME,SHAPE&request=getfeature&version=1.1.0&service=wfs&cql_filter=INTERSECT(SHAPE,POINT(237914.77%20945347.5))&outputformat=json

Not working WFS-JSON with no explict request of fields (ie: implicit request of all fields, including SHAPE)
http://giswebservices.massgis.state.ma.us/geoserver/wfs?typename=massgis:GISDATA.USGSGRID_POLY&propertyname=QUAD_NAME,SHAPE&request=getfeature&version=1.1.0&service=wfs&cql_filter=INTERSECT(SHAPE,POINT(237914.77%20945347.5))&outputformat=json

Error Message
<ows:ExceptionReport version="1.0.0" xsi:schemaLocation="http://www.opengis.net/ows http://giswebservices.massgis.state.ma.us:80/geoserver/schemas/ows/1.0.0/owsExceptionReport.xsd&quot;&gt;
<ows:Exception exceptionCode="NoApplicableCode">
<ows:ExceptionText>java.util.NoSuchElementException null</ows:ExceptionText>
</ows:Exception>
</ows:ExceptionReport>

For reference, here are our not working WFS-JSON calls, with the &outputformat=json removed, to demonstrate that they work as WFS-XML calls.

Working WFS-XML with explicit naming of geometry field (SHAPE for massgis layers)
http://giswebservices.massgis.state.ma.us/geoserver/wfs?typename=massgis:GISDATA.USGSGRID_POLY&propertyname=QUAD_NAME,SHAPE&request=getfeature&version=1.1.0&service=wfs&cql_filter=INTERSECT(SHAPE,POINT(237914.77%20945347.5))

Working WFS-XML with no explict request of fields (ie: implicit request of all fields, including SHAPE)
http://giswebservices.massgis.state.ma.us/geoserver/wfs?typename=massgis:GISDATA.USGSGRID_POLY&request=getfeature&version=1.1.0&service=wfs&cql_filter=INTERSECT(SHAPE,POINT(237914.77%20945347.5))

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