Java MapScript UnsatisfiedLinkError

Jean-Henry Berevoescu bjh at GLOBEXPLORER.COM
Fri Aug 4 19:17:57 EDT 2006


Ryan Ollerenshaw wrote:
> Using this bit of code my java servelt reports that the mapscript has
> loaded.
> static {
>         try {
>             //System.loadLibrary("mapscript"); //load native library
>            
> System.load("/etc/tomcat5/webapps/my_test/WEB-INF/src/libmapscript.so");
> //load native library
>             System.out.println(" * mapscript native library loaded *");
>         } catch (Exception e) {
>             System.err.println(" * error loading native library *");
>             System.err.println("Error is: " + e);
>             e.printStackTrace();
>         }
>    }
>
> although i am still getting a
> UnsatisfiedLinkError: no mapscript in java.library.path when i
> reference any of the mapscript functions for example:
>
> mapObj map = new mapObj("/var/www/html/mapserver/htdocs/display.map");
>      
> Any ideas why this is?
>
This shows that: your library was found, ideed, since you had the
directory containing it in the lib search path.
Loading the library still does not call functions. You get the error
when you call something that, in turn will
use anoter native call from a native library that is not in your lib
search path.

Look at my previous answer - it has the details in it.

Jean

-- 
Please avoid sending me Word, Excel or PowerPoint attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html



More information about the mapserver-users mailing list