- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- System.loadLibrary() Unsatisfied Link Error loadin...
Categories
Company
Local Language
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
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
Community
Resources
Forums
Blogs
- 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
тАО05-28-2010 11:27 AM
тАО05-28-2010 11:27 AM
System.loadLibrary() Unsatisfied Link Error loading 64bit JNI Shared lib
I've broken this out into a simple testcase, and still cannot get this to load my library correctly.
public static void main(String argv[])throws Exception{
java.util.Properties props = System.getProperties();
System.out.println("Lib path = "+props.getProperty("java.library.path"));
try{
System.out.println("Call System.loadLibrary(" + argv[0] + ")");
System.loadLibrary(argv[0]);
}
catch (UnsatisfiedLinkError e){
System.out.println("EXCEPTION!");
System.out.println(" " + e.getCause());
System.out.println(" " + e.getMessage());
return;
}
Results:
/opt/java6/bin/java -d64 TcLoadLib samplelib64
Lib path = /opt/java6/jre/lib/IA64W:/opt/java6/jre/lib/IA64W/server:/opt/java6/jre/../lib/IA64W:/tmp/libpath:/tmp/libpath/:/usr/lib
Call System.loadLibrary(samplelib64)
EXCEPTION!
null
no samplelib in java.library.path
I've verified that the libsamplelib64.sl is in java.library.path (See output from cmd above) and is executable, and that it is a ELF-64 shared obj. (Also confirmed that the name is correct)
>file libsamplelib64.sl
libsamplelib64.sl: ELF-64 shared object file - IA64
As you can see I am testing with java6 in 64bit mode, and the java.library.path that is output during runtime is correct.
HP VERSION INFO : HP-UX B.11.31 U ia64 1169810284 unlimited-user license
I also was able to load this sharedlib outside of Java sucessfully (ldload), so I believe the library is built correctly.
Completely stumped, and I've begun looking for bugs/defects in HP or the JVM, but so far have not been able to isolate anything related here.
Any ideas?
- Tags:
- JNI
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-28-2010 11:56 AM
тАО05-28-2010 11:56 AM
Re: System.loadLibrary() Unsatisfied Link Error loading 64bit JNI Shared lib
What is the SHLIB_PATH set to when executing this program?
I would consider the possibility of updating Java from http://www.hp.com/go/java just for the sake of being current.
SEP
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
тАО05-28-2010 02:21 PM
тАО05-28-2010 02:21 PM
Re: System.loadLibrary() Unsatisfied Link Error loading 64bit JNI Shared lib
On Integrity, shlib suffixes for java must be .so.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-01-2010 06:11 AM
тАО06-01-2010 06:11 AM
Re: System.loadLibrary() Unsatisfied Link Error loading 64bit JNI Shared lib
http://docs.hp.com/en/B2355-90968/linkerdifferencesiapa.htm
"For compatibility, the IPF linker also supports the .sl suffix. "
Retested with .so this morning and that appears to work.
Any ideas why the compatability mode may/may not work for *.sl naming convention??
Thanks again!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-01-2010 10:26 AM
тАО06-01-2010 10:26 AM
Re: System.loadLibrary() Unsatisfied Link Error loading 64bit JNI Shared lib
Because you are looking at the linker documentation vs the java documentation. It too surprised me when my example program didn't work and I had to change my script. Perhaps it needs this to make sure that you can still run PA java on Integrity and keep the JNIs separate?
>Retested with .so this morning and that appears to work.
If you are happy with the answers you were given, please read the following on how to assign points:
http://forums.itrc.hp.com/service/forums/helptips.do?#33