HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Loading native library fails within a Java pro...
Operating System - HP-UX
1831137
Members
2694
Online
110020
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
Forums
Discussions
Discussions
Discussions
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
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
05-23-2002 07:53 PM
05-23-2002 07:53 PM
Loading native library fails within a Java program
I have written a simple Java file that simply loads a native library file using System.loadLibrary(). The native library file name is libACE.sl. MY java file is as follows:
import java.lang.Throwable;
class LoadNative {
public static void main(String args[])
{
String libname = "ACE";
try
{
System.loadLibrary(libname);
System.out.println("Library " +
libname + " successfully loaded");
}
catch (UnsatisfiedLinkError Err)
{
//System.out.println("error: " + Err);
Err.printStackTrace();
//return;
}
System.out.println("All done");
}
}
I have set my SHLIB_PATH to include the directory that contains libACE.sl. The Java program compiles sucessfully, however when run (using java LoadNative) it throws the following exception:
aCC runtime: Error 215 from shl_findsym(./libACE.sl,_shlInit)
/usr/lib/dld.sl: Unresolved symbol: openprot__7filebuf (data) from ./libACE.sl
/usr/lib/dld.sl: Unresolved symbol: cerr (data) from ./libACE.sl
/usr/lib/dld.sl: Unresolved symbol: typeid__XT9streambuf_ (data) from ./libACE.sl
/usr/lib/dld.sl: Unresolved symbol: xsputn__9streambufFPCci (code) from ./libACE.sl
/usr/lib/dld.sl: Unresolved symbol: __dt__9streambufFv (code) from ./libACE.sl
/usr/lib/dld.sl: Unresolved symbol: __ls__7ostreamFPCc (code) from ./libACE.sl
/usr/lib/dld.sl: Unresolved symbol: flush__7ostreamFv (code) from ./libACE.sl
/usr/lib/dld.sl: Unresolved symbol: doallocate__9streambufFv (code) from ./libACE.sl
/usr/lib/dld.sl: Unresolved symbol: open__8ofstreamFPCciT2 (code) from ./libACE.sl
/usr/lib/dld.sl: Unresolved symbol: tellp__7ostreamFv (code) from ./libACE.sl
/usr/lib/dld.sl: Unresolved symbol: close__11fstreambaseFv (code) from ./libACE.sl
/usr/lib/dld.sl: Unresolved symbol: __ct__9streambufFv_2 (code) from ./libACE.sl
/usr/lib/dld.sl: Unresolved symbol: __ct__8ofstreamFPCciT2 (code) from ./libACE.sl
/usr/lib/dld.sl: Unresolved symbol: seekoff__9streambufFlQ2_3ios8seek_diri (code) from ./libACE.sl
/usr/lib/dld.sl: Unresolved symbol: __dt__13Iostream_initFv (code) from ./libACE.sl
/usr/lib/dld.sl: Unresolved symbol: __ct__13Iostream_initFv_1 (code) from ./libACE.sl
/usr/lib/dld.sl: Unresolved symbol: seekpos__9streambufFli (code) from ./libACE.sl
/usr/lib/dld.sl: Unresolved symbol: setbuf__9streambufFPci (code) from ./libACE.sl
/usr/lib/dld.sl: Unresolved symbol: pbackfail__9streambufFi (code) from ./libACE.sl
/usr/lib/dld.sl: Unresolved symbol: xsgetn__9streambufFPci (code) from ./libACE.sl
Abort(coredump)
Can anyone make any sence of this error and let me know how I can avoid it? I havent got a clue!
I'm using HP-UX 11.11 with aCC compiler version 3.33
The libACE.sl library is an existing 3rd party library. I require to load this library in a project i'm doing hence the development of the test Java application! Also worth noting is I can re build the libACE.sl file if required using what ever compiler switches that maybe be needed.
import java.lang.Throwable;
class LoadNative {
public static void main(String args[])
{
String libname = "ACE";
try
{
System.loadLibrary(libname);
System.out.println("Library " +
libname + " successfully loaded");
}
catch (UnsatisfiedLinkError Err)
{
//System.out.println("error: " + Err);
Err.printStackTrace();
//return;
}
System.out.println("All done");
}
}
I have set my SHLIB_PATH to include the directory that contains libACE.sl. The Java program compiles sucessfully, however when run (using java LoadNative) it throws the following exception:
aCC runtime: Error 215 from shl_findsym(./libACE.sl,_shlInit)
/usr/lib/dld.sl: Unresolved symbol: openprot__7filebuf (data) from ./libACE.sl
/usr/lib/dld.sl: Unresolved symbol: cerr (data) from ./libACE.sl
/usr/lib/dld.sl: Unresolved symbol: typeid__XT9streambuf_ (data) from ./libACE.sl
/usr/lib/dld.sl: Unresolved symbol: xsputn__9streambufFPCci (code) from ./libACE.sl
/usr/lib/dld.sl: Unresolved symbol: __dt__9streambufFv (code) from ./libACE.sl
/usr/lib/dld.sl: Unresolved symbol: __ls__7ostreamFPCc (code) from ./libACE.sl
/usr/lib/dld.sl: Unresolved symbol: flush__7ostreamFv (code) from ./libACE.sl
/usr/lib/dld.sl: Unresolved symbol: doallocate__9streambufFv (code) from ./libACE.sl
/usr/lib/dld.sl: Unresolved symbol: open__8ofstreamFPCciT2 (code) from ./libACE.sl
/usr/lib/dld.sl: Unresolved symbol: tellp__7ostreamFv (code) from ./libACE.sl
/usr/lib/dld.sl: Unresolved symbol: close__11fstreambaseFv (code) from ./libACE.sl
/usr/lib/dld.sl: Unresolved symbol: __ct__9streambufFv_2 (code) from ./libACE.sl
/usr/lib/dld.sl: Unresolved symbol: __ct__8ofstreamFPCciT2 (code) from ./libACE.sl
/usr/lib/dld.sl: Unresolved symbol: seekoff__9streambufFlQ2_3ios8seek_diri (code) from ./libACE.sl
/usr/lib/dld.sl: Unresolved symbol: __dt__13Iostream_initFv (code) from ./libACE.sl
/usr/lib/dld.sl: Unresolved symbol: __ct__13Iostream_initFv_1 (code) from ./libACE.sl
/usr/lib/dld.sl: Unresolved symbol: seekpos__9streambufFli (code) from ./libACE.sl
/usr/lib/dld.sl: Unresolved symbol: setbuf__9streambufFPci (code) from ./libACE.sl
/usr/lib/dld.sl: Unresolved symbol: pbackfail__9streambufFi (code) from ./libACE.sl
/usr/lib/dld.sl: Unresolved symbol: xsgetn__9streambufFPci (code) from ./libACE.sl
Abort(coredump)
Can anyone make any sence of this error and let me know how I can avoid it? I havent got a clue!
I'm using HP-UX 11.11 with aCC compiler version 3.33
The libACE.sl library is an existing 3rd party library. I require to load this library in a project i'm doing hence the development of the test Java application! Also worth noting is I can re build the libACE.sl file if required using what ever compiler switches that maybe be needed.
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-24-2002 01:27 AM
05-24-2002 01:27 AM
Re: Loading native library fails within a Java program
Hi
Do you have
Patch Name: PHSS_26263
Patch Description: s700_800 11.11 ld(1) and linker tools cumulative patch
Creation Date: 02/04/12
Post Date: 02/04/18
Hardware Platforms - OS Releases:
s700: 11.11
s800: 11.11
The new dynamic linker has support for a new
environment variable LD_PRELOAD through which libraries
can be dynamically loaded and used for symbol
resolution.
Steve Steel
Do you have
Patch Name: PHSS_26263
Patch Description: s700_800 11.11 ld(1) and linker tools cumulative patch
Creation Date: 02/04/12
Post Date: 02/04/18
Hardware Platforms - OS Releases:
s700: 11.11
s800: 11.11
The new dynamic linker has support for a new
environment variable LD_PRELOAD through which libraries
can be dynamically loaded and used for symbol
resolution.
Steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2002 08:18 AM
05-28-2002 08:18 AM
Re: Loading native library fails within a Java program
Those missing symbols come from libstream.sl. It looks like the java command is linked with libCsup but not libstream. You may get your shared library working by linking it with -lstream. There is a working example of aCC jni at
http://www.hp.com/products1/unix/java/infolibrary/prog_guide/java1_3/JNI_java2.html#java_native_ac++
Follow the link line from that example.
http://www.hp.com/products1/unix/java/infolibrary/prog_guide/java1_3/JNI_java2.html#java_native_ac++
Follow the link line from that example.
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.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP