Issue Type: Bug Bug
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: Major Major
Reporter: Martin Davis
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Geoserver-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Reply via email to