[GIS] How to solve the map publishing problem with GeoServer 2.1.1 on Windows 7 x64

apachegeoserveropenlayers-2tomcatweb-mapping

Well, my problem is that I have GeoServer installed over a Windows 7 x64 system with both Java (JRE 6u29) x32 and x64 installed and I can't project my layers on the website. The preview on GeoServer works fine, but it doesn't work on my site (it's a localhost server, a testing server)

I have Apache + OpenLayers + GeoServer.

I have tried Tomcat + OpenLayers + GeoServer (war) with similar results.

The server status shows JAI libraries marked as false. I say this because I think the problem may be on the JAI library. I searched about and found that JAI works only on x32 systems so I don't know how to solve this. I need to work with x64 architectures.

I tried to install JAI over the x32 version of Java but my server stop working after that.

My local call to GeoServer through OpenLayers Instance is this:

<script type="text/javascript">
    var mapa, capa;

    function init(){
        mapa = new OpenLayers.Map('mapwms'); 
        capa = new OpenLayers.Layer.WMS(
            "Catastro",
            "http://localhost:8080/geoserver/Catastro/wms",
            {layers: 'Catastro:Predios'}
        );

        map.addLayers([capa]);
        map.zoomToMaxExtent();
        map.addControl(new OpenLayers.Control.LayerSwitcher());
    }
</script>

So I need to figure out why the GeoServer preview is working and not my code.

I'm new on this kind of software so I need some help

I put "http://localhost:8080/geoserver/Catastro/wms" because that is how appear on the preview source code.

I'll really appreciate your help please 😉

NOTE: I've changed the question title to a more clear one 😉


SOLVED: Thanks all for your help. I follow your advice and my server is now working.

Best Answer

I am quite sure the problem is not with the JAI libraries because the layer preview in Geoserver works.

Try this: open to the layer preview and look at the source code. The preview uses exactly what you are using in the page you posted above. There you'll find all your answers (in the source code , I mean).

Happy learning.

P.S.: change the question title, if it is not about JAI, or future users could be misled