Web services, Tomcat 5, JNI and HP-UX - UnsatisfiedLinkError
I am running Web Services on Tomcat 5.0 on HP-UX. I am interfacing a very simple web service to a C program with JNI (JVM 1.4.2). The web service works just fine. I followed all the instructions on the HP web site on how to create a JNI C program, compile it into a shared library and set the SHLIB_PATH so java can reference the library. When I try to run the C program from the web service, I get this error in the logfile:
java.lang.UnsatisfiedLinkError: no LearnerInquiry in java.library.path
This is the Java wrapper which calls the C program, the error points to the loadLibrary method:
package HughSFSBridge;
publicclass CISAMDataAccess{
static{
System.loadLibrary("LearnerInquiry");
}
publicnative String LearnerInquiry(String aSIN);
}
* SHLIB_PATH is set to SHLIB_PATH=/home/tomcat/tomcat-jwsdp-1.4/lib
* The name of the library is called LearnerInquiry.sl
Here is what I have tried:
- set & export SHLIB_PATH in the shell and run tomcat from the shell
- set & export LD_LIBRARY_PATH is the shell and run tomcat
- modify catalina.sh to have -Djava.library.path="$SHLIB"
- put the library file in the tomcat /bin directory
- I do **not** have access to the java lib directory, nor should I. This library should only be available to tomcat.
Here are some things I suspect:
- TOMCAT does not pay attention to the SHLIB_PATH
- setting SHLIB_PATH on the command line does not allow tomcat to get access to it
- the package name in the Java wrapper (above) causes name issues
Any suggestions?

