Hi Srikanth, please clarify. Did you click on "Layer Preview" and then on "OpenLayers" and you got that XML error on the browser window? Please provide the actual url used. For example, in my case an OpenLayers preview works fine and leads me to:
https://myserver.gov.br/geoserver/myservice/wms?service=WMS&version=1.1.0&request=GetMap&layers=myservice:mylayer&styles=&bbox=-180.0,-90.0,180.0,90.0&width=768&height=384&srs=EPSG:4326&format=application/openlayers If you click on the menu to select the format on the "Layer Preview" screen and choose WFS->GeoJSON, however, you will get a plain geojson text dump to your screen. What were your steps to get that error? Best, Daniel Em 14/07/2016 17:11, Srikanth escreveu: > Hello. > > I have been using geoserver from quite sometime now and publishing > layers and consuming services. Recently I have started facing the > issue mentioned below when I am trying to preview the layer in > geoserver using openlayers, but renders the layer using geojson. I am > unable to resolve this, any help would be greatly appreciated > > <?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE > ServiceExceptionReport SYSTEM > "http://x.x.x.x:8080/geoserver/schemas/wms/1.1.1/WMS_exception_1_1_1.dtd"> > <ServiceExceptionReport version="1.1.1" > <ServiceException > code="ForbiddenFormat"> > Creating maps using application/openlayers is not allowed > </ServiceException></ServiceExceptionReport> > > Geoserver version : 2.7.1 > OS :Ubuntu 14 Server > > -Srikanth > > ------------------------------------------------------------------------------ > What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic > patterns at an interface-level. Reveals which users, apps, and protocols are > consuming the most bandwidth. Provides multi-vendor support for NetFlow, > J-Flow, sFlow and other flows. Make informed decisions using capacity planning > reports.http://sdm.link/zohodev2dev > _______________________________________________ > Geoserver-users mailing list > Geoserver-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/geoserver-users > ------------------------------------------------------------------------------ What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic patterns at an interface-level. Reveals which users, apps, and protocols are consuming the most bandwidth. Provides multi-vendor support for NetFlow, J-Flow, sFlow and other flows. Make informed decisions using capacity planning reports.http://sdm.link/zohodev2dev _______________________________________________ Geoserver-users mailing list Geoserver-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geoserver-users