Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

JNI library load problem in stcewgenericjava

Status
Not open for further replies.

dhoehn

Programmer
Aug 2, 2005
2
DE
Hello,

I'm trying to load a shared library from within my Exchanger-class to access native methods. Before loading the lib via System.load (not System.loadLibrary!) the class performs a check whether the file exists. The code in startUp() looks like this:

File lib = new File(config.miscellaneous.dbLibraryPath);
if (lib.exists()) {
System.load(lib.getAbsolutePath());
}

It works well testing it outside eGate.

Running it with stcewgenericjava, System.load throws an UnsatisfiedLinkError with "No such file or directory". The Participating Host runs under HPUX, so chmodding the library file from 755 to 444 gives UnsatisfiedLinkError with "Permission denied" (e.g. it can find the file!).
Tested it with all versions of libjvm.sl.

Any suggestions? Thanks in advance

Daniel
 
Hello,

the problem was an unsatisfied dependency of the dynamically loaded dll on several other libs like gcc_s and stdc++.
"No such file or directory" referred to these libs the machine tried to load.

Daniel
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top