I have installed GeoServer 2.16.1 on two independent servers; but both are unable to translate layers to KML (Keyhole Mark-up Language). I receive the following content instead of the KML:
<ServiceExceptionReport version="1.1.1">
<ServiceException code="InvalidSRS">
Error occurred decoding the espg code EPSG:2908/kml?layers=nyc:nyc_buildings No code "EPSG:2908/KML?LAYERS=NYC:NYC_BUILDINGS" from authority "European Petroleum Survey Group" found for object of type "IdentifiedObject".
</ServiceException>
</ServiceExceptionReport>
Apparently, the server is trying to interpret "EPSG:2908/KML?LAYERS=NYC:NYC_BUILDINGS" as the EPSG code, instead of just "EPSG:2908".
The URL to generate the KML is:
localhost:8080/geoserver/nyc/wms?service=WMS&version=1.1.0&request=GetMap&layers=nyc%3Anyc_buildings&bbox=983797.5%2C207443.0%2C991899.0625%2C218850.828125&width=545&height=768&srs=EPSG%3A2908/kml?layers=nyc:nyc_buildings
Any ideas on why this is happening?