Hi

Maybe
http://article.gmane.org/gmane.comp.gis.mapserver.user/18799/
is helpfull.

Benedikt

UMN MapServer Users List <[email protected]> schrieb am 20.04.2006 13:42:09:

> Hi,
>
> I'm have a fairly annoying issue when trying to load a map file into a java
> mapObj object when running in windows XP.  I'm using mapserver 4.8.3 as
> distributed with ms4w 1.5.1 - i'm also using the mapscript.dll and
> mapscript.jar as distributed with that ms4w.  My app is a servlet that runs
> under tomcat 5.5, with a sun 1.5 jvm.  I'm fairly confident my paths etc.
> are fine.
>
> The java code really just boils down to one line:
>
> mapObj mapobj = new mapObj(sMapFilename);
>
> The exception is thrown by that statement.  And is..
>
> java.lang.UnknownError: No such file or directory
>    edu.umn.gis.mapscript.mapscriptJNI.new_mapObj(Native Method)
>    edu.umn.gis.mapscript.mapObj.<init>(mapObj.java:312)
>    myapp.ModifiedMapObj.<init>(ModifiedMapObj.java:48)
>    myapp.Test.doGet(Test.java:37)
>    javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
>    javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>
> I'm sure it finds my map file fine, as if you pass a messed up string it
> gives a different error (java.io.IOException).
>
> I'm also confident there's nothing wrong with my .map file as the test one
> is simple (map file attached below anyway), everything is in the same
> directory and it works fine with a cgi wms request on the same windows
> machine.  And...
> (here's the annoying bit)
> ..it also works fine when I deploy exactly the same compiled code with
> exactly the same .map file and shp files on my linux (fedora) box.  On that
> box it's a slightly different version of mapserver/mapscript (compiled them
> myself), tomcat 5 not 5.5 and a sun 1.4 jvm - but still, why does the code
> work on that box and not on windows?
>
> If anyone has any ideas at all it would be much appreciated?
>
> Thanks, James
>
> ---.map file contents---
>
> #
> # Start of WMS Server map file
> MAP
> NAME WMS_server
> IMAGECOLOR 250   250 250
> SIZE 800 600
> STATUS ON
> PROJECTION
>   "init=epsg:27700"
> END
> EXTENT 275000 180000 285000 190000
>
> SYMBOLSET OSMMsymbolsTest.sym
> FONTSET fonts.txt
> UNITS METERS
>
> WEB
>   IMAGEPATH "/ms4w/tmp/ms_tmp/"
>   IMAGEURL "/ms_tmp/"
> END
>
> LAYER
>   NAME TopographicArea
>   METADATA
>     "wms_title"    "TopographicArea"
>   END
>   TYPE POLYGON
>   STATUS ON
>   DATA TopographicArea
>   PROJECTION
>     "init=epsg:27700"
>   END
>   CLASS
>     NAME "default"
>     STYLE
>       COLOR 255 204 153
>       OUTLINECOLOR 0 0 0
>     END
>   END
> END
> END # Map File

Reply via email to