[Geoserver-devel] [JIRA] (GEOS-9963) Missing JAR in the packaging of WPS GeoPackage Downlod module 2.18.x

Christian Picone created an issue

GeoServer / BugGEOS-9963

Missing JAR in the packaging of WPS GeoPackage Downlod module 2.18.x

Issue Type:

BugBug

Affects Versions:

2.18.2

Assignee:

Unassigned

Attachments:

wps-request.xml

Components:

Community modules

Created:

08/Mar/21 12:11 PM

Priority:

MediumMedium

Reporter:

Christian Picone

Executing a WPS request to download data in geopackage format:

curl -u admin:geoserver -H “Content-Type: application/xml” -XPOST -d @wps-request.xml http://127.0.0.1:8083/geoserver-2.18.2/wps

we obtain an exception.
Here the stack traces from different GeoServer Log levels:

Stack trace
(DEFAULT LOGGING):
08 mar 11:26:49 ERROR [wps.executor] - Process execution failed
org.geotools.process.ProcessException: java.lang.NoClassDefFoundError: com/fasterxml/jackson/databind/ObjectMapper
at org.geotools.process.factory.AnnotationDrivenProcessFactory$InvokeMethodProcess.execute(AnnotationDrivenProcessFactory.java:637)
at org.geoserver.wps.executor.ProcessStartupFilter$ProcessStartupWrapper.execute(ProcessStartupFilter.java:50)
at org.geoserver.wps.executor.DefaultProcessManager$ProcessCallable.call(DefaultProcessManager.java:224)
at org.geoserver.wps.executor.DefaultProcessManager$ProcessCallable.call(DefaultProcessManager.java:192)
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.NoClassDefFoundError: com/fasterxml/jackson/databind/ObjectMapper
at org.geoserver.geopkg.wps.OWSContextWriter.<clinit>(OWSContextWriter.java:84)
at org.geoserver.geopkg.wps.GeoPackageProcess.execute(GeoPackageProcess.java:165)
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:621)
… 7 more
Caused by: java.lang.ClassNotFoundException: com.fasterxml.jackson.databind.ObjectMapper
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1364)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1187)
… 14 more
08 mar 11:26:49 INFO [geoserver.wps] -
Request: execute
service = WPS
version = 1.0.0
baseUrl = http://127.0.0.1:8083/geoserver-2.18.2-itu/
identifier:
value = gs:GeoPackage
dataInputs:
input[0]:
identifier = net.opengis.ows11.impl.CodeTypeImpl@anonymised.com (value: contents, codeSpace: null)
data = net.opengis.wps10.impl.DataTypeImpl@anonymised.com
responseForm:
rawDataOutput:
identifier = net.opengis.ows11.impl.CodeTypeImpl@anonymised.com (value: geopackage, codeSpace: null)
08 mar 11:26:49 ERROR [geotools.jdbc] - There’s code using JDBC based datastore and not disposing them. This may lead to temporary loss of database connections. Please make sure all data access code calls DataStore.dispose() before freeing all references to it

(GEOTOOLS DEVELOPER LOGGING):
08 mar 11:30:11 INFO [org.geoserver.wps] -
Request: getServiceInfo
08 mar 11:30:11 DEBUG [org.geotools.xsd.impl] - schemaLocation found: http://www.opengis.net/wps/1.0.0 http://schemas.opengis.net/wps/1.0.0/wpsAll.xsd
08 mar 11:30:11 DEBUG [org.geotools.xsd.impl] - Found override for http://www.opengis.net/wps/1.0.0: http://schemas.opengis.net/wps/1.0.0/wpsAll.xsd ==> jar:file:/C:/tools/apache-tomcat-9.0.43/webapps/geoserver-2.18.2-itu/WEB-INF/lib/gt-xsd-wps-24.2.jar!/org/geotools/wps/wpsAll.xsd
08 mar 11:30:11 DEBUG [org.geotools.xsd.impl] - No schemaLocation found, using ‘http://www.opengis.net/gpkg jar:file:/C:/tools/apache-tomcat-9.0.43/webapps/geoserver-2.18.2-itu/WEB-INF/lib/gt-geopkg-24.2.jar!/org/geotools/geopkg/wps/xml/gpkg.xsd
08 mar 11:30:11 DEBUG [org.geotools.xsd.impl] - Found override for http://www.opengis.net/gpkg: jar:file:/C:/tools/apache-tomcat-9.0.43/webapps/geoserver-2.18.2-itu/WEB-INF/lib/gt-geopkg-24.2.jar!/org/geotools/geopkg/wps/xml/gpkg.xsd ==> jar:file:/C:/tools/apache-tomcat-9.0.43/webapps/geoserver-2.18.2-itu/WEB-INF/lib/gt-geopkg-24.2.jar!/org/geotools/geopkg/wps/xml/gpkg.xsd
08 mar 11:30:11 DEBUG [org.geotools.jdbc.util] - CREATE TABLE IF NOT EXISTS gpkg_extensions ( table_name TEXT, column_name TEXT, extension_name TEXT NOT NULL, definition TEXT NOT NULL, scope TEXT NOT NULL, CONSTRAINT ge_tce UNIQUE (table_name, column_name, extension_name) );
08 mar 11:30:11 DEBUG [org.geotools.jdbc.util] - CREATE TABLE IF NOT EXISTS gpkg_spatial_ref_sys ( srs_name TEXT NOT NULL, srs_id INTEGER NOT NULL PRIMARY KEY, organization TEXT NOT NULL, organization_coordsys_id INTEGER NOT NULL, definition TEXT NOT NULL, description TEXT );
08 mar 11:30:11 DEBUG [org.geotools.jdbc.util] - INSERT OR IGNORE INTO gpkg_spatial_ref_sys VALUES(‘WGS84’, 4326, ‘EPSG’, 4326, ‘GEOGCS[“WGS 84”, DATUM[“World Geodetic System 1984”, SPHEROID[“WGS 84”, 6378137.0, 298.257223563, AUTHORITY[“EPSG”,“7030”]], AUTHORITY[“EPSG”,“6326”]], PRIMEM[“Greenwich”, 0.0, AUTHORITY[“EPSG”,“8901”]], UNIT[“degree”, 0.017453292519943295], AXIS[“Geodetic longitude”, EAST], AXIS[“Geodetic latitude”, NORTH], AUTHORITY[“EPSG”,“4326”]]’, ‘longitude/latitude coordinates in decimal degrees on the WGS 84 spheroid’);
08 mar 11:30:11 DEBUG [org.geotools.jdbc.util] - INSERT OR IGNORE INTO gpkg_spatial_ref_sys VALUES(‘Undefined cartesian SRS’, -1, ‘NONE’, -1, ‘undefined’, ‘undefined cartesian coordinate reference system’);
08 mar 11:30:11 DEBUG [org.geotools.jdbc.util] - INSERT OR IGNORE INTO gpkg_spatial_ref_sys VALUES(‘Undefined cartesian SRS’, 0, ‘NONE’, 0, ‘undefined’, ‘undefined geographic coordinate reference system’);
08 mar 11:30:11 DEBUG [org.geotools.jdbc.util] - CREATE TABLE IF NOT EXISTS gpkg_geometry_columns ( table_name TEXT NOT NULL, column_name TEXT NOT NULL, geometry_type_name TEXT NOT NULL, srs_id INTEGER NOT NULL, z TINYINT NOT NULL, m TINYINT NOT NULL, CONSTRAINT pk_geom_cols PRIMARY KEY (table_name, column_name), CONSTRAINT uk_gc_table_name UNIQUE (table_name), CONSTRAINT fk_gc_tn FOREIGN KEY (table_name) REFERENCES gpkg_contents(table_name), CONSTRAINT fk_gc_srs FOREIGN KEY (srs_id) REFERENCES gpkg_spatial_ref_sys (srs_id) );
08 mar 11:30:11 DEBUG [org.geotools.jdbc.util] - CREATE TABLE IF NOT EXISTS gpkg_contents ( table_name TEXT NOT NULL PRIMARY KEY, data_type TEXT NOT NULL, identifier TEXT UNIQUE, description TEXT DEFAULT ‘’, last_change DATETIME NOT NULL DEFAULT (strftime(’%Y-%m-%dT%H:%M:%fZ’,‘now’)), min_x DOUBLE, min_y DOUBLE, max_x DOUBLE, max_y DOUBLE, srs_id INTEGER, CONSTRAINT fk_gc_r_srs_id FOREIGN KEY (srs_id) REFERENCES gpkg_spatial_ref_sys(srs_id) );
08 mar 11:30:11 DEBUG [org.geotools.jdbc.util] - CREATE TABLE IF NOT EXISTS gpkg_tile_matrix_set ( table_name TEXT NOT NULL PRIMARY KEY, srs_id INTEGER NOT NULL, min_x DOUBLE NOT NULL, min_y DOUBLE NOT NULL, max_x DOUBLE NOT NULL, max_y DOUBLE NOT NULL, CONSTRAINT fk_gtms_table_name FOREIGN KEY (table_name) REFERENCES gpkg_contents(table_name), CONSTRAINT fk_gtms_srs FOREIGN KEY (srs_id) REFERENCES gpkg_spatial_ref_sys (srs_id) );
08 mar 11:30:11 DEBUG [org.geotools.jdbc.util] - CREATE TABLE IF NOT EXISTS gpkg_tile_matrix ( table_name TEXT NOT NULL, zoom_level INTEGER NOT NULL, matrix_width INTEGER NOT NULL, matrix_height INTEGER NOT NULL, tile_width INTEGER NOT NULL, tile_height INTEGER NOT NULL, pixel_x_size DOUBLE NOT NULL, pixel_y_size DOUBLE NOT NULL, CONSTRAINT pk_ttm PRIMARY KEY (table_name, zoom_level), CONSTRAINT fk_tmm_table_name FOREIGN KEY (table_name) REFERENCES gpkg_contents(table_name) );
08 mar 11:30:11 DEBUG [org.geotools.jdbc.util] - CREATE TABLE IF NOT EXISTS gpkg_data_columns ( table_name TEXT NOT NULL, column_name TEXT NOT NULL, name TEXT UNIQUE, title TEXT, description TEXT, mime_type TEXT, constraint_name TEXT, CONSTRAINT pk_gdc PRIMARY KEY (table_name, column_name), CONSTRAINT fk_gdc_tn FOREIGN KEY (table_name) REFERENCES gpkg_contents(table_name) );
08 mar 11:30:11 DEBUG [org.geotools.jdbc.util] - INSERT into gpkg_extensions VALUES(‘gpkg_data_columns’, null, ‘gpkg_schema’, ‘http://www.geopackage.org/spec121/index.html#extension_schema’, ‘read-write’);
08 mar 11:30:11 DEBUG [org.geotools.jdbc.util] - CREATE TABLE IF NOT EXISTS gpkg_metadata ( id INTEGER CONSTRAINT m_pk PRIMARY KEY ASC NOT NULL, md_scope TEXT NOT NULL DEFAULT ‘dataset’, md_standard_uri TEXT NOT NULL, mime_type TEXT NOT NULL DEFAULT ‘text/xml’, metadata TEXT NOT NULL DEFAULT ‘’ );
08 mar 11:30:11 DEBUG [org.geotools.jdbc.util] - INSERT into gpkg_extensions VALUES(‘gpkg_metadata’, null, ‘gpkg_metadata’, ‘http://www.geopackage.org/spec121/#extension_metadata’, ‘read-write’);
08 mar 11:30:11 DEBUG [org.geotools.jdbc.util] - CREATE TABLE IF NOT EXISTS gpkg_metadata_reference ( reference_scope TEXT NOT NULL, table_name TEXT, column_name TEXT, row_id_value INTEGER, timestamp DATETIME NOT NULL DEFAULT (strftime(‘%Y-%m-%dT%H:%M:%fZ’,‘now’)), md_file_id INTEGER NOT NULL, md_parent_id INTEGER, CONSTRAINT crmr_mfi_fk FOREIGN KEY (md_file_id) REFERENCES gpkg_metadata(id), CONSTRAINT crmr_mpi_fk FOREIGN KEY (md_parent_id) REFERENCES gpkg_metadata(id) );
08 mar 11:30:11 DEBUG [org.geotools.jdbc.util] - INSERT into gpkg_extensions VALUES(‘gpkg_metadata_reference’, null, ‘gpkg_metadata’, ‘http://www.geopackage.org/spec121/#extension_metadata’, ‘read-write’);
08 mar 11:30:11 DEBUG [org.geotools.jdbc.util] - CREATE TABLE IF NOT EXISTS gpkg_data_column_constraints ( constraint_name TEXT NOT NULL, constraint_type TEXT NOT NULL, value TEXT, min NUMERIC, min_is_inclusive BOOLEAN, max NUMERIC, max_is_inclusive BOOLEAN, description TEXT, CONSTRAINT gdcc_ntv UNIQUE (constraint_name, constraint_type, value) );
08 mar 11:30:11 DEBUG [org.geotools.jdbc.util] - INSERT into gpkg_extensions VALUES(‘gpkg_data_column_constraints’, null, ‘gpkg_schema’, ‘http://www.geopackage.org/spec121/index.html#extension_schema’, ‘read-write’);
08 mar 11:30:11 DEBUG [org.geotools.jdbc.util] -
1 = -1
08 mar 11:30:11 DEBUG [org.geotools.jdbc.util] -
1 = 0
08 mar 11:30:11 DEBUG [org.geotools.jdbc.util] -
1 = 4326
08 mar 11:30:11 DEBUG [org.geotools.jdbc.util] - CREATE TABLE ‘gpkgext_semantic_annotations’ ( id INTEGER PRIMARY KEY AUTOINCREMENT, type TEXT NOT NULL, title TEXT NOT NULL, description TEXT, uri TEXT NOT NULL );
08 mar 11:30:11 DEBUG [org.geotools.jdbc.util] - CREATE TABLE ‘gpkgext_sa_reference’ ( table_name TEXT NOT NULL, key_column_name TEXT, key_value INTEGER, sa_id INTEGER NOT NULL, CONSTRAINT sa_id_fk FOREIGN KEY (sa_id) REFERENCES gpkgext_semantic_annotations(id) );
08 mar 11:30:11 DEBUG [org.geotools.jdbc.util] - INSERT INTO gpkg_extensions VALUES ( ‘gpkgext_sa_reference’, null, ‘im_semantic_annotations’, ‘https://gitlab.com/imagemattersllc/ogc-vtp2/-/blob/master/extensions/13-semantic-annotations.adoc’, ‘read-write’ );
08 mar 11:30:11 DEBUG [org.geotools.jdbc.util] - INSERT INTO gpkg_extensions VALUES ( ‘gpkgext_semantic_annotations’, null, ‘im_semantic_annotations’, ‘https://gitlab.com/imagemattersllc/ogc-vtp2/-/blob/master/extensions/13-semantic-annotations.adoc’, ‘read-write’ );
08 mar 11:30:11 ERROR [org.geoserver.wps.executor] - Process execution failed
org.geotools.process.ProcessException: java.lang.NoClassDefFoundError: Could not initialize class org.geoserver.geopkg.wps.OWSContextWriter
at org.geotools.process.factory.AnnotationDrivenProcessFactory$InvokeMethodProcess.execute(AnnotationDrivenProcessFactory.java:637)
at org.geoserver.wps.executor.ProcessStartupFilter$ProcessStartupWrapper.execute(ProcessStartupFilter.java:50)
at org.geoserver.wps.executor.DefaultProcessManager$ProcessCallable.call(DefaultProcessManager.java:224)
at org.geoserver.wps.executor.DefaultProcessManager$ProcessCallable.call(DefaultProcessManager.java:192)
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.NoClassDefFoundError: Could not initialize class org.geoserver.geopkg.wps.OWSContextWriter
at org.geoserver.geopkg.wps.GeoPackageProcess.execute(GeoPackageProcess.java:165)
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:621)
… 7 more
08 mar 11:30:11 INFO [org.geoserver.wps] -
Request: execute
service = WPS
version = 1.0.0
baseUrl = http://127.0.0.1:8083/geoserver-2.18.2-itu/
identifier:
value = gs:GeoPackage
dataInputs:
input[0]:
identifier = net.opengis.ows11.impl.CodeTypeImpl@anonymised.com (value: contents, codeSpace: null)
data = net.opengis.wps10.impl.DataTypeImpl@anonymised.com
responseForm:
rawDataOutput:
identifier = net.opengis.ows11.impl.CodeTypeImpl@anonymised.com (value: geopackage, codeSpace: null)
08 mar 11:30:11 ERROR [org.geotools.jdbc] - There’s code using JDBC based datastore and not disposing them. This may lead to temporary loss of database connections. Please make sure all data access code calls DataStore.dispose() before freeing all references to it

It seems that the following 2 jar are missing in the packaging:

  • jackson-annotations-2.10.5.jar
  • jackson-databind-2.10.5.jar

I put them in the lib folder of GeoServer and I was able to download the data in gpkg format.

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#100154-sha1:d382120)

Atlassian logo