Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / May 2007

Tip: Looking for answers? Try searching our database.

shared object file - UnsatisfiedLinkError

Thread view: 
K.Fawcett - 31 May 2007 16:20 GMT
I am getting a "java.lang.UnsatisfiedLinkError" while executing my
java program that points to a shared object file named "/home/mypath/
libServer_jni5323.so" and specifies a mangled name of an "undefined
symbol".

First, this file exists, but I did not create it. It
mysteriously (to me, anyway) appears only after executing my java
program. My java code uses a jar file provided to me by a customer
that contains libServer_jni.so.  I am interested in the mechanics of
how this file appears and where the numbers (in this case "5323") come
from.  Sometimes I see this file with different numbers -
libServer_jni####.so.

Second, if I use c++filt with the mangled symbol
name on libServer_jni5323.so it produces a result which I assume means
the symbol is defined in the .so file.  If this is true, why the
"undefined symbol" error?
Gordon Beaton - 31 May 2007 17:03 GMT
> I am getting a "java.lang.UnsatisfiedLinkError"

Use nm to see what symbols the file really contains. They shouldn't be
mangled, and if they are, the file probably can't be used with JNI as
is. Java has its own specific opinions about symbol naming.

Also, the shared library must exist in a "real" file system, it isn't
sufficient that it exists in a jarfile that belongs to the
application. My guess is that the java code copies the .so out from
the jarfile in order to load it, and that the number is used to make
the filename unique (it could be the process id).

Why don't you simply ask the customer who provided the file these
things? Or at least post the exact, complete error message you got
(hint: cut and paste, don't paraphrase).

/gordon

--


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.