Hi,
I noticed that from version 2.22.0 of GeoServe, running the WPS process 
"gs:RepojectGeometry" with application/json input no longer works correctly 
while, for example, with version 2.18.2 everything worked correctly.
I tried with several recent versions, up to 2.23.1.
The Java version used in the latest versions is 11 as recommended by the 
minimum requirements of GeoServer (in version 2.18.2 I used version 8).
If I test the process with WKT input, everything works fine, while if I use 
application/json, I get the following error:

31 Oct 09:48:28 ERROR  [wps.executor] - Process execution failed
org.geoserver.wps.WPSException: Failed to retrieve value for input geometry
               at 
org.geoserver.wps.executor.LazyInputMap.parseInputs(LazyInputMap.java:98)
               at 
org.geoserver.wps.executor.LazyInputMap.get(LazyInputMap.java:50)
               at 
org.geotools.process.factory.AnnotationDrivenProcessFactory$InvokeMethodProcess.buildProcessArguments(AnnotationDrivenProcessFactory.java:748)
               at 
org.geotools.process.factory.AnnotationDrivenProcessFactory$InvokeMethodProcess.execute(AnnotationDrivenProcessFactory.java:628)
               at 
org.geoserver.wps.executor.ProcessStartupFilter$ProcessStartupWrapper.execute(ProcessStartupFilter.java:50)
               at 
org.geoserver.wps.executor.DefaultProcessManager$ProcessCallable.call(DefaultProcessManager.java:222)
               at 
org.geoserver.wps.executor.DefaultProcessManager$ProcessCallable.call(DefaultProcessManager.java:191)
               at 
java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
               at 
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
               at 
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
               at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: java.lang.NullPointerException
               at 
com.bedatadriven.jackson.datatype.jts.serialization.GeometryDeserializer.deserialize(GeometryDeserializer.java:45)
               at 
com.bedatadriven.jackson.datatype.jts.serialization.GeometryDeserializer.deserialize(GeometryDeserializer.java:33)
               at 
com.fasterxml.jackson.databind.deser.DefaultDeserializationContext.readRootValue(DefaultDeserializationContext.java:323)
               at 
com.fasterxml.jackson.databind.ObjectMapper._readValue(ObjectMapper.java:4650)
               at 
com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:2831)
               at 
org.geoserver.wps.ppio.GeoJSONPPIO$Geometries.decode(GeoJSONPPIO.java:134)
               at org.geoserver.wps.ppio.CDataPPIO.decode(CDataPPIO.java:21)
               at 
org.geoserver.wps.executor.SimpleInputProvider.getValueInternal(SimpleInputProvider.java:81)
               at 
org.geoserver.wps.executor.AbstractInputProvider.getValue(AbstractInputProvider.java:103)
               at 
org.geoserver.wps.executor.LazyInputMap.parseInputs(LazyInputMap.java:90)

The XML to test the functionality is as follows:

<?xml version="1.0" encoding="UTF-8"?><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:ReprojectGeometry</ows:Identifier>
  <wps:DataInputs>
    <wps:Input>
      <ows:Identifier>geometry</ows:Identifier>
      <wps:Data>
        <wps:ComplexData 
mimeType="application/json"><![CDATA[{"type":"Point","coordinates":[1293046.99,5729442.56]}]]></wps:ComplexData>
      </wps:Data>
    </wps:Input>
    <wps:Input>
      <ows:Identifier>sourceCRS</ows:Identifier>
      <wps:Data>
        <wps:LiteralData>EPSG:3857</wps:LiteralData>
      </wps:Data>
    </wps:Input>
    <wps:Input>
      <ows:Identifier>targetCRS</ows:Identifier>
      <wps:Data>
        <wps:LiteralData>EPSG:3003</wps:LiteralData>
      </wps:Data>
    </wps:Input>
  </wps:DataInputs>
  <wps:ResponseForm>
    <wps:RawDataOutput mimeType="application/json">
      <ows:Identifier>result</ows:Identifier>
    </wps:RawDataOutput>
  </wps:ResponseForm>
</wps:Execute>


Daniele Maggiolo
Settore Tecnico

[signature_3331596089]

Via Roma, 5 - 36026, Pojana Maggiore (VI)
Tel. 0444 794127 - www.abitat.it<http://www.abitat.it/>

La presente e-mail ha carattere esclusivamente aziendale. Personale incaricato 
della ditta Abitat SIT srl potrà accedere al contenuto della e-mail e a 
eventuali risposte. Non è consentita la diffusione, distribuzione e copia della 
e-mail da parte di persona diversa dal destinatario. Non permettendo Internet 
di assicurare l'integrità del presente messaggio si declina ogni responsabilità 
nell'ipotesi in cui esso venga modificato. Se avete ricevuto questa e-mail per 
errore vi preghiamo di eliminarla e darne comunicazione al mittente. Grazie per 
la Vostra collaborazione.

_______________________________________________
Geoserver-users mailing list

Please make sure you read the following two resources before posting to this 
list:
- Earning your support instead of buying it, but Ian Turton: 
http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines: 
http://geoserver.org/comm/userlist-guidelines.html

If you want to request a feature or an improvement, also see this: 
https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer


Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to