[Geoserver-devel] [jira] (GEOS-5180) GetFeatureInfo fails for layers styled with Rendering Transformations which change schema

Martin Davis created BugGEOS-5180
GetFeatureInfo fails for layers styled with Rendering Transformations which change schema

Issue Type:

BugBug

Affects Versions:

2.2-beta2

Assignee:

Andrea Aime

Components:

WMS

Created:

19/Jun/12 6:16 PM

Description:

If a layer is styled with a Rendering Transformation that changes the schema of the layer, GetFeatureInfo can fail. This is because the underlying layer featuretype is queried using the style rules as filters, and if they refer to the attributes in the modified schema the filter evaluation will fail.

The problem occurs in GetFeatureInfo.java in execute(GetFeatureInfoRequest request, Style styles, Filter filters) where identifyVectorLayer() is called to create a query feature collection using the style filters.

Stack trace from a setup causing the issue is:

Caused by: java.lang.NullPointerException
at org.geotools.filter.IsBetweenImpl.evaluateInternal(IsBetweenImpl.java:114)
at org.geotools.filter.IsBetweenImpl.evaluate(IsBetweenImpl.java:74)
at org.geotools.filter.OrImpl.evaluate(OrImpl.java:44)
at org.geotools.filter.AndImpl.evaluate(AndImpl.java:57)
at org.geotools.data.FilteringFeatureReader.hasNext(FilteringFeatureReader.java:130)
at org.geotools.data.ReTypeFeatureReader.hasNext(ReTypeFeatureReader.java:194)
at org.geotools.data.MaxFeatureReader.hasNext(MaxFeatureReader.java:86)
at org.geotools.data.MaxFeatureReader.hasNext(MaxFeatureReader.java:86)
at org.geotools.data.DefaultFeatureResults.getCount(DefaultFeatureResults.java:334)
at org.geotools.data.store.DataFeatureCollection.size(DataFeatureCollection.java:271)
at org.geotools.data.crs.ForceCoordinateSystemFeatureResults.size(ForceCoordinateSystemFeatureResults.java:106)
at org.geoserver.wms.GetFeatureInfo.execute(GetFeatureInfo.java:301)
at org.geoserver.wms.GetFeatureInfo.execute(GetFeatureInfo.java:172)

The fix might be to check if a style contains a rendering transformation and if so avoid querying the layer.

Project:

GeoServer

Priority:

MajorMajor

Reporter:

Martin Davis

This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your [JIRA administrators](https://jira.codehaus.org/secure/ContactAdministrators!default.jspa). For more information on JIRA, see: [http://www.atlassian.com/software/jira](http://www.atlassian.com/software/jira)