*
The moose likes Websphere and the fly likes Getting DB2 error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » Websphere
Bookmark "Getting DB2 error" Watch "Getting DB2 error" New topic
Author

Getting DB2 error

manoja swaro
Greenhorn

Joined: Jan 20, 2010
Posts: 3
Hi,
i am getting the below error when i hit the database. I am using DB2 8.1.5 and DB2 connect Version 9.5 in unix box and WAS 6.0.2.35.

No idea why this error is coming. Previously it was working fine with DB2 connect v 8.0.1.

java.lang.UnsatisfiedLinkError: Can't find library db2jdbc (libdb2jdbc.so or .so) in sun.boot.library.path or java.library.path
sun.boot.library.path=/usr/local/opt/was/was60/java/jre/bin
java.library.path=/usr/local/opt/was/was60/java/jre/bin:/usr/local/opt/was/was60/java/jre/bin/classic:/usr/local/opt/was/was60/bin:/usr/mqm/java/lib:/usr/opt/wemps/lib:/usr/local/opt/db2/db2inst1/sqllib/lib64:/usr/local/opt/was/was60/java/jre/bin/sovvm:/usr/local/opt/was/was60/java/jre/bin/sovvm:/usr/local/opt/was/was60/java/jre/bin/sovvm:/usr/lib

Any idea to fix for this problem

Thanks,
Manoja Swaro
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper

Joined: Aug 26, 2006
Posts: 4968
    
    1

It looks pretty self-explanatory. Seems like you're now missing a jar file, or, perhaps you have deleted a jar file that is still listed on your runtime classpath?
manoja swaro
Greenhorn

Joined: Jan 20, 2010
Posts: 3
I am using the DB2 Universal JDBC Driver Provider (XA) driver datasources in WAS. and the library have been set as

${DB2UNIVERSAL_JDBC_DRIVER_PATH}/db2jcc.jar
${DB2UNIVERSAL_JDBC_DRIVER_PATH}/db2jcc_license_cu.jar
${DB2UNIVERSAL_JDBC_DRIVER_PATH}/db2jcc_license_cisuz.jar

DB2UNIVERSAL_JDBC_DRIVER_PATH set as /usr/local/opt/db2/db2inst1/sqllib/java

Please let me know which library i am missing for the XA drivers.

Thanks,
Manoja Swaro
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper

Joined: Aug 26, 2006
Posts: 4968
    
    1

Howdy Greenhorn.

Where is this jar file: db2jdbc?
manoja swaro
Greenhorn

Joined: Jan 20, 2010
Posts: 3
I didn't get the file db2jdbc in the db2 installed directory. All the driver jar files are located in /usr/local/opt/db2/db2inst1/sqllib/java . But i didn't find the db2jdbc driver jar file under the /usr/local/opt/db2/db2inst1/sqllib/java. Do you have any idea where i will get this library jar file in unix.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Getting DB2 error
 
Similar Threads
JNI behaviour change on AIX (java5 -> java6)?
Can't find library ocijdbc9 (libocijdbc9.so)
java.sql.SQLException: No suitable driver
Installing Java on Linux (FC6)
UnsatisfiedLinkError