This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JDBC and the fly likes Not able to connect to db2 from java 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 » Databases » JDBC
Bookmark "Not able to connect to db2 from java" Watch "Not able to connect to db2 from java" New topic
Author

Not able to connect to db2 from java

Giri Giris
Greenhorn

Joined: Oct 25, 2011
Posts: 1
Hi All,

I am not able to connect to DB2 database from java, no matter what driver I use. I am using (db2java.zip and db2jcc.jar) or (db2jcc_license_cu.jar and db2jcc.jar and db2jcc_license_cisuz.jar)

I either get
"No suitable driver found" for Class.forName("com.ibm.db2.jcc.DB2Driver");

OR

For Class.forName("COM.ibm.db2.jdbc.app.DB2Driver");

"Exception in thread "main" com.ibm.db2.jcc.am.yn: [jcc][t4][2030][11211][3.57.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"

Thank you for your help in Advance.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Not able to connect to db2 from java
 
Similar Threads
No suitable Driver in DB2
java.sql.SQLException: No suitable driver
Db2 v8.0 Type 4 driver with Websphere
connect to db2 problem
JDBC to connec to DB2 UDB z/OS database