UnsatisfiedLinkError loading the MapScript Java library

Steve-e-b sbattey at DOTTEDEYES.COM
Wed Jun 27 10:24:17 EDT 2007


Working on the assumption there is a conflict between FWTools and the JRE I
tried using other versions of Java.
In all I tested MapServer (compiled against FWTools 1.3.2) with Java
v1.5.0_01, v1.5.0_07, v1.5.0_09, v1.5.0_10, v1.5.0_12. Each time I got the
same error when the MapScript Java library is loaded:
        undefined symbol: jpeg_resync_to_restart
Although JDKs v1.5.0_10 and v1.5.0_12 masked this problem with a different
error message:
        Can't load IA 32-bit .so on a IA 32-bit platform
(see  http://forum.java.sun.com/thread.jspa?threadID=792436
http://forum.java.sun.com/thread.jspa?threadID=792436 )

As I'm using Tomcat 5 I can't go back to JDK 1.4. While Java 6 crashes Linux
when I use the javac command.
So stuck with Java5 I tried changing the version of FWTools instead.

I downloaded and installed FWTools 1.1.1.
When MapServer is compiled against this version of FWTools the runtime error
does not occur. The libmapscript.so library loads and I get maps, at last!



Steve-e-b wrote:
> 
> 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#a11325485
Sent from the Mapserver - User mailing list archive at Nabble.com.



More information about the mapserver-users mailing list