Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here


unsatisfied link error

unsatisfied link error

unsatisfied link error

 i am developing web application using java.
i am using ant builder for build the java project.
i am creating .ear file through ant build.xml and deploy this .ear file on jboss application server.
for running some java program i have to use shared library...so at run time i have to pass
java.library.path = path/of/shared/lib/libdb_java-4.3.so
this libdb_java-4.3.so is shared library and it resides on linux server where jboss is installed.

when end-user running this application through browser(from windows operating system), how pass the
java -Djava.library.path for getting shared library...

otherwise program terminated with
Exception in thread "main" java.lang.UnsatisfiedLinkError: no db_java-4.3 in java.library.path

while generating .ear file through ant builder..
  i am just compile the classs which includes .jar file in   classpath.

if i run the program on linux server by giving command
  java -Djava.library.path=path/of/shared lib/libdb_java-4.3.so    programName.class it works

pl. guide me...
Thanks in advanced..


RE: unsatisfied link error

Yum yum.

Maybe I'm wrong. but if it's a web application, the end user will see html/Javascript, so no need od a shared library.

If that exception is thrown at client side, I assume you're using an applet or something similar. If so, your applet needs to be sgined to access local resuorces as shared libraries and those libraries needs to be installed on the client machine.



RE: unsatisfied link error

 Thanks for replay..
 you are right ..i am using servlet...
 But it is not practically possible to put this shared library on every user computer...because for web application, user can access the application worldwide..

pl. give other solution..


RE: unsatisfied link error

Yum yum.

A servlet is executed at server side.
An applet is executed al client side.

You first need to know what are you using and understand how it works.

If yuu're using servlets, then the exception is thrown at server-side (the Jboss server). If so, it's a JBoss configuration problem.



RE: unsatisfied link error

Basically, if the Java code that requires the .so lib via JNI is running on the server in JBoss, just make sure that the LD_LIBRARY_PATH env var on the user running JBoss is set to include your .so.

If you are running an applet, that requires this JNI .so then you MUST also have the client download this. And if they are running Windows - then you will need a DLL, not a linux shared object.

Perhaps you should be a little bit more specific about the things that matter. Whether or not you are using ant as a build tool is not really relevant !

Free Database Connection Pooling Software

RE: unsatisfied link error

  dian & sedj

  Thanks for repaly..

  I am sure that i am using servlet, so this exception thrown by server side.

  i have to set somthing on jboss server.
  As per my knowledge, i have to change run.sh for jboss.
  make change such that while executing java programm it directly take -Djava.library.path settings.

here is the snipet of my run.sh
# Setup the JVM
if [ "x$JAVA" = "x" ]; then
    if [ "x$JAVA_HOME" != "x" ]; then

# Setup the classpath
if [ ! -f $runjar ]; then
    die "Missing required file: $runjar"
# Setup JBoss sepecific properties
# Execute the JVM
      -classpath "$JBOSS_CLASSPATH" \
      org.jboss.Main "$@"        


if my assumption is true then i have to put this question in jboss forum..

Thanks and your help is appriciated...


RE: unsatisfied link error

As I said before, just add your programme directory to the env var LD_LIBRARY_PATH in JBoss run.sh or in the user's ~/.profile .

Or, just copy your .so file to /usr/lib - and it will be added automatically.

Free Database Connection Pooling Software

RE: unsatisfied link error

  Thanks for replay...
  i have added LD_LIBRARY_PATH=actual/path/of/.so
  also put .so file in /usr/lib  dir
  and restart the jboss server and try to execute the web application ...but it give me the same error

java.lang.UnsatisfiedLinkError: no db_java-4.3 in java.library.path

pl. help me out...


RE: unsatisfied link error

Perhaps you are loading the lib incorrectly ...

If your .so is called "libserver.so" then you should load it thus :

static {

You should also make sure that you compile the .so with the "-shared" option if using GCC.

Free Database Connection Pooling Software

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close