I just answered this last week. see the thread "Native library cannot be loaded twice" in the archives
Charlie > -----Original Message----- > From: Collins, Jim [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, July 02, 2002 1:30 PM > To: 'Tomcat Users List' > Subject: Ahh Native Library Hell > > > Hi all, > > I have been having a lot of trouble trying to get a servlet > to call some > native methods. My first servlet I deployed via the manager > app, the first > time everything went OK. When I removed the app and deployed > it again I got > errors because the native library had already been loaded, I > know why this > happens and thought I could just catch the exception and > ignore it and then > call my native methods. This did not work however and the > code just hung in > the native method call. > > > What I have now tried to do is deploy a very simple servlet > as a war file > and simply loads the native library and then calls a couple > of init methods. > This servlet will not be redeployed so it is should be OK. > The servlet loads > the native library with no problem but now when it calls a > native method I > get: > > java.lang.UnsatisfiedLinkError: dmSetConfigFile > "snip" > > The servlet that I loaded with the manager app could call > native methods > without any problems but this servlet can't. Has anyone any > ideas at all > what I can do? I have searched through the mail archives with > no luck. I am > running Tomcat 4.1.3 on Solaris 8 using jdk 1.4. I have put > the library and > jar file in <Jakarta_home>/common/lib. I have set the > LD_LIBRARY_PATH to > point to where the library is, however I load the library with > System.load("/home/me/jakarta-tomcat-4.1.3/common/lib/libDm3.1 > .6_NativeBridg > e.so.1") not loadLibrary. > > Thanks for your help. > > Jim. > > > PLEASE READ: The information contained in this email is confidential > and intended for the named recipient(s) only. If you are not > an intended > recipient of this email you must not copy, distribute or take any > further action in reliance on it and you should delete it and > notify the > sender immediately. Email is not a secure method of communication and > Nomura International plc cannot accept responsibility for the accuracy > or completeness of this message or any attachment(s). Please > examine this > email for virus infection, for which Nomura International plc accepts > no responsibility. If verification of this email is sought then please > request a hard copy. Unless otherwise stated any views or opinions > presented are solely those of the author and do not represent those of > Nomura International plc. This email is intended for informational > purposes only and is not a solicitation or offer to buy or sell > securities or related financial instruments. Nomura > International plc is > regulated by the Financial Services Authority and is a member of the > London Stock Exchange. > > > > -- > To unsubscribe, e-mail: > <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: > <mailto:[EMAIL PROTECTED]> > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
