hmm, well I have tried putting the libJMagick.so into all the places I can
think of - even in the sdk's .so path - but with no luck so far. (and I have
just re-validated the basic code in a standalone app too.

The app is very light and is only used on an irregular basis, so the scope
for it all going down the tubes is reasonably restricted.  The error remains
the same.

thanks for the ideas 'tho.

Nick

--> -----Original Message-----
--> From: Christopher Schultz [mailto:[EMAIL PROTECTED]
--> Sent: Thursday, March 18, 2004 2:18 PM
--> To: Tomcat Users List
--> Subject: Re: Native libraries configuration under tomcat.
--> 
--> 
--> Nick,
--> 
--> > JMagick comes as a semi-stub library .jar archive and a 
--> native library
--> > libJMagick.so - under the command line my code works 
--> (following "ldconfig"),
--> > but I get errors in the catalina.out complaining about 
--> being unable to find
--> > the library (details at the end of this message). the key 
--> clause being:
--> > 
--> > "Caused by: java.lang.RuntimeException: Can't load 
--> MagickLoader (class not
--> > found)
--> >         at magick.Magick.<clinit>(Magick.java:25)"
--> > 
--> > Essentially, having trawled through the various 
--> documentation, I haven't
--> > worked out how to direct Tomcat to find/use the .so 
--> library, so any pointers
--> > to how to do this would be great.
--> 
--> I'm not sure where it is, but I'm sure that Tomcat has a directory 
--> that's specified as a search path for shared libs. Your 
--> JMagick class's 
--> <clinit> (public static { }) method is bombing probably 
--> because a call 
--> to System.loadLibrary() can't find the shared lib.
--> 
--> Can anyone say if Tomcat itself provides 'another' directory where 
--> shared objects can go?
--> 
--> You can put it in the SDK somewhere, but that's ugly.
--> 
--> Finally, let me issue a word of warning: using native code 
--> from a webapp 
--> is pretty dangerous: if the native code, say, segfaults, 
--> then Tomcat 
--> will go down along with all your webapps. Also, you have to 
--> be careful: 
--> the JVM gets very upset if you call System.loadLibrary() 
--> more than once 
--> for a given library. So, you should take care to have your JMagick 
--> library sitting in a common area, rather than your webapp's 
--> WEB-INF/lib 
--> directory. (Unless you promose never to re-start your 
--> webapp without 
--> re-starting Tomcat ;)
--> 
--> -chris
--> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to