[Geoserver-devel] [JIRA] (GEOS-7524) Adding a readonly rule in GeoFence will provoke a NullPointer exception

Nuno Oliveira created an issue

GeoServer / BugGEOS-7524

Adding a readonly rule in GeoFence will provoke a NullPointer exception

Issue Type:

BugBug

Assignee:

Unassigned

Attachments:

Capture d’écran de 2016-04-28 17-56-16.png, stack-trace.txt

Components:

GeoFence, WFS

Created:

28/Apr/16 7:15 PM

Priority:

MediumMedium

Reporter:

Nuno Oliveira

Using an external GeoFence instance (version 3.2.0) and a GeoServer instance (master) with the GeoFence community module.

Defining an attribute READONLY rule in GeoFence will provoke a NullPointerException in a WFS transaction request to the layer, regardless if we try to update the READONLY attribute or not.

To reproduce the error, define a READONLY attribute rule in GeoFence (see print-screen).

And try this requests:

Updating the READONLY attribute

curl 'http://localhost/geoserver/wfs' -H 'Content-Type: application/xml' --data-binary '<wfs:Transaction xmlns:wfs="http://www.opengis.net/wfs" service="WFS" version="1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/wfs [http://schemas.opengis.net/wfs/1.1.0/wfs.xsd](http://schemas.opengis.net/wfs/1.1.0/wfs.xsd)"><wfs:Update typeName="feature:bugsites" xmlns:feature="http://www.openplans.org/spearfish"><wfs:Property><wfs:Name>str1</wfs:Name><wfs:Value>Beetle site UPDATE</wfs:Value></wfs:Property><ogc:Filter xmlns:ogc="http://www.opengis.net/ogc"><ogc:FeatureId fid="bugsites.1"/></ogc:Filter></wfs:Update></wfs:Transaction>' --compressed

Updating another attribute

curl 'http://localhost/geoserver/wfs' -H 'Content-Type: application/xml' --data-binary '<wfs:Transaction xmlns:wfs="http://www.opengis.net/wfs" service="WFS" version="1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/wfs [http://schemas.opengis.net/wfs/1.1.0/wfs.xsd](http://schemas.opengis.net/wfs/1.1.0/wfs.xsd)"><wfs:Update typeName="feature:bugsites" xmlns:feature="http://www.openplans.org/spearfish"><wfs:Property><wfs:Name>cat</wfs:Name><wfs:Value>10</wfs:Value></wfs:Property><ogc:Filter xmlns:ogc="http://www.opengis.net/ogc"><ogc:FeatureId fid="bugsites.1"/></ogc:Filter></wfs:Update></wfs:Transaction>' --compressed

In both cases the response should be:

{{<ows:ExceptionReport xmlns:xs=“http://www.w3.org/2001/XMLSchema” xmlns:ows=“http://www.opengis.net/ows” xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance” version=“1.0.0” xsi:schemaLocation=“http://www.opengis.net/ows http://localhost:8080/geoserver/schemas/ows/1.0.0/owsExceptionReport.xsd”>
<ows:Exception exceptionCode=“NoApplicableCode”>
<ows:ExceptionText>java.lang.NullPointerException</ows:ExceptionText>
</ows:Exception>
</ows:ExceptionReport>
}}

Stack trace attached.

Add Comment

Add Comment

This message was sent by Atlassian JIRA (v1000.5.0#72002-sha1:17539a9)

Atlassian logo