• 1 reply
  • Latest Post - ‏2012-01-17T02:48:21Z by SystemAdmin
1 Post

Pinned topic Not able to connect to db2 from java

‏2011-11-02T19:35:31Z |
I am not able to connect to DB2 database from java, no matter what driver I use.


con = datasource.getConnection();

"Exception in thread "main" jcct4203011211http://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"

I am setting setServerName ,setUser ,setPassword, setDriverType, setPortNumber, setDatabaseName, setPlanName

Is there anything I am missing here?

Jars - db2jcc_lencese_cisuz.jar,db2jcc_jar,db2jcc4.jar,db2jcc_license_cu.jar

Thank you for your help in Advance.
Updated on 2012-01-17T02:48:21Z at 2012-01-17T02:48:21Z by SystemAdmin
  • SystemAdmin
    1731 Posts

    Re: Not able to connect to db2 from java

    have you tried running one of the samples that comes with the client/server installation?
    you can find them under SQLLIB\samples\jdbc