[Geoserver-devel] [JIRA] (GEOS-8579) WPS PagedUnique process ignores workspace of the input layer

Gnafu created an issue

GeoServer / BugGEOS-8579

WPS PagedUnique process ignores workspace of the input layer

Issue Type:

BugBug

Affects Versions:

2.8.5, 2.13-beta

Assignee:

Unassigned

Components:

WPS

Created:

08/Feb/18 3:51 PM

Environment:

Windows standalone binary with 2.8.5 and 2.13-master
Linux tomcat with 2.8.5

All GeoServer with the matching WPS plugin

Priority:

MediumMedium

Reporter:

Gnafu

The WPS PagedUnique process will give wrong results if the input layer name exists in two different workspaces.

In GeoServer 2.8.5 the process will fail with a message “Failed to retrieve value for input features
Could not locate TEST_LAYER in catalog.”

In GeoServer 2.13.x the proces will succeed with wrong results.

To reproduce with the standard data_dir:

  1. Re-publish the tiger:poi layer and name it TEST_LAYER
  2. Re-publish the sf:restricted layer and name it TEST_LAYER
  3. Query the tiger:TEST_LAYER to get all the values of the “NAME” property, the WPS body follows:
<wps:Execute xmlns:wps="http://www.opengis.net/wps/1.0.0" version="1.0.0" service="WPS" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/wps/1.0.0 http://schemas.opengis.net/wps/1.0.0/wpsAll.xsd">
	<ows:Identifier xmlns:ows="http://www.opengis.net/ows/1.1">gs:PagedUnique</ows:Identifier>
	<wps:DataInputs>
		<wps:Input>
			<ows:Identifier xmlns:ows="http://www.opengis.net/ows/1.1">features</ows:Identifier>
			<ows:Title xmlns:ows="http://www.opengis.net/ows/1.1">features</ows:Title>
			<wps:Data/>
			<wps:Reference mimeType="text/xml" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://geoserver/wfs" method="POST">
				<wps:Body>
					<wfs:GetFeature xmlns:wfs="http://www.opengis.net/wfs" service="WFS" version="1.0.0">
						<wfs:Query typeName="tiger:TEST_LAYER">
							<ogc:SortBy xmlns:ogc="http://www.opengis.net/ogc">
								<ogc:SortProperty>
									<ogc:PropertyName>NAME</ogc:PropertyName>
								</ogc:SortProperty>
							</ogc:SortBy>
						</wfs:Query>
					</wfs:GetFeature>
				</wps:Body>
			</wps:Reference>
		</wps:Input>
		<wps:Input>
			<ows:Identifier xmlns:ows="http://www.opengis.net/ows/1.1">fieldName</ows:Identifier>
			<ows:Title xmlns:ows="http://www.opengis.net/ows/1.1">fieldName</ows:Title>
			<wps:Data>
				<wps:LiteralData>NAME</wps:LiteralData>
			</wps:Data>
		</wps:Input>
		<wps:Input>
			<ows:Identifier xmlns:ows="http://www.opengis.net/ows/1.1">maxFeatures</ows:Identifier>
			<ows:Title xmlns:ows="http://www.opengis.net/ows/1.1">maxFeatures</ows:Title>
			<wps:Data>
				<wps:LiteralData>10</wps:LiteralData>
			</wps:Data>
		</wps:Input>
	</wps:DataInputs>
	<wps:ResponseForm>
		<wps:RawDataOutput mimeType="application/json">
			<ows:Identifier xmlns:ows="http://www.opengis.net/ows/1.1">result</ows:Identifier>
		</wps:RawDataOutput>
	</wps:ResponseForm>
</wps:Execute>

GeoServer 2.8.5 will fail, GeoServer 2.13 will return the correct results.

  • Use the same request and just change the workspace name of the layer
<wfs:Query typeName="sf:TEST_LAYER">

GeoServer 2.8.5 will fail, GeoServer 2.13 will return the previous results (the tiger:TEST_LAYER one)

Note that the sf:TEST_LAYER does not have a “NAME” property.

Add Comment

Add Comment

Get Jira notifications on your phone! Download the Jira Cloud app for Android or iOS


This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100079-sha1:9ee7178)

Atlassian logo