I'm publishing a point dataset from PostgreSQL to GeoServer. When I leave default symbology for this dataset, GeoServer works fine and I'm able to see the data in QGIS as WMTS. When I change symbology with my own SLD style, GeoServer throws some cache errors in error logs and doesn't draw in QGIS. The same SLD for layers that are published as GeoPackages work fine. Do I have to do something extra for data that is published from PostgreSQL in order to work with SLD symbology?

GeoServer error:

Caused by: java.lang.IllegalStateException: Expected: RenderedImageMap, got null
    at org.geoserver.gwc.layer.GeoServerTileLayer.dispatchGetMap(GeoServerTileLayer.java:696)
    at org.geoserver.gwc.layer.GeoServerTileLayer.getMetatilingReponse(GeoServerTileLayer.java:613)
    ... 117 more
  • 1
    Does your SLD validate if you open it with the GeoServer style editor?
    – user30184
    Commented Jul 13, 2023 at 20:36
  • 1
    Yes it does. I think I found the answer. I will post my answer soon. Commented Jul 13, 2023 at 20:37

1 Answer 1


The SLD is valid. But it turns out when data is loaded in PostgreSQL the field names were converted to lowercase. In SLD however the field name which was used for symbolising was in capitals. When I changed field name to capitals, symbology worked fine.

  • I would have expected that you would see a better error message when rendering the layer in that case.
    – Ian Turton
    Commented Jul 14, 2023 at 10:00
  • You are correct Ian. Went back and took a look at the logs. The logs error message: Request: getServiceInfo 13 Jul 20:19:44 ERROR [geoserver.ows] - org.geoserver.platform.ServiceException: The requested Style can not be used with this layer. The style specifies an attribute named 'VEL', not found in the '0005 Commented Jul 14, 2023 at 16:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.