The code is as follows:
Class.forName ("Com.ibm.db2.jcc.DB2Driver");
Connection conn = drivermanager.getconnection ("Jdbc:db2://localhost:50000/sample", "Db2admin", "12345678");
This error is reported in the second sentence:
Com.ibm.db2.jcc.am.yn: [jcc][t4][2030][11211][3.57.82] on the underlying socket of the connection, socket input stream, or socket output stream A communication error occurred during the execution of the operation. Error location: Reply.fill (). Message: Insufficient data. errorcode=-4499, sqlstate=08001
At COM.IBM.DB2.JCC.AM.BD.A (bd.java:319)
At COM.IBM.DB2.JCC.T4.A.A (a.java:365)
At COM.IBM.DB2.JCC.T4.A.A (a.java:360)
At com.ibm.db2.jcc.t4.ab.b (ab.java:222)
At COM.IBM.DB2.JCC.T4.AB.C (ab.java:243)
At COM.IBM.DB2.JCC.T4.AB.C (ab.java:354)
At COM.IBM.DB2.JCC.T4.AB.V (ab.java:1139)
At COM.IBM.DB2.JCC.T4.BB.A (bb.java:42)
At COM.IBM.DB2.JCC.T4.B.M (b.java:1240)
At com.ibm.db2.jcc.t4.b.b (b.java:1114)
At COM.IBM.DB2.JCC.T4.B.C (b.java:701)
At com.ibm.db2.jcc.t4.b.b (b.java:687)
At COM.IBM.DB2.JCC.T4.B.A (b.java:374)
At Com.ibm.db2.jcc.t4.b.<init> (b.java:310)
At Com.ibm.db2.jcc.DB2SimpleDataSource.getConnection (db2simpledatasource.java:214)
At Com.ibm.db2.jcc.DB2Driver.connect (db2driver.java:224)
At Java.sql.DriverManager.getConnection (Unknown Source)
At Java.sql.DriverManager.getConnection (Unknown Source)
At LC. Jdbctest.main (jdbctest.java:24)
Service in the DB2 all things I have started, I am in command line or control center with this password and user name can connect, also can normal use, is even JSBC error, I installed is Db29.7,jar package is from the installation path of the copy out of ...
Card In this step nothing can continue, tortured dead, please expert guidance ...
I would like to change this, jdbc:db2://native Ip:50000/sample, or jdbc:db2:sample. But either localhost or 127.0.0.1. I don't know why ...
Tokyu JDBC problem, communication error occurred. Error location: Reply.fill (). Message: Insufficient data. errorcode=-4499, sqlstate=08001