Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

JNI- invoking problem: UnsatisifedLinkError

Posted on 2004-04-17
3
Medium Priority
?
266 Views
Last Modified: 2012-08-13

Hi,
I am using the JNI to load a shared library in C++ which has got reference to other C++ libraries. I am getting the following error while doing so.

/data2/usr/pvcs/cms_ac/cms/deliver/lib/libcreditdb.so: ld.so.1: /bin/../java/bin/../bin/sparc/native_threads/java: fatal: relocation error: file /data2/usr/pvcs/cms_ac/cms/deliver/lib/libcreditdb.so: symbol __1cLUtsDateTimeG__vtbl_: referenced symbol not found
java.lang.UnsatisfiedLinkError: /data2/usr/pvcs/cms_ac/cms/deliver/lib/libcreditdb.so: ld.so.1: /bin/../java/bin/../bin/sparc/native_threads/java: fatal: relocation error: file /data2/usr/pvcs/cms_ac/cms/deliver/lib/libcreditdb.so: symbol __1cLUtsDateTimeG__vtbl_: referenced symbol not found
        at java.lang.ClassLoader$NativeLibrary.load(Native Method)
        at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1382)
        at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1306)
        at java.lang.Runtime.loadLibrary0(Runtime.java:749)
        at java.lang.System.loadLibrary(System.java:820)
        at CreditEngineService.<clinit>(CreditEngineService.java:69)
        at CreditEngineInterface.main(CreditEngineInterface.java:40)
0
Comment
Question by:kanuaravind
3 Comments
 
LVL 2

Accepted Solution

by:
timbauer earned 600 total points
ID: 10853009
The poblem appears to be that loadLibrary cannot find the entry point it is looking for.
The native library was probably compiled incorrectly.
Make sure the function you are going to call is wrapped in an extern "C" block.


0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
Suggested Courses

926 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question