- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Web services, Tomcat 5, JNI and HP-UX - Unsatisfie...
Operating System - HP-UX
1753846
Members
7622
Online
108807
Solutions
Forums
Categories
Company
Local Language
юдл
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
юдл
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-15-2004 02:36 AM
тАО09-15-2004 02:36 AM
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 (http://www.hp.com/products1/unix/java/infolibrary/prog_guide/JNI_java2.html
) , compiled it into a shared library and export 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;
public class CISAMDataAccess {
static {
System.loadLibrary("LearnerInquiry");
}
public native 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:
- the library is executable
- 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?
) , compiled it into a shared library and export 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;
public class CISAMDataAccess {
static {
System.loadLibrary("LearnerInquiry");
}
public native 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:
- the library is executable
- 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?
- Tags:
- JNI
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-15-2004 02:40 AM
тАО09-15-2004 02:40 AM
Re: Web services, Tomcat 5, JNI and HP-UX - UnsatisfiedLinkError
Suggestions:
Set SHLIB_PATH in the startup script for your application and Tomcat.
Meke sure the actual object is on the SHLIB_PATH.
SEP
Set SHLIB_PATH in the startup script for your application and Tomcat.
Meke sure the actual object is on the SHLIB_PATH.
SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-15-2004 02:47 AM
тАО09-15-2004 02:47 AM
Re: Web services, Tomcat 5, JNI and HP-UX - UnsatisfiedLinkError
Hello,
Sometimes assigning the path to the SHLIB_PATH or LD_LIBRARY_PATH or anyother Variables and exporting them may not function properly. In that situations try to create links to the shared file and copy the link file in the PATH that is accessible to JVM.
Regards,
Senthi Murugan
Sometimes assigning the path to the SHLIB_PATH or LD_LIBRARY_PATH or anyother Variables and exporting them may not function properly. In that situations try to create links to the shared file and copy the link file in the PATH that is accessible to JVM.
Regards,
Senthi Murugan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-15-2004 08:43 AM
тАО09-15-2004 08:43 AM
Re: Web services, Tomcat 5, JNI and HP-UX - UnsatisfiedLinkError
Thanks for the quick response. There were two problems:
1. set SHLIB_PATH to the directory which contains the shared library
2. prefix the name of the shared library with "lib"
So if the library was called Queer in the /home/fubar directory:
Path: SHLIB_PATH=/home/fubar
Lib name: libQueer.sl
Java call: System.loadLibrary("Queer")
d1
1. set SHLIB_PATH to the directory which contains the shared library
2. prefix the name of the shared library with "lib"
So if the library was called Queer in the /home/fubar directory:
Path: SHLIB_PATH=/home/fubar
Lib name: libQueer.sl
Java call: System.loadLibrary("Queer")
d1
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP