We are trying to connect the Java application to DB2/AS400 database using JDBC code. The code is successful to establish database connection and read its version information (which is 6.1).
But while listing the catalogs on database, it gave SQLException with below error code-
SQLCODE = -805, SQLSTATE: 51002 '
which means- The package corresponding to an SQL statement execution request was not found.
(ref:
http://publib.boulder.ibm.com/infoce...%2Frzalaco.htm)
The output of JDBC code is as below:
>java -cp "C:\db2 jdbc\ db2jcc.jar; C:\db2 jdbc\db2jcc_license_cisuz.jar;." DB2Connect
Connection Successful!
Driver Information
Driver Name: IBM DB2 JDBC Universal Driver Architecture
Driver Version: 2.8.46
Database Information
Database Name: AS
Database Version: V06R01M00
Avalilable Catalogs
com.ibm.db2.jcc.a.SqlException: DB2 SQL error: SQLCODE: -805, SQLSTATE: 51002 , SQLERRMC: NULLID.SYSSTAT;00;C101ED8D
at com.ibm.db2.jcc.a.rf.d(rf.java:1396)
at com.ibm.db2.jcc.b.jb.l(jb.java:356)
at com.ibm.db2.jcc.b.jb.e(jb.java:92)
at com.ibm.db2.jcc.b.w.e(w.java:72)
at com.ibm.db2.jcc.b.cc.i(cc.java:202)
at com.ibm.db2.jcc.a.rf.q(rf.java:1363)
at com.ibm.db2.jcc.a.sf.d(sf.java:2350)
at com.ibm.db2.jcc.a.tf.X(tf.java:188)
at com.ibm.db2.jcc.a.t.a(t.java:7199)
at com.ibm.db2.jcc.a.t.Xd(t.java:5884)
at com.ibm.db2.jcc.a.t.getCatalogs(t.java:5809)
at DB2Connect.displayDbProperties(DB2Connect.java:51)
at DB2Connect.main(DB2Connect.java:77)
This might be due to incompatible driver version since we are using jdbc drivers for DB2 ver 8 and source database version is 6.1. Can anyone please confirm this?
If yes, then from where we can download the JDBC drivers for DB2 ver 6.1 on AS/400?
We are unable to search it from IBM site or over internet. Please suggest.
Thanks for your time.
Kind regards,
Rahul