<span class="gmail_quote"></span><span class="gmail_quote">Sorry, my last message don&#39;t see correctly.<br><br></span><div><span class="q" id="q_116576ce6601031c_1">Hello:<br><br>I&#39;m new using Java Mapscript but I can&#39;t execute the examples (
DrawMap.java) with my testmap.map.<br><br>This is my system.
<br><br>Linux OpenSuse 10.2<br>mapserv -v results<br>MapServer version 4.8.4 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP OUTPUT=PDF OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=THREADS SUPPORTS=GEOS INPUT=EPPL7 INPUT=POSTGIS INPUT=GDAL INPUT=SHAPEFILE
<br><br>Java -v results<br>java version &quot;1.5.0_08&quot;<br>Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_08-b03)<br>Java HotSpot(TM) Client VM (build 1.5.0_08-b03, mixed mode, sharing)<br><br>the Java IDE is netbeans 
5.5.1<br><br>This is my testmap file:<br><br><br><span style="font-style: italic; font-weight: bold;">MAP</span><br style="font-style: italic; font-weight: bold;"><span style="font-style: italic; font-weight: bold;">NAME servidor
</span><br style="font-style: italic; font-weight: bold;"><span style="font-style: italic; font-weight: bold;">EXTENT 626680 4191039 817176 4519393</span><br style="font-style: italic; font-weight: bold;"><span style="font-style: italic; font-weight: bold;">


SYMBOLSET &quot;etc/symbol.sym&quot;</span><br style="font-style: italic; font-weight: bold;"><span style="font-style: italic; font-weight: bold;">FONTSET &quot;etc/fonts.txt&quot;</span><br style="font-style: italic; font-weight: bold;">


<span style="font-style: italic; font-weight: bold;">IMAGECOLOR 255 153 255</span><br style="font-style: italic; font-weight: bold;"><span style="font-style: italic; font-weight: bold;">IMAGETYPE jpeg</span><br style="font-style: italic; font-weight: bold;">


<span style="font-style: italic; font-weight: bold;">RESOLUTION 96</span><br style="font-style: italic; font-weight: bold;"><br style="font-style: italic; font-weight: bold;"><br style="font-style: italic; font-weight: bold;">


<br style="font-style: italic; font-weight: bold;"><span style="font-style: italic; font-weight: bold;">WEB</span><br style="font-style: italic; font-weight: bold;"><span style="font-style: italic; font-weight: bold;">&nbsp;&nbsp;&nbsp; IMAGEPATH &quot;/var/www/tmp&quot;
</span><br style="font-style: italic; font-weight: bold;"><span style="font-style: italic; font-weight: bold;">&nbsp;&nbsp;&nbsp; IMAGEURL &quot;/tmp&quot;</span><br style="font-style: italic; font-weight: bold;"><span style="font-style: italic; font-weight: bold;">


&nbsp;&nbsp;&nbsp; METADATA</span><br style="font-style: italic; font-weight: bold;"><span style="font-style: italic; font-weight: bold;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &quot;wms_title&quot; &quot;servidor wms icv&quot;</span><br style="font-style: italic; font-weight: bold;">


<span style="font-style: italic; font-weight: bold;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &quot;wms_online_resource&quot; &quot;******************************************&quot;</span><br style="font-style: italic; font-weight: bold;"><span style="font-style: italic; font-weight: bold;">


&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &quot;wms_srs&quot; &quot;EPSG:23030 EPSG:25830 EPSG:4230 EPSG:4258&quot;</span><br style="font-style: italic; font-weight: bold;"><span style="font-style: italic; font-weight: bold;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; </span><br style="font-style: italic; font-weight: bold;">


<span style="font-style: italic; font-weight: bold;">&nbsp;&nbsp;&nbsp; END</span><br style="font-style: italic; font-weight: bold;"><span style="font-style: italic; font-weight: bold;">END</span><br style="font-style: italic; font-weight: bold;">


<br style="font-style: italic; font-weight: bold;"><span style="font-style: italic; font-weight: bold;">REFERENCE</span><br style="font-style: italic; font-weight: bold;"><span style="font-style: italic; font-weight: bold;">


&nbsp;&nbsp;&nbsp; EXTENT 626690 4186545 823410 4519390</span><br style="font-style: italic; font-weight: bold;"><span style="font-style: italic; font-weight: bold;">&nbsp;&nbsp;&nbsp; IMAGE &quot;./key_map.png&quot;</span><br style="font-style: italic; font-weight: bold;">


<span style="font-style: italic; font-weight: bold;">&nbsp;&nbsp;&nbsp; SIZE 150 200</span><br style="font-style: italic; font-weight: bold;"><span style="font-style: italic; font-weight: bold;">&nbsp;&nbsp;&nbsp; STATUS ON</span><br style="font-style: italic; font-weight: bold;">


<span style="font-style: italic; font-weight: bold;">&nbsp;&nbsp;&nbsp; COLOR -1 -1 -1</span><br style="font-style: italic; font-weight: bold;"><span style="font-style: italic; font-weight: bold;">&nbsp;&nbsp;&nbsp; OUTLINECOLOR 255 0 0</span><br style="font-style: italic; font-weight: bold;">


<span style="font-style: italic; font-weight: bold;">END</span><br style="font-style: italic; font-weight: bold;"><br style="font-style: italic; font-weight: bold;"><span style="font-style: italic; font-weight: bold;">PROJECTION
</span><br style="font-style: italic; font-weight: bold;"><span style="font-style: italic; font-weight: bold;">&nbsp;&nbsp;&nbsp; &quot;init=epsg:23030&quot;</span><br style="font-style: italic; font-weight: bold;"><span style="font-style: italic; font-weight: bold;">


END</span><br style="font-style: italic; font-weight: bold;"><br style="font-style: italic; font-weight: bold;"><span style="font-style: italic; font-weight: bold;">OUTPUTFORMAT</span><br style="font-style: italic; font-weight: bold;">


<span style="font-style: italic; font-weight: bold;">&nbsp;&nbsp; NAME jpeg</span><br style="font-style: italic; font-weight: bold;"><span style="font-style: italic; font-weight: bold;">&nbsp;&nbsp; DRIVER &quot;GD/JPEG&quot;</span><br style="font-style: italic; font-weight: bold;">


<span style="font-style: italic; font-weight: bold;">&nbsp;&nbsp; MIMETYPE &quot;image/jpeg&quot;</span><br style="font-style: italic; font-weight: bold;"><span style="font-style: italic; font-weight: bold;">&nbsp;&nbsp; IMAGEMODE RGB</span>


<br style="font-style: italic; font-weight: bold;"><span style="font-style: italic; font-weight: bold;">&nbsp;&nbsp; EXTENSION &quot;jpg&quot;</span><br style="font-style: italic; font-weight: bold;"><span style="font-style: italic; font-weight: bold;">


&nbsp;&nbsp; FORMATOPTION &quot;QUALITY=100&quot;</span><br style="font-style: italic; font-weight: bold;"><span style="font-style: italic; font-weight: bold;">END</span><br style="font-style: italic; font-weight: bold;"><br style="font-style: italic; font-weight: bold;">


<span style="font-style: italic; font-weight: bold;">OUTPUTFORMAT</span><br style="font-style: italic; font-weight: bold;"><span style="font-style: italic; font-weight: bold;">&nbsp;&nbsp; NAME png</span><br style="font-style: italic; font-weight: bold;">


<span style="font-style: italic; font-weight: bold;">&nbsp;&nbsp; DRIVER &quot;GD/PNG&quot;</span><br style="font-style: italic; font-weight: bold;"><span style="font-style: italic; font-weight: bold;">&nbsp;&nbsp; MIMETYPE &quot;image/png&quot;
</span><br style="font-style: italic; font-weight: bold;"><span style="font-style: italic; font-weight: bold;">&nbsp;&nbsp; IMAGEMODE RGBA</span><br style="font-style: italic; font-weight: bold;"><span style="font-style: italic; font-weight: bold;">


&nbsp;&nbsp; EXTENSION &quot;png&quot;</span><br style="font-style: italic; font-weight: bold;"><span style="font-style: italic; font-weight: bold;">&nbsp;&nbsp; TRANSPARENT ON</span><br style="font-style: italic; font-weight: bold;"><span style="font-style: italic; font-weight: bold;">


&nbsp;&nbsp; FORMATOPTION &quot;INTERLACE=ON&quot;</span><br style="font-style: italic; font-weight: bold;"><span style="font-style: italic; font-weight: bold;">END</span><br style="font-style: italic; font-weight: bold;"><br style="font-style: italic; font-weight: bold;">


<span style="font-style: italic; font-weight: bold;">OUTPUTFORMAT</span><br style="font-style: italic; font-weight: bold;"><span style="font-style: italic; font-weight: bold;">&nbsp;&nbsp; NAME gif</span><br style="font-style: italic; font-weight: bold;">


<span style="font-style: italic; font-weight: bold;">&nbsp;&nbsp; DRIVER &quot;GD/gif&quot;</span><br style="font-style: italic; font-weight: bold;"><span style="font-style: italic; font-weight: bold;">&nbsp;&nbsp; MIMETYPE &quot;image/gif&quot;
</span><br style="font-style: italic; font-weight: bold;"><span style="font-style: italic; font-weight: bold;">&nbsp;&nbsp; IMAGEMODE PC256</span><br style="font-style: italic; font-weight: bold;"><span style="font-style: italic; font-weight: bold;">


&nbsp;&nbsp; EXTENSION &quot;gif&quot;</span><br style="font-style: italic; font-weight: bold;"><span style="font-style: italic; font-weight: bold;">&nbsp;&nbsp; TRANSPARENT ON</span><br style="font-style: italic; font-weight: bold;"><span style="font-style: italic; font-weight: bold;">


&nbsp;&nbsp; FORMATOPTION &quot;INTERLACE=ON&quot;</span><br style="font-style: italic; font-weight: bold;"><span style="font-style: italic; font-weight: bold;">END</span><br style="font-style: italic; font-weight: bold;"><br style="font-style: italic; font-weight: bold;">


<span style="font-style: italic; font-weight: bold;">LAYER</span><br style="font-style: italic; font-weight: bold;"><span style="font-style: italic; font-weight: bold;">&nbsp;&nbsp;&nbsp; NAME &quot;rios_principales_1000&quot;</span><br style="font-style: italic; font-weight: bold;">


<span style="font-style: italic; font-weight: bold;">&nbsp;&nbsp;&nbsp; GROUP &quot;Hidrografía&quot;</span><br style="font-style: italic; font-weight: bold;"><span style="font-style: italic; font-weight: bold;">&nbsp;&nbsp;&nbsp; CONNECTION &quot;host=****** port=****** dbname=capas user=******* password=******&quot;
</span><br style="font-style: italic; font-weight: bold;"><span style="font-style: italic; font-weight: bold;">&nbsp;&nbsp;&nbsp; CONNECTIONTYPE Postgis</span><br style="font-style: italic; font-weight: bold;"><span style="font-style: italic; font-weight: bold;">


&nbsp;&nbsp;&nbsp; DATA &quot;the_geom from rios_principales_1000&quot;</span><br style="font-style: italic; font-weight: bold;"><span style="font-style: italic; font-weight: bold;">&nbsp;&nbsp;&nbsp; TYPE LINE</span><br style="font-style: italic; font-weight: bold;">


<span style="font-style: italic; font-weight: bold;">&nbsp;&nbsp;&nbsp; METADATA</span><br style="font-style: italic; font-weight: bold;"><span style="font-style: italic; font-weight: bold;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &quot;wms_name&quot; &quot;rios_principales_1000&quot;
</span><br style="font-style: italic; font-weight: bold;"><span style="font-style: italic; font-weight: bold;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &quot;wms_group_title&quot; &quot;Hidrografía&quot;</span><br style="font-style: italic; font-weight: bold;">


<span style="font-style: italic; font-weight: bold;">&nbsp;&nbsp;&nbsp; END</span><br style="font-style: italic; font-weight: bold;"><span style="font-style: italic; font-weight: bold;">&nbsp;&nbsp;&nbsp; CLASS</span><br style="font-style: italic; font-weight: bold;">


<span style="font-style: italic; font-weight: bold;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; NAME &quot;riosPpal1000&quot;</span><br style="font-style: italic; font-weight: bold;"><span style="font-style: italic; font-weight: bold;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; TITLE &quot;&quot;
</span><br style="font-style: italic; font-weight: bold;"><span style="font-style: italic; font-weight: bold;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; SIZE 4</span><br style="font-style: italic; font-weight: bold;"><span style="font-style: italic; font-weight: bold;">


&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; COLOR 0 112 255</span><br style="font-style: italic; font-weight: bold;"><span style="font-style: italic; font-weight: bold;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; LABEL</span><br style="font-style: italic; font-weight: bold;"><span style="font-style: italic; font-weight: bold;">


&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ANGLE AUTO</span><br style="font-style: italic; font-weight: bold;"><span style="font-style: italic; font-weight: bold;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; MINDISTANCE 1500</span><br style="font-style: italic; font-weight: bold;"><span style="font-style: italic; font-weight: bold;">


&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; COLOR 190 232 255</span><br style="font-style: italic; font-weight: bold;"><span style="font-style: italic; font-weight: bold;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; OUTLINECOLOR 0 112 255</span><br style="font-style: italic; font-weight: bold;">


<span style="font-style: italic; font-weight: bold;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; SIZE 8</span><br style="font-style: italic; font-weight: bold;"><span style="font-style: italic; font-weight: bold;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; TYPE&nbsp; truetype</span><br style="font-style: italic; font-weight: bold;">


<span style="font-style: italic; font-weight: bold;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; FONT &quot;fritqat-italic&quot;</span><br style="font-style: italic; font-weight: bold;"><span style="font-style: italic; font-weight: bold;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; POSITION auto
</span><br style="font-style: italic; font-weight: bold;"><span style="font-style: italic; font-weight: bold;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; END</span><br style="font-style: italic; font-weight: bold;"><span style="font-style: italic; font-weight: bold;">


&nbsp;&nbsp;&nbsp; END</span><br style="font-style: italic; font-weight: bold;"><span style="font-style: italic; font-weight: bold;">&nbsp;&nbsp;&nbsp; STATUS ON</span><br style="font-style: italic; font-weight: bold;"><span style="font-style: italic; font-weight: bold;">


END</span><br style="font-style: italic; font-weight: bold;"><br style="font-style: italic; font-weight: bold;"><span style="font-style: italic; font-weight: bold;">END<br><br></span>The same testmap.map works fine with php_mapscript.
<br><br>When execute the DrawMap.java example crash in the line (43)<br><br><span style="font-weight: bold; font-style: italic;">&nbsp;imageObj img = map.draw();<br><br></span>This is the error:<br><br><span style="font-style: italic; font-weight: bold;">


Exception in thread &quot;main&quot; java.lang.UnknownError: Unable to initialize image.</span><br style="font-style: italic; font-weight: bold;"><span style="font-style: italic; font-weight: bold;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at edu.umn.gis.mapscript.mapscriptJNI.mapObj_draw


(Native Method)</span><br style="font-style: italic; font-weight: bold;"><span style="font-style: italic; font-weight: bold;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at edu.umn.gis.mapscript.mapObj.draw(mapObj.java:382)</span><br style="font-style: italic; font-weight: bold;">


<span style="font-style: italic; font-weight: bold;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at es.gva.icv.jmapscript.DrawMap.main(DrawMap.java:43)<br><br></span>I have searched about this error in internet, but I have found nothing.<br><br>Thanks in advance.
<br><span>Luis Conti<br>
</span>
</span></div>