[Geoserver-devel] [jira] (GEOS-6508) WFS 2.0 three way join fails with a NPE

Andrea Aime created an issue

GeoServer / BugGEOS-6508

WFS 2.0 three way join fails with a NPE

Issue Type:

BugBug

Assignee:

Andrea Aime

Components:

WFS

Created:

30/May/14 7:56 AM

Priority:

MajorMajor

Reporter:

Andrea Aime

The query is:

<?xml version="1.0"?>
<GetFeature
service="WFS"
version="2.0.0"
xmlns="http://www.opengis.net/wfs/2.0"
xmlns:fes="http://www.opengis.net/fes/2.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.opengis.net/wfs/2.0
http://schemas.opengis.net/wfs/2.0.0/wfs.xsd">
<Query typeNames="nurc:tiger_roads nurc:poly_landmarks nurc:poi">
<fes:Filter>
  <fes:And>
  <fes:Intersects>
    <fes:ValueReference>nurc:tiger_roads/geom</fes:ValueReference>
    <fes:ValueReference>nurc:poly_landmarks/geom</fes:ValueReference>
  </fes:Intersects>
  <fes:PropertyIsEqualTo>
    <fes:ValueReference>nurc:tiger_roads/name</fes:ValueReference>
    <fes:Literal>Park Row</fes:Literal>
  </fes:PropertyIsEqualTo>
  <fes:DWithin>
    <fes:ValueReference>nurc:poi/geom</fes:ValueReference>
    <fes:ValueReference>nurc:poly_landmarks/geom</fes:ValueReference>
    <fes:Distance>0.001</fes:Distance>
  </fes:DWithin>
  </fes:And>
</fes:Filter>
</Query>
</GetFeature> 

with all three feature types loaded in a postgis db of course.

The NPE happens in the data store, but the issue is actually in JoinExtractingVisitor, it rewrites the dwithin filter as dwithin(null, b.geom, 0.001)

Add Comment

Add Comment

This message was sent by Atlassian JIRA (v6.1.6#6162-sha1:7af547c)

Atlassian logo