Solved

UnsatisfiedLinkException with JNI and Tomcat

Posted on 2004-04-15
3
843 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

I had a project requirement for a displaying a user workbench .This workbench would consist multiple data grids .In each grid the user will be able to see a large number of data. These data grids should allow the user to 1. Sort 2. Export the …
In this post we will learn different types of Android Layout and some basics of an Android App.
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

730 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