wood burning stoves 2.0*
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 OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP 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