[Geoserver-devel] [JIRA] (GEOS-9271) NullPointerException on WFS ComplexGeoJsonWriter Link check

Fernando Miño created an issue

GeoServer / BugGEOS-9271

NullPointerException on WFS ComplexGeoJsonWriter Link check

Issue Type:

BugBug

Assignee:

Unassigned

Created:

29/Jun/19 12:41 AM

Priority:

MediumMedium

Reporter:

Fernando Miño

On App-Schema MongoDB GeoJSON output request Geoserver throws a NullPointerException on WFS ComplexGeoJsonWriter class -> checkIfFeatureIsLinked method, due to null userData object (attributes parameter) in properties not being null safe checked before using its methods.

Stack trace:

2019-06-26 10:54:45,380 INFO [wfs.json] - about to encode JSON
2019-06-26 10:54:45,704 INFO [geoserver.servlets] - OutputStream was successfully aborted.
2019-06-26 10:54:45,704 ERROR [geoserver.ows] -
java.lang.NullPointerException
 at org.geoserver.wfs.json.ComplexGeoJsonWriter.checkIfFeatureIsLinked(ComplexGeoJsonWriter.java:353)
 at org.geoserver.wfs.json.ComplexGeoJsonWriter.getLinkedFeatures(ComplexGeoJsonWriter.java:330)
 at org.geoserver.wfs.json.ComplexGeoJsonWriter.encodePropertiesByType(ComplexGeoJsonWriter.java:241)
 at org.geoserver.wfs.json.ComplexGeoJsonWriter.encodeProperties(ComplexGeoJsonWriter.java:204)
 at org.geoserver.wfs.json.ComplexGeoJsonWriter.encodeFeature(ComplexGeoJsonWriter.java:119)
 at org.geoserver.wfs.json.ComplexGeoJsonWriter.encodeFeatureCollection(ComplexGeoJsonWriter.java:97)
 at org.geoserver.wfs.json.ComplexGeoJsonWriter.write(ComplexGeoJsonWriter.java:88)
 at org.geoserver.wfs.json.GeoJSONGetFeatureResponse.writeFeatures(GeoJSONGetFeatureResponse.java:226)
 at org.geoserver.wfs.json.GeoJSONGetFeatureResponse.write(GeoJSONGetFeatureResponse.java:132)
 at org.geoserver.wfs.WFSGetFeatureOutputFormat.write(WFSGetFeatureOutputFormat.java:198)
 at org.geoserver.ows.Dispatcher.response(Dispatcher.java:1031)

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#100105-sha1:327840d)

Atlassian logo