cancel
Showing results for 
Search instead for 
Did you mean: 

DB2 JDBC ERROR:no db2jdbc in java.library.path

daixiong_jiang3
Active Participant
0 Kudos

Hi Gurus,

I have to use the JDPC SENDER Adatper to get data from a DB2 database, then i asked the DB2 administrator to provide me the

driver file db2java.zip

after that i have imported the driver file into the file com.sap.aii.adapter.lib.sda, and then upload it to the right server directory,

the contents in the provide.xml of the file:

<jars>
    <jar-name>lib/com.sap.aii.adapter.lib_api.jar</jar-name>
    <jar-name>lib/ojdbc14.jar</jar-name>
    <jar-name>lib/db2java.zip</jar-name>
  </jars>

then i deploy these drivers using JSPM and finished it successfully.

The Oracle JDBC adapter works fine but the DB2 JDBC adatper always has some errors:

Error during database connection to the database URL 
'jdbc:db2://<ip>:<port>/<service_name>' using the JDBC 
driver 'COM.ibm.db2.jdbc.app.DB2Driver': 'com.sap.aii.adapter.jdbc.sql.DriverManagerException: 
Cannot establish connection to URL 'jdbc:db2://<ip>:<port>/<service_name>': 
SQLException: java.lang.UnsatisfiedLinkError: no db2jdbc in java.library.path'

what does the error "no db2jdbc in java.library.path" mean? how can i correct this issue?

thanks in advance,

Dario

Moderator message - Please do not offer points or rewards

Edited by: Rob Burbank on Jul 29, 2010 12:27 PM

Accepted Solutions (0)

Answers (2)

Answers (2)

daixiong_jiang3
Active Participant
0 Kudos

issue resolved.

I should not use COM.ibm.db2.jdbc.app.DB2Driver, instead i should use COM.ibm.db2.jdbc.net.DB2Driver

0 Kudos

Hello Daixiong,

Ensure that the JDBC driver has been installed as per following

note to deploy JDBC driver:

#1138877 - PI 7.1 : How to Deploy External Drivers JDBC/JMS Adapters

Also ensure the classpath has been set as per the note:

#1079888 - DB6: Required JDBC driver version for a DB2 release

The last part, COM.ibm.db2.jcc.DB2Driver, is mentioned on the note and

so it can correct this behaviour.

I believe it's an issue that leads to driver's behaviour.

Regards,

Caio Cagnani