WPS output for gs:CLIP and missing dependencies?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

WPS output for gs:CLIP and missing dependencies?

Russell Grew

Hi all,

 

I am running GeoServer 2.17.1 on Windows 10 with OpenJDK 11 and have started looking at WPS.

 

Happily I found an old example for my use case in http://osgeo-org.1560.x6.nabble.com/Chaining-WFS-and-WPS-td5378069.html and have been able to prepare similar using the query builder and a WKT polygon.

 

I can query a geopackage vector layer and receive application/json application/zip output fine.

 

If I ask for .csv output I get the following error

 

<ows:ExceptionReport version="1.1.0" xsi:schemaLocation="http://www.opengis.net/ows/1.1 http://myserver:8080/geoserver/schemas/ows/1.1.0/owsAll.xsd">

<ows:Exception exceptionCode="NoApplicableCode">

<ows:ExceptionText>

java.lang.NoClassDefFoundError: org/geotools/data/csv/CSVDataStoreFactory org/geotools/data/csv/CSVDataStoreFactory org.geotools.data.csv.CSVDataStoreFactory

</ows:ExceptionText>

</ows:Exception>

</ows:ExceptionReport>

 

I did download Geotools 23.1 but I am unsure if  suitable .jar file exists to include in the GeoServer lib folder?

 

Similarly, if I try and query a SQL server vector layer and ask for application/json output (note this output working in above example) this yields

 

<wps:ExecuteResponse xml:lang="en" service="WPS" serviceInstance="http://myserver:8080/geoserver/ows?" version="1.0.0">

<wps:Process wps:processVersion="1.0.0">

<ows:Identifier>gs:Clip</ows:Identifier>

<ows:Title>Clip</ows:Title>

<ows:Abstract>Clips (crops) features to a given geometry</ows:Abstract>

</wps:Process>

<wps:Status creationTime="2020-09-16T05:11:22.665Z">

<wps:ProcessFailed>

<ows:ExceptionReport version="1.1.0">

<ows:Exception exceptionCode="NoApplicableCode">

<ows:ExceptionText>

Process failed during execution java.lang.RuntimeException: Don&apos;t know how to handle geometries of type org.locationtech.jts.geom.Geometry Don&apos;t know how to handle geometries of type org.locationtech.jts.geom.Geometry

</ows:ExceptionText>

</ows:Exception>

</ows:ExceptionReport>

</wps:ProcessFailed>

</wps:Status>

</wps:ExecuteResponse>

 

Any advice is very welcome.

 

Thanks.

 

Russell.



Disclaimer

The information contained in this communication from the sender is confidential. It is intended solely for use by the recipient and others authorized to receive it. If you are not the recipient, you are hereby notified that any disclosure, copying, distribution or taking action in relation of the contents of this information is strictly prohibited and may be unlawful.

This email has been scanned for viruses and malware, and may have been automatically archived by Mimecast Ltd, an innovator in Software as a Service (SaaS) for business. Providing a safer and more useful place for your human generated data. Specializing in; Security, archiving and compliance. To find out more Click Here.



_______________________________________________
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


[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-users
Reply | Threaded
Open this post in threaded view
|

Re: WPS output for gs:CLIP and missing dependencies?

Russell Grew

By way of update to my own email, after some digging around GitHub Geotools code and tracing through logs.

 

On CSV I copied gt-csv-23.1.jar into place. The error is now.

 

<ows:ExceptionReport version="1.1.0" xsi:schemaLocation="http://www.opengis.net/ows/1.1 http://dpsyddev01:8080/geoserver/schemas/ows/1.1.0/owsAll.xsd">

<ows:Exception exceptionCode="NoApplicableCode">

<ows:ExceptionText>

java.lang.NoClassDefFoundError: com/opencsv/ICSVParser com/opencsv/ICSVParser com.opencsv.ICSVParser

</ows:ExceptionText>

</ows:Exception>

</ows:ExceptionReport>

 

 

On SQL Server I copied jtds-1.3.1.jar into place.

 

This gets us further but I run into problems with EPSG codes. The factory checking of the EPSG code on the database table is unhappy.

 

2020-09-17 07:48:56,317 DEBUG [org.geotools.referencing.factory] - Failure in the primary factory: No code "EPSG:28356" from authority "European Petroleum Survey Group" found for object of type "IdentifiedObject". Now trying the fallback factory...

 

I figure it should be ok - https://epsg.io/28356 - SQL server returns 28356 and the ‘EPSG:’ is added in code.

 

I appreciate this is the users list and not the developers list. As a technically minded user this is probably as far as I can take the investigation without some advice.  I am very happy to test possible solutions or prepare basic pull requests.

 

The above also applies to vec:Clip, and the gs and vec :RectangleClip variants.

 

Cheers.

 

 

From: Russell Grew
Sent: Wednesday, 16 September 2020 4:00 PM
To: GeoServer Users <[hidden email]>
Subject: WPS output for gs:CLIP and missing dependencies?

 

Hi all,

 

I am running GeoServer 2.17.1 on Windows 10 with OpenJDK 11 and have started looking at WPS.

 

Happily I found an old example for my use case in http://osgeo-org.1560.x6.nabble.com/Chaining-WFS-and-WPS-td5378069.html and have been able to prepare similar using the query builder and a WKT polygon.

 

I can query a geopackage vector layer and receive application/json application/zip output fine.

 

If I ask for .csv output I get the following error

 

<ows:ExceptionReport version="1.1.0" xsi:schemaLocation="http://www.opengis.net/ows/1.1 http://myserver:8080/geoserver/schemas/ows/1.1.0/owsAll.xsd">

<ows:Exception exceptionCode="NoApplicableCode">

<ows:ExceptionText>

java.lang.NoClassDefFoundError: org/geotools/data/csv/CSVDataStoreFactory org/geotools/data/csv/CSVDataStoreFactory org.geotools.data.csv.CSVDataStoreFactory

</ows:ExceptionText>

</ows:Exception>

</ows:ExceptionReport>

 

I did download Geotools 23.1 but I am unsure if  suitable .jar file exists to include in the GeoServer lib folder?

 

Similarly, if I try and query a SQL server vector layer and ask for application/json output (note this output working in above example) this yields

 

<wps:ExecuteResponse xml:lang="en" service="WPS" serviceInstance="http://myserver:8080/geoserver/ows?" version="1.0.0">

<wps:Process wps:processVersion="1.0.0">

<ows:Identifier>gs:Clip</ows:Identifier>

<ows:Title>Clip</ows:Title>

<ows:Abstract>Clips (crops) features to a given geometry</ows:Abstract>

</wps:Process>

<wps:Status creationTime="2020-09-16T05:11:22.665Z">

<wps:ProcessFailed>

<ows:ExceptionReport version="1.1.0">

<ows:Exception exceptionCode="NoApplicableCode">

<ows:ExceptionText>

Process failed during execution java.lang.RuntimeException: Don&apos;t know how to handle geometries of type org.locationtech.jts.geom.Geometry Don&apos;t know how to handle geometries of type org.locationtech.jts.geom.Geometry

</ows:ExceptionText>

</ows:Exception>

</ows:ExceptionReport>

</wps:ProcessFailed>

</wps:Status>

</wps:ExecuteResponse>

 

Any advice is very welcome.

 

Thanks.

 

Russell.



Disclaimer

The information contained in this communication from the sender is confidential. It is intended solely for use by the recipient and others authorized to receive it. If you are not the recipient, you are hereby notified that any disclosure, copying, distribution or taking action in relation of the contents of this information is strictly prohibited and may be unlawful.

This email has been scanned for viruses and malware, and may have been automatically archived by Mimecast Ltd, an innovator in Software as a Service (SaaS) for business. Providing a safer and more useful place for your human generated data. Specializing in; Security, archiving and compliance. To find out more Click Here.



_______________________________________________
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


[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-users
Reply | Threaded
Open this post in threaded view
|

Re: WPS output for gs:CLIP and missing dependencies?

Ian Turton


On Wed, 16 Sep 2020 at 23:41, Russell Grew <[hidden email]> wrote:

By way of update to my own email, after some digging around GitHub Geotools code and tracing through logs.

 

On CSV I copied gt-csv-23.1.jar into place. The error is now.

 

<ows:ExceptionReport version="1.1.0" xsi:schemaLocation="http://www.opengis.net/ows/1.1 http://dpsyddev01:8080/geoserver/schemas/ows/1.1.0/owsAll.xsd">

<ows:Exception exceptionCode="NoApplicableCode">

<ows:ExceptionText>

java.lang.NoClassDefFoundError: com/opencsv/ICSVParser com/opencsv/ICSVParser com.opencsv.ICSVParser

</ows:ExceptionText>

</ows:Exception>

</ows:ExceptionReport>

 


This is odd as WPS should be pulling in gt-csv and all of its dependencies, it's clearly listed in the dependencies of the pom file but seems not to be in the wps extension zip file.
This was added 2 years ago and I can't see that anything relevant has changed recently in the poms.

I'm not entirely sure how the extension assembly works so I can't really say what's going wrong

Ian



_______________________________________________
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


[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-users