jdbcdb2squirrel-sql

Connect to IBM DB2 with SQuirreL "Reply.fill(). Message: Insufficient data. ERRORCODE=-4499, SQLSTATE=08001"


I have now tried 2 days to connect to external DB2 database with SQuirreL. I always get error:

[jcc][t4][2030][11211][3.58.82] A communication error occurred during operations
on the connection's underlying socket, socket input stream, or socket output
stream. Error location: Reply.fill().  Message: Insufficient data.
ERRORCODE=-4499, SQLSTATE=08001

I am using IBM DB2 Universal JDBC driver v9.7 FP5. I have as well tried v9.5.

One thing is that the DB2 is tunneled with Putty. Server runs linux with IBM DB2 v7.1. I am using Win7x64.

I have ran over many forum topics on the web which cover this error, but none of them has actually worked for me. (ie. iReport to DB2 connection ERRORCODE=-4499, SQLSTATE=08001)

First I thought that maybe this related to port that isn't corretcly tunneled. But I removed the port from Putty session conf and different error occured.

Stack trace as well for the problem:

com.ibm.db2.jcc.am.io: [jcc][t4][2030][11211][3.58.82] A communication error
occurred during operations on the connection's underlying socket, socket input
stream, or socket output stream.  Error location: Reply.fill().  Message:
Insufficient data. ERRORCODE=-4499, SQLSTATE=08001
    at com.ibm.db2.jcc.am.ed.a(ed.java:319)
    at com.ibm.db2.jcc.t4.a.a(a.java:416)
    at com.ibm.db2.jcc.t4.a.a(a.java:411)
    at com.ibm.db2.jcc.t4.cb.b(cb.java:227)
    at com.ibm.db2.jcc.t4.cb.c(cb.java:249)
    at com.ibm.db2.jcc.t4.cb.c(cb.java:360)
    at com.ibm.db2.jcc.t4.cb.v(cb.java:1145)
    at com.ibm.db2.jcc.t4.db.a(db.java:42)
    at com.ibm.db2.jcc.t4.b.m(b.java:1238)
    at com.ibm.db2.jcc.t4.b.b(b.java:1112)
    at com.ibm.db2.jcc.t4.b.c(b.java:700)
    at com.ibm.db2.jcc.t4.b.b(b.java:686)
    at com.ibm.db2.jcc.t4.b.a(b.java:367)
    at com.ibm.db2.jcc.t4.b.<init>(b.java:307)
    at com.ibm.db2.jcc.DB2SimpleDataSource.getConnection(DB2SimpleDataSource.java:214)
    at com.ibm.db2.jcc.DB2Driver.connect(DB2Driver.java:456)

My best guess was and is still that JDBC universal driver is not backward compatible with DB2 v7.1.

It works on an other development machine (coworker) with 32bit XP on it. I have tried to put it working on different 32bit XP but the same result occurs.

Can anyone at least describe the root of this anomaly?

Edit

http://www.ibm.com/developerworks/forums/thread.jspa?messageID=14779629 This cannot be a firewall or tunneling error. Successfully opened a tunnel to correct port with telnet.


Solution

  • You need to locate and use the DB2 7.2 or DB2 7.1 client code (aka DB2 Client Application Enabler). Prior to DB2 8.1, IBM used a different, platform-dependent protocol called DB2RA for communication between the client and server. DB2 8.1 switched to the standard DRDA protocol. DB2 8.x clients could, in specific configurations, talk to DB2 7.x servers.

    Alternatively, if you are using a Java application, you could try to locate/use the Type 3 JDBC driver (COM.ibm.db2.jdbc.net.DB2Driver). This driver is clientless (it has a 3-tier architecture, because it requires a so-called "JDBC Applet Server" to be running on the database server. You can see if it's running on your linux box by looking for a process called db2jd. Generally this process will show up as, for example, db2jd 6789, where 6789 is the port number the applet server is listening on. If you don't see this process you can start it (as the DB2 instance owner) by executing the db2jstrt command.