Solved

UnsatisfiedLinkException with JNI and Tomcat

Posted on 2004-04-15
3
844 Views
Last Modified: 2013-11-24
I have a JSP page calling a method in a seperate class that attempts to load a JNI library.  On System.loadLibrary() I get the following exception:

java.lang.UnsatisfiedLinkError: no 3StoreJNI in java.library.path

My java.library.path is set to '/usr/local/lib:/usr/lib/java:/usr/lib' and in /usr/local/lib is 'lib3StoreJNI.so'.  Calling System.mapLibraryName() gives 'lib3StoreJNI.so'.  The same bit of code works fine outside of Tomcat, so I'm a bit confused as to what is going wrong.  I'm running Tomcat 5.0.18 on a Gentoo linux box, kernel 2.6.1.

Is there anything else I can do to track the problem down?

Thanks,
Simon Cox
0
Comment
Question by:simoncox
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 3

Accepted Solution

by:
int_20h earned 250 total points
ID: 10835087
Try adding /usr/local/lib  to the PATH environment when starting tomcat.  Also, check if tomcat overwrites PATH when it's starts up.  Check the startup.sh or catalina.sh and search for PATH/java.libary.path
0
 

Author Comment

by:simoncox
ID: 10835416
Well, I managed to get it working.  Adding /usr/local/lib to the PATH didn't help.  Turns out that the JVM wasn't being started with the properties that I thought it was.  I had defined java.library.path in /opt/tomcat/conf/catalina.properties, and this was being loaded at some point.  However, I've now added -Djava.library.path... to the command that starts the JVM and it now works!  I guess you can get the points as it was your post that led me to find the problem.  That, and you answered so DAMN fast!
0
 
LVL 3

Expert Comment

by:int_20h
ID: 10835600
THX simoncox!
0

Featured Post

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question