Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

UnsatisifiedLinkError Java

Options
  • 14-05-2002 2:32pm
    #1
    Closed Accounts Posts: 536 ✭✭✭


    Hi I'm getting the following error when I'm trying to load a library into my Java Application

    <edit> I'm running it on solaris too and using jbuilder6 </edit>

    It's complaining a bout the symbol __gxx_personality_v0.
    The library compiles perfectly with no error
    java.lang.UnsatisfiedLinkError: /export/home/java_dev/solaris/libiolayer.so: ld.so.1:

    /opt/JBuilder6/jdk1.3.1/bin/../bin/sparc/native_threads/java: fatal: relocation error: file /export/home/java_dev/solaris/libiolayer.so: symbol __gxx_personality_v0: referenced symbol not found
    at java.lang.ClassLoader$NativeLibrary.load(Native Method)



    grrrrrrrrrrrrr :confused:


Comments

  • Registered Users Posts: 21,264 ✭✭✭✭Hobbes


    http://java.sun.com/products/jdk/1.1/docs/api/java.lang.UnsatisfiedLinkError.html

    Looks like your trying to make a Native call to something that doesn't exist or you don't have rights to?

    Quick check of google...
    2.10 Why do I get the java.lang.UnsatisfiedLinkError when I run my Java program containing Native Method invocations?
    A. Your program is not able to find your shared library or DLL.

    On Windows 95/NT, make sure that the DLL exists in a path that is
    included within the PATH environment variable.

    On Solaris, make sure that the environment variable
    LD_LIBRARY_PATH includes the path of your shared library.


  • Closed Accounts Posts: 536 ✭✭✭flyz


    Originally posted by Hobbes
    http://java.sun.com/products/jdk/1.1/docs/api/java.lang.UnsatisfiedLinkError.html

    Looks like your trying to make a Native call to something that doesn't exist or you don't have rights to?

    Quick check of google...


    I have rights to it and it does exist. :(

    my problem is that i seem to get a linker error from my library
    /opt/JBuilder6/jdk1.3.1/bin/../bin/sparc/native_threads/java: fatal: relocation error: file /export/home/java_dev/solaris/libiolayer.so: symbol __gxx_personality_v0: referenced symbol not found


  • Registered Users Posts: 1,994 ✭✭✭lynchie


    Is export/home/java_dev/solaris/libiolayer.so on the library path?? type echo $LD_LIBRARY_PATH and ensure that that directory is on the path otherwise the linker and library loader will not be able to find it. You may have to change the properties of the project within jbuilder to add it if you are running it from within jbuilder.


  • Closed Accounts Posts: 536 ✭✭✭flyz


    Originally posted by lynchie
    Is export/home/java_dev/solaris/libiolayer.so on the library path??

    Yeah it is.

    I think I've fixed it though, I'd forgotten to put -shared in the compile line :o


Advertisement