0

I'm trying to make a WPS request with a GetFeature request inside of it but I'm getting an error. The idea is to get features with a spatial filter and then get a Multipolygon with the "gs:CollectGeometries". The data is stored in Oracle Database. I'm using GeoServer 2.8.0

I'll try to put all the info:

My request:

<wps:Execute version="1.0.0" service="WPS"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns="http://www.opengis.net/wps/1.0.0"
    xmlns:wfs="http://www.opengis.net/wfs"
    xmlns:wps="http://www.opengis.net/wps/1.0.0"
    xmlns:ows="http://www.opengis.net/ows/1.1"
    xmlns:gml="http://www.opengis.net/gml"
    xmlns:ogc="http://www.opengis.net/ogc"
    xmlns:wcs="http://www.opengis.net/wcs/1.1.1"
    xmlns:xlink="http://www.w3.org/1999/xlink" xsi:schemaLocation="http://www.opengis.net/wps/1.0.0 http://schemas.opengis.net/wps/1.0.0/wpsAll.xsd">
    <ows:Identifier>gs:CollectGeometries</ows:Identifier>
    <wps:DataInputs>
        <wps:Input>
            <ows:Identifier>features</ows:Identifier>
            <wps:Reference mimeType="text/xml; subtype=wfs-collection/1.0" xlink:href="http://geoserver/wfs" method="POST">
                <wps:Body>
                    <wfs:GetFeature service="WFS" version="1.0.0"
                        xmlns:IKT="http://geoserver.hazi.eus/ikt" outputFormat="GML2"
                        xmlns:wfs="http://www.opengis.net/wfs"
                        xmlns="http://www.opengis.net/ogc"
                        xmlns:gml="http://www.opengis.net/gml"
                        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.0.0/wfs.xsd">
                        <wfs:Query typeName="IKT:PACTierrasEtrs89" srsName="http://www.opengis.net/gml/srs/epsg.xml#25830">
                            <Filter
                                xmlns="http://www.opengis.net/ogc">
                                <Intersects>
                                    <PropertyName>GEOMETRY</PropertyName>
                                    <gml:Polygon
                                        xmlns:gml="http://www.opengis.net/gml">
                                        <gml:outerBoundaryIs>
                                            <gml:LinearRing>
                                                <gml:coordinates decimal="." cs="," ts=" ">533883.6330127,4709223.3703776 533755.45918457,4709024.2431803 533971.75251953,4708829.6936198 534375.72895996,4708811.3830729 534376.87336914,4709005.9326335 534258.99922364,4709223.3703776 534081.61580078,4709300.0457926 533883.6330127,4709223.3703776</gml:coordinates>
                                            </gml:LinearRing>
                                        </gml:outerBoundaryIs>
                                    </gml:Polygon>
                                </Intersects>
                            </Filter>
                        </wfs:Query>
                    </wfs:GetFeature>
                </wps:Body>
            </wps:Reference>
        </wps:Input>
    </wps:DataInputs>
    <wps:ResponseForm>
        <wps:RawDataOutput mimeType="application/wkt">
            <ows:Identifier>result</ows:Identifier>
        </wps:RawDataOutput>
    </wps:ResponseForm>
</wps:Execute>

Error response:

<wps:ExecuteResponse xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:wps="http://www.opengis.net/wps/1.0.0" xmlns:ows="http://www.opengis.net/ows/1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xml:lang="en" service="WPS" serviceInstance="https://sgeoserver.hazi.eus/geoserver/ows?" version="1.0.0">
    <wps:Process wps:processVersion="1.0.0">
        <ows:Identifier>gs:CollectGeometries</ows:Identifier>
        <ows:Title>Collect Geometries</ows:Title>
        <ows:Abstract>Collects the deafult geometries of the input features and combines them into a single geometry collection</ows:Abstract>
    </wps:Process>
    <wps:Status creationTime="2022-05-04T09:31:49.316Z">
        <wps:ProcessFailed>
            <ows:ExceptionReport version="1.1.0">
                <ows:Exception exceptionCode="NoApplicableCode">
                    <ows:ExceptionText>Process failed during execution
java.lang.NullPointerException</ows:ExceptionText>
                </ows:Exception>
            </ows:ExceptionReport>
        </wps:ProcessFailed>
    </wps:Status>
</wps:ExecuteResponse>

And turning on GeoTools level logging shows the following:

2022-05-04 07:58:28,822 DEBUG [org.geotools.jdbc] - CREATE CONNECTION
2022-05-04 07:58:28,822 DEBUG [org.geotools.filter] - exporting PropertyName
2022-05-04 07:58:28,822 DEBUG [org.geotools.util] - InterpolationConverterFactory can be applied from Strings to Interpolation only.
2022-05-04 07:58:28,822 DEBUG [org.geotools.util] - CRSConverterFactory can be applied from Strings to CRS  only.
2022-05-04 07:58:28,822 DEBUG [org.geotools.jdbc] - SELECT count(*) AS gt_result_ FROM (SELECT * FROM (SELECT * FROM NEKALUR.TBTIERRAS WHERE  SDO_RELATE(GEOMETRY, ?, 'mask=anyinteract querytype=WINDOW') = 'TRUE' ) WHERE ROWNUM <= 1000000) gt_limited_
2022-05-04 07:58:28,838 DEBUG [org.geotools.jdbc] - CLOSE CONNECTION
2022-05-04 07:58:28,838 ERROR [org.geoserver.wps.executor] - Process execution failed
org.geotools.process.ProcessException: java.lang.NullPointerException
    at org.geotools.process.factory.AnnotationDrivenProcessFactory$InvokeMethodProcess.execute(AnnotationDrivenProcessFactory.java:565)
    at org.geoserver.wps.executor.DefaultProcessManager$ProcessCallable.call(DefaultProcessManager.java:201)
    at org.geoserver.wps.executor.DefaultProcessManager$ProcessCallable.call(DefaultProcessManager.java:169)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException
    at org.geotools.data.oracle.sdo.SDO.D(SDO.java:152)
    at org.geotools.data.oracle.sdo.SDO.gType(SDO.java:121)
    at org.geotools.data.oracle.sdo.GeometryConverter.toSDO(GeometryConverter.java:158)
    at org.geotools.data.oracle.OracleDialect.setGeometryValue(OracleDialect.java:590)
    at org.geotools.jdbc.JDBCDataStore.setPreparedFilterValues(JDBCDataStore.java:3426)
    at org.geotools.jdbc.JDBCDataStore.setPreparedFilterValues(JDBCDataStore.java:3400)
    at org.geotools.jdbc.JDBCDataStore.selectAggregateSQLPS(JDBCDataStore.java:3635)
    at org.geotools.jdbc.JDBCDataStore.getAggregateValue(JDBCDataStore.java:1440)
    at org.geotools.jdbc.JDBCDataStore.getCount(JDBCDataStore.java:1389)
    at org.geotools.jdbc.JDBCFeatureSource.getCountInternal(JDBCFeatureSource.java:464)
    at org.geotools.data.store.ContentFeatureSource.getCount(ContentFeatureSource.java:485)
    at org.geotools.jdbc.JDBCFeatureStore.getCountInternal(JDBCFeatureStore.java:183)
    at org.geotools.data.store.ContentFeatureSource.getCount(ContentFeatureSource.java:485)
    at org.geotools.data.store.ContentFeatureCollection.size(ContentFeatureCollection.java:236)
    at org.geotools.feature.collection.DecoratingSimpleFeatureCollection.size(DecoratingSimpleFeatureCollection.java:113)
    at org.geotools.data.crs.ForceCoordinateSystemFeatureResults.size(ForceCoordinateSystemFeatureResults.java:106)
    at org.geotools.process.vector.CollectGeometries.execute(CollectGeometries.java:48)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.geotools.process.factory.AnnotationDrivenProcessFactory$InvokeMethodProcess.execute(AnnotationDrivenProcessFactory.java:549)
    ... 6 more
2022-05-04 07:58:28,838 INFO [org.geoserver.wps] - 
Request: execute
    service = WPS
    version = 1.0.0
    baseUrl = http://sgeoserver.hazi.eus:80/geoserver/
    identifier:
        value = gs:CollectGeometries
    dataInputs:
        input[0]:
            identifier = net.opengis.ows11.impl.CodeTypeImpl@2dd32dce (value: features, codeSpace: null)
            reference = net.opengis.wps10.impl.InputReferenceTypeImpl@36446e3 (body: net.opengis.wfs.impl.GetFeatureTypeImpl@2c69e2d2 (handle: null, service: WFS, version: 1.0.0, baseUrl: null, providedVersion: null, extendedProperties: {}) (maxFeatures: null, outputFormat: GML2, resultType: results, traverseXlinkDepth: null, traverseXlinkExpiry: null, formatOptions: null, metadata: null, startIndex: null, viewParams: null), encoding: null, href: http://geoserver/wfs, method: POST, mimeType: text/xml, schema: null)
    responseForm:
        rawDataOutput:
            identifier = net.opengis.ows11.impl.CodeTypeImpl@5baa5fc5 (value: result, codeSpace: null)
            mimeType = application/wkt
2022-05-04 07:58:28,853 DEBUG [org.geotools.util] - InterpolationConverterFactory can be applied from Strings to Interpolation  only.
2022-05-04 07:58:28,853 DEBUG [org.geotools.util] - CRSConverterFactory can be applied from Strings to CRS  only.

The strange thing is that the GetFeature request works fine on its own but when I try to do all inside the WPS request I get this error. Any ideas on what could be wrong?

8
  • that's an oracle error - probably on SELECT count(*) AS gt_result_ FROM (SELECT * FROM (SELECT * FROM NEKALUR.TBTIERRAS WHERE SDO_RELATE(GEOMETRY, ?, 'mask=anyinteract querytype=WINDOW') = 'TRUE' ) WHERE ROWNUM <= 1000000) gt_limited_
    – Ian Turton
    Commented May 4, 2022 at 10:01
  • Hi, yes, it looks like an Oracle error, but if i make only the getfeature request I get the expeceted response, but if it's inside the WPS request it throws that error... I'm supposing the wps request is ok, isn't it right? Thanks.
    – dalda
    Commented May 4, 2022 at 10:35
  • I've just checked that if I make the whole request (WPS+GETFEATURE) without spatial filter (intersects) and filtering by attribute it works fine ...
    – dalda
    Commented May 4, 2022 at 10:52
  • does the oracle log have anything to add?
    – Ian Turton
    Commented May 4, 2022 at 11:19
  • If you really mean 2.8 then you need to upgrade to 2.20
    – Ian Turton
    Commented May 4, 2022 at 11:54

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.