Problems in testing Java Mapscript

Rodrigo Del C. Andrade rodrigo.andrade at DIGITRO.COM.BR
Mon Jun 4 15:07:25 EDT 2007


Gaia,

Risking stating the obvious or being annoying: are you sure those dlls 
are in the system (not user) PATH? Is their directory exported in the 
path or their parent directory? Have you rebooted windows after 
declaring it? I have seem similar errors on linux and all were related 
to environment variables. I have next to nil experience with MS4W, but 
thats were I would put my money on.
As Umberto said, what makes you suspect sde91.dll? Is there something in 
the logs you haven't sent?

Good luck.

Rodrigo

-- 
*Rodrigo Del C. Andrade*
/Programador/
/SIC - SSE - Soluções Segurança Pública/

*DÍGITRO TECNOLOGIA*
*E-mail:* rodrigo.andrade at digitro.com.br 
<mailto:rodrigo.andrade at digitro.com.br>
*Fone:* +55 48 3281-7314 / +55 48 3281-7000
*Fax:* +55 48 3281-7299
*Site:* www.digitro.com <http://www.digitro.com>

Umberto Nicoletti wrote:
> On 6/4/07, Gaia Trecarichi <gaia.trecarichi at gmail.com> wrote:
>>
>>
>> Hello,
>>
>> I'm new in mapserver stuff and I'm trying to use Java Mapscript 
>> without any
>> success.
>>
>> My environment is:
>> Windows XP
>> MS4W version 4.10.1.
>> JDK 1.6.0_01
>> Eclipse
>>
>>
>> I wanted to test some Java Mapscript functionality with a simple Java
>> program whose code is the following:
>>
>> -----------------------------------------------------------------------
>>
>>>>
>> import edu.umn.gis.mapscript.*;
>>
>> public class ProvaMapscript {
>>
>> public static void main(String[] args) {
>>
>> ….
>>
>> String mappath= new String("C:\\ms4w\\apps\\e-rescue\\" );
>>
>> mapObj map = new mapObj(mappath.concat(" emergency2.map"));
>>
>> imageObj image = map.draw();
>>
>> String image_url =
>> "C:\\ms4w\\tmp\\ms_tmp\\emergency.png";
>>
>> image.save(image_url, map);
>>
>>>>
>> }
>>
>> }
>>
>> I get the following error:
>>
>>
>> Exception in thread "main" java.lang.UnsatisfiedLinkError: C:\Program
>> Files\Java\jre1.6.0_01\bin\mapscript.dll: Can't find
>> dependent libraries
>>
>> at java.lang.ClassLoader$NativeLibrary.load(Native
>> Method )
>>
>> at java.lang.ClassLoader.loadLibrary0(Unknown Source)
>>
>> at java.lang.ClassLoader.loadLibrary(Unknown Source)
>>
>> at java.lang.Runtime.loadLibrary0(Unknown Source)
>>
>> at java.lang.System.loadLibrary(Unknown Source)
>>
>> at
>> edu.umn.gis.mapscript.mapscriptJNI.<clinit>(mapscriptJNI.java:23
>> )
>>
>> at edu.umn.gis.mapscript.mapObj.<init>( mapObj.java:276)
>>
>> at ProvaMapscript.main( ProvaMapscript.java:51)
>>
>> I don't know exactly which libraries mapscript.dll requires but as 
>> far as I
>> could see from some forum the following list of dll's is needed:
>>
>> bgd.dll
>>
>> gdal14.dll
>>
>> geotiff.dll
>>
>> iconv.dll
>>
>> kernel32.dll
>>
>> libcurl.dll
>>
>> libecwj2.dll
>>
>> libmap.dll
>>
>> libmysql.dll
>>
>> libpq.dll
>>
>> libproj.dll
>>
>> libtiff.dll
>>
>> mapscript.dll
>>
>> msvcr71.dll
>>
>> msvcrt.dll
>>
>> ntdll.dll
>>
>> pdflib.dll
>>
>> proj.dll
>>
>> xerces-c_2_7.dll
>>
>> zlib1.dll
>>
>> dwmapi.dll
>>
>>
>>
>> I have them in the directory "C:\ms4w\Apache\cgi-bin" and this 
>> directory is
>> in the system environment variable PATH.
>>
>>
>>
>> I don't know exactly which is the problem. I'm thinking to 2 things:
>>
>> 1- As far as I can understand there is a library, namely sde91.dll, 
>> that is
>> needed by libmap.dll. I can't find this library in my system. Is there
>> anybody who knows where I can download this library? (but I think I 
>> don't
>> need it since I'm not using ESRI's ArcSDE)
>>
>
> Gaia,
> what makes you think it's because of sde91.dll ? What tool have you
> used to detect this is the missing dll in the dependency chain? Did
> you use http://www.dependencywalker.com/ ?
>
> Also, are you sure that eclipse is picking up the correct path and is
> not using its internal default settings instead?
>
>> 2- Is it possible that my Java Mapscript files are not compatible 
>> with my
>> JDK version 1.6.0? I say it because I read in the README_INSTALL.txt 
>> of MS4W
>> the following:
>>
>
> Java bytecode is always backwards compatible, so that is not a problem
> or at least it's a very unlikely one.
>
> BTW, the java geeks who live here would very much appreciate if you
> turned off html formatting and reverted to posting in good ol' plain
> text. Thanks ;-)
>
> Hope this helps,
> Umberto
>
>> MapScript
>>
>>>>
>> Java MapScript: compiled against Java 1.5.07
>>
>>>>
>> If anybody could help me in this problem I would be infinitely 
>> grateful!!
>>
>> Thank you in advance,
>>
>> Gaia



More information about the mapserver-users mailing list