Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

LD_LIBRARY_PATH ???

843854Dec 21 2002 — edited Dec 23 2002
Hi

My system is Linux suse,
I want to connect db2 but I have a problem. The error is unsatisfied link error.
I am sure that solution is this problem modifying Ld_LIBRARY_PATH.

But I dont know where is the location of LD_LIBRARY_PATH???

Which file must I write LD_LIBRARY_PATH=...

I dont know which file cleaerly in suse linux.

Can it be etc/profile or can it be ../jre/lib/java ??

PLEASE help

thank you.

Comments

843854
I'm no expert on the setup of the DB2 driver, but I check a DB2 configuration and they were using the following:

LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$DB2HOME/sqllib/lib
843854
yhanks your advice.

But I dont understand that ::"WEHERE I ADD this words: LD_LIBRARY_PATH=/home/db2as/sqllib". Which file I MODIFIED this line??
And at the same time I am using suse linux and websphere AppServer.I connect to db2 database but the error is::

Original Exception:
Error Message: java.lang.UnsatisfiedLinkError: no db2jdbc (libdb2jdbc.so) in java.library.path
Error Code: 500
Target Servlet: null
Error Stack:
java.sql.SQLException: java.lang.UnsatisfiedLinkError: no db2jdbc (libdb2jdbc.so) in java.library.path
at COM.ibm.db2.jdbc.app.DB2Driver.<init>(DB2Driver.java:245)
at java.lang.Class.newInstance0(Native Method)
at java.lang.Class.newInstance(Class.java(Compiled Code))


What is the problem???
Please Help thank you.

843854
But I dont understand that ::"WEHERE I ADD this words:
LD_LIBRARY_PATH=/home/db2as/sqllib". Which file I
MODIFIED this line??
LD_LIBRARY_PATH is an environment variable just like PATH and CLASSPATH. You will need to set it and export for most applications. I haven't used linux lately, but under HP-UX, you would set it like this for Oracle:

export LD_LIBRARY_PATH=$ORACLE_HOME/lib

and if you provided the correct directory, like this on your system:

export LD_LIBRARY_PATH=/home/db2as/sqllib

And at the same time I am using suse linux and
websphere AppServer.I connect to db2 database but the
error is::
I know nothing about websphere AppServer, but it is possible that there is an initialization file for the AppServer that would allow you to setup the environment, which would include appending to PATH, CLASSPATH, and of course LD_LIBRARY_PATH. But this is just a guess. Only thing I know for sure is you need to set this within the O/S environment to make it work.
The solution depends on the shell that is being run.
1 - 4
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Jan 20 2003
Added on Dec 21 2002
4 comments
223 views