Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Getting DB2 error

 
manoja swaro
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4968
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4968
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Howdy Greenhorn.

Where is this jar file: db2jdbc?
 
manoja swaro
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic