Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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 proyect 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 + Openlayer + geoserver.

I have tried Tomcat + Openlayer + 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 trough OpenLayer 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 softwares 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 clearg one ;)


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

share|improve this question
add comment

4 Answers 4

up vote 1 down vote accepted

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

share|improve this answer
    
ok thanks. I changed the title. –  Daeron Alcarin Nov 21 '11 at 13:10
add comment

as @unicoletti says it is almost certainly not JAI as if it was the layer preview wouldn't work. More likely problems are javascript errors or the browser not being able to see the OpenLayers library.

The easiest way to see what's up is to add firebug to firefox and look at the console to see what the error is.

share|improve this answer
    
In fact i'm using firebug right now and it didn't find errors on the code. –  Daeron Alcarin Nov 21 '11 at 13:14
add comment

If the preview is working and your code is not, it has nothing to do with geoserver, JAI or tomcat. You can limit yourself to searching problems in the browser or OpenLayers.

Are you using Firefox and firebug to debug what is happening? Serious webdevelopers can't do without.

share|improve this answer
    
Ok thank you all. I'll try with firebug. –  Daeron Alcarin Nov 21 '11 at 12:08
add comment

Assuming your Windows 7 Operating System is with IIS 7.5 running on port 80 you have downloaded and installed Microsoft URL Redirection plug-in?

http://cartoninjas.pl/post/2010/10/12/Installing-GeoServer-on-Windows-7-%28x32-or-x64%29-and-IIS-75.aspx

share|improve this answer
    
It is only a test server running on Localhost. –  Daeron Alcarin Nov 21 '11 at 16:30
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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