0

Geoserver MimeType Problem

Environment: OL2, Tomcat 7, Geoserver 2.7.0, PostGIS-DataStore in Geoserver

I have created a Website, first at Local Machine, then transferred the project to AcuGIS. Before I was working with XAMPP and Apache, Geoserver was on different Location (localhost:5000) and everything was working fine, but after transfer I only get "Pink Tiles" and mime type error.

On AcuGIS they offer a package with geoserver, tomcat etc. Transferring, setting up connections to PostGIS (I have created PostGIS stores in Geoserver) everything seems working fine, even the Proxy works. Okay.

Layer previews in Geoserver with OL3 (even though I am working with OL2) are showing up as expected.

In fact I the core use of my WebApplication is loading GeoJSON Layers. But to show additional Informations (parameterized SQL Views, WFS for creating features) I rely on getting Geoserver and WMS / WFS to work.

So in my OL Javascript I request the exact URL where my Geoserver Data Store and everything is:

function init() {


OpenLayers.ProxyHost = "/cgi-bin/proxy.cgi?url=";

var format = "image/png";



var trailsGeoserver = new OpenLayers.
//"http://localhost:5000/geoserver/Master/wms"; "http://mtb-         trailfinder.com:80/geoserver/MASTER/wms"

    var trailsGeoserver = new OpenLayers.Layer.WMS(
        "Trails Steiermark", "http://mtb-trailfinder.com:80/geoserver/MASTER/wms" ,
        {
        "LAYERS": 'Master:scale',       
        transparent: true,
        format:format

        },
           {
            buffer: 0,
            displayOutsideMaxExtent: true,
            isBaseLayer: false,
            projection: 'EPSG:4326',  // dient nur der Information
            visibility: false,
            transitionEffect: 'null'
            } 
    );

        map.addLayer(trailsGeoserver);

 } // end of Init

This is my reduced code for troubleshooting, with just one WMS, instead of 10. So the funny thing is, that replacing the URL of the WMS with my localhost:5000 Adress, everything works fine!

However putting the URL to the Geoserver on my WebHost (which in fact is showing me the right png in layer preview) it comes back as mal formatted, with

"Content-Type: application/vnd.ogc.se_xml;charset=UTF-8"

Status Code is allright (200). 

And this is my error log in Chrome Debugger:

Resource interpreted as Image but transferred with MIME type    application/vnd.ogc.se_xml: "link..." (cannot displayed due to lack of reputation).

When I click on that link I get back an XML File with following Message:

Could not find layer Master:scale

So I am really confused, because on my localsystem everything works just fine, took me a week to investigate the problems I am facing right now, without any real success.

I also have been looking in all Forums, but they all differ from my problem.

//

So until now my guess is, that the tomcat server is not working properly. Geoserver instead works fine, asuming this because of the working Layer-Previews.

Something messes up the Server response on AcuGIS. But I don´t have any clue what this is.

For inspection the Website is available on www.mtb-trailfinder.com.

  • That is the correct mime/type for an error, see what the geoserver logs say, also turning on verbose exceptions may help – Ian Turton May 24 '15 at 12:41
  • Thank you very much for quick response, I will try to do what you suggest. – pateriol May 24 '15 at 18:21
2

Okay there was a "?" missing at the end of the URL for wfs-layer and I (very beginner error) forgot to capitalize the Datastore Link in the wms-layers.

I think it was all the copying from localsystem to my host, where some little but powerful errors came in.

Above all the main problem was guessing that disfunctionality came from tomcat´s web.xml because with XAMPP I had to configure a virtual host. But tomcat is different, it works with configuring the proxy file nothing else...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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