Details
Description
Last days I gave a spin to the new WMSCascadeLayer feature, and it seems its working pretty nice when single layer is used. But what I wanted to do is combine different layers from several external WMS servers + locally configured server. Following error was thrown:
ERROR [geoserver.ows] -
java.lang.NullPointerException
at org.geoserver.wms.map.GetMapKvpRequestReader.read(GetMapKvpRequestReader.java:318)
at org.geoserver.wms.map.GetMapKvpRequestReader.read(GetMapKvpRequestReader.java:1)
at org.geoserver.ows.Dispatcher.parseRequestKVP(Dispatcher.java:1144)
at org.geoserver.ows.Dispatcher.dispatch(Dispatcher.java:482)
at org.geoserver.ows.Dispatcher.handleRequestInternal(Dispatcher.java:226)
I took a look at the error and I figured it out that in the case of LayerGroupInfo single layer wasnt handled the same way as it was in single LayerInfo request. More precisely style wasn't handled correctly if the layer in the group was instance of WMSLayerInfo
Initial patch attached as well as the resulting layergroup image request
(from two external wms sources - atlas.gc.ca & wms.jpl.nasa.gov - and locally configured one topp:states)
Regards,
Ivan
As the code is same as in LayerInfo case, maybe we can combine it into single method
(and can somebody please change in title casade -> cascade. tnx)