Error in geoserver 2.16.0: "org.geotools.data.DataSourceException: An exception occurred while parsing WKB data"

Description

A layer group that renders correctly in geoserver 2.15.1 generates error in geoserver 2.16.0

_ "org.geotools.data.DataSourceException: An exception occurred while parsing WKB data"_

 

20 Sep 12:54:28 ERROR [renderer.lite] - org.geotools.data.DataSourceException: An exception occurred while parsing WKB data
java.lang.RuntimeException: org.geotools.data.DataSourceException: An exception occurred while parsing WKB data
at org.geotools.jdbc.JDBCFeatureReader.readNextFeature(JDBCFeatureReader.java:367)
at org.geotools.jdbc.JDBCFeatureReader.hasNext(JDBCFeatureReader.java:310)
at org.geotools.data.store.ContentFeatureCollection$WrappingFeatureIterator.hasNext(ContentFeatureCollection.java:138)
at org.geotools.renderer.lite.StreamingRenderer.drawPlain(StreamingRenderer.java:2616)
at org.geotools.renderer.lite.StreamingRenderer.processStylers(StreamingRenderer.java:2189)
at org.geotools.renderer.lite.StreamingRenderer.paint(StreamingRenderer.java:890)
at org.geoserver.wms.map.RenderedImageMapOutputFormat.produceMap(RenderedImageMapOutputFormat.java:594)

 

 

Caused by: org.locationtech.jts.io.ParseException: Unknown WKB type 238
at org.geotools.data.postgis.WKBReader.readGeometry(WKBReader.java:251)
at org.geotools.data.postgis.WKBReader.readGeometry(WKBReader.java:209)
at org.geotools.data.postgis.WKBReader.read(WKBReader.java:175)
at org.geotools.data.postgis.WKBAttributeIO.wkb2Geometry(WKBAttributeIO.java:85)

 

Looks like the problem is after this:

 

1 2 3 4 SELECT "id",encode(ST_AsBinary("geom"), 'base64') as "geom" FROM "cartografia_500k"."bosque" WHERE "geom" && ST_GeomFromText('POLYGON ((-74.44353103637697 4.78429790368278, -74.44353103637697 4.8065357665700486, -74.42121505737308 4.8065357665700486, -74.42121505737308 4.78429790368278, -74.44353103637697 4.78429790368278))' , 4686)

 

Looking to the table definition I found this:

 

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 CREATE TABLE cartografia_500k.bosque ( id integer NOT NULL DEFAULT nextval('cartografia_500k.bosque_id_seq'::regclass), proyecto character varying(30) COLLATE pg_catalog."default", symbol character varying(255) COLLATE pg_catalog."default" DEFAULT '3'::character varying, fecha timestamp with time zone, globalid character varying(38) COLLATE pg_catalog."default" NOT NULL, shape_length double precision, shape_area double precision, geom geometry(MultiPolygonZ,4686), CONSTRAINT bosque_pkey PRIMARY KEY (id) ) WITH ( OIDS = FALSE ) TABLESPACE pg_default;

 

Could be the cause of the problem the MultiPolygonZ geometry type?

Environment

Linux Centos 7.6 / Windows 8
Java 11 OpenJDK
Tomcat 9.0.26
Geoserver 2.16.0
Postgresql 11.2
POSTGIS 2.5.2
Database connections using JNDI

Status

Assignee

Unassigned

Reporter

Juan Carlos Méndez

Triage

Components

Affects versions

22.0

Priority

Medium
Configure