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