Search code examples
shapesgeoserver

Geoserver Layer Preview downloads a WMS file instead of showing preview in OpenLayers


I am trying to preview a layer in Geoserver that I have created from a shape file. I upload the shape file successfully and I see the layer in my Layers list. When I try to preview it using OpenLayers in the Layer Preview section, instead of the preview I get a download of a wms file which contains this: Could not find layer it.geosolutions:Grid working. Does anyone knows why I get this error?

Thanks D.


Solution

  • Afterall I figured out that the problem was related with the naming of the layer. When I created the layer I named it "grid" but then geoserver renamed it to: "grid20%working". When I was using Layer Preview I was getting this error:

                       Could not find layer it.geosolutions:Grid working
    

    I guess geoserver couldn't read the name of the layer. The part "20%". When I changed the name of the layer everything worked fine.