UnsatisfiedLinkError loading the MapScript Java library

Steve-e-b sbattey at DOTTEDEYES.COM
Mon Jun 25 08:34:04 EDT 2007


I am compiling MapServer v4.8.4 using FWTools v1.3.2 for our webapp running
in Tomcat 5.5.17 and using Java 1.5.0_07 on Linux. When I try to load
MapScript Java I get the following error message:

java.lang.UnsatisfiedLinkError:
/usr/local/mapserver-4.8.4/mapscript/java/libmapscript.so:
/root/rmx/FWTools/lib/libtiff.so.3: undefined symbol: jpeg_resync_to_restart
        at java.lang.ClassLoader$NativeLibrary.load(Native Method)
        at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751)
        at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1676)
        at java.lang.Runtime.loadLibrary0(Runtime.java:822)
        at java.lang.System.loadLibrary(System.java:992)

The jpeg_resync_to_restart symbol is defined in the libjpeg library.
I noticed that the JRE has its own libjpeg.so file which takes precedence
over the libjpeg.so file in FWTools. So I replaced the JRE's libjpeg.so file
with the libjpeg.so file in FWTools. This fixes the error message above, the
MapScript Java library loads okay but then the JVM crashes at random
intervals - probably due to the libjpeg library being replaced.

Has any one encountered this error message before?
It suggests there is a conflict between the libjpeg library required by the
JRE and the libjpeg library required by FWTools. I really want to avoid
having to compile the individual libraries provided by FWTools. Are there
any known compatibility issues between specific versions of JREs and
FWTools?
-- 
View this message in context: http://www.nabble.com/UnsatisfiedLinkError-loading-the-MapScript-Java-library-tf3975878.html#a11285812
Sent from the Mapserver - User mailing list archive at Nabble.com.



More information about the mapserver-users mailing list