当前位置: 技术问答>java相关
如何用COM.ibm.db2.jdbc.net.DB2Driver连接DB2数据库
来源: 互联网 发布时间:2015-08-15
本文导语: 如下的代码我用COM.ibm.db2.jdbc.app.DB2Driver JDBC包可以正常连上DB2 7.1 可是用COM.ibm.db2.jdbc.net.DB2Driver报错。请大虾指教 用COM.ibm.db2.jdbc.net.DB2Driver报错代码如下: 500 Servlet Exception COM.ibm.db...
如下的代码我用COM.ibm.db2.jdbc.app.DB2Driver JDBC包可以正常连上DB2 7.1
可是用COM.ibm.db2.jdbc.net.DB2Driver报错。请大虾指教
用COM.ibm.db2.jdbc.net.DB2Driver报错代码如下:
500 Servlet Exception
COM.ibm.db2.jdbc.DB2Exception: [IBM][JDBC Driver] CLI0615E 从套接字接收时出错,服务器不响应。SQLSTATE=08S01
at COM.ibm.db2.jdbc.net.SQLExceptionGenerator.throwReceiveError(SQLExceptionGenerator.java:432)
at COM.ibm.db2.jdbc.net.DB2Request.receive(DB2Request.java:664)
at COM.ibm.db2.jdbc.net.DB2Request.sendAndRecv(DB2Request.java:524)
at COM.ibm.db2.jdbc.net.DB2Connection.SQLConnect(DB2Connection.java:319)
at COM.ibm.db2.jdbc.net.DB2Connection.SQLConnect(DB2Connection.java:283)
at COM.ibm.db2.jdbc.net.DB2Connection.create(DB2Connection.java:268)
at COM.ibm.db2.jdbc.net.DB2Connection.(DB2Connection.java:193)
at COM.ibm.db2.jdbc.net.DB2Driver.connect(DB2Driver.java:198)
at java.sql.DriverManager.getConnection(DriverManager.java:517)
at java.sql.DriverManager.getConnection(DriverManager.java:177)
at _test__jsp._jspService(/test.jsp:7)
at com.caucho.jsp.JavaPage.service(JavaPage.java:75)
at com.caucho.jsp.Page.subservice(Page.java:485)
at com.caucho.server.http.FilterChainPage.doFilter(FilterChainPage.java:182)
at com.caucho.server.http.Invocation.service(Invocation.java:311)
at com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:135)
at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:221)
at com.caucho.server.http.HttpRequest.handleConnection(HttpRequest.java:163)
at com.caucho.server.TcpConnection.run(TcpConnection.java:137)
at java.lang.Thread.run(Thread.java:484)
--------------------------------------------------------------------------------
Resin 2.1.2 (built Tue Jun 11 08:26:56 PDT 2002)
可是用COM.ibm.db2.jdbc.net.DB2Driver报错。请大虾指教
用COM.ibm.db2.jdbc.net.DB2Driver报错代码如下:
500 Servlet Exception
COM.ibm.db2.jdbc.DB2Exception: [IBM][JDBC Driver] CLI0615E 从套接字接收时出错,服务器不响应。SQLSTATE=08S01
at COM.ibm.db2.jdbc.net.SQLExceptionGenerator.throwReceiveError(SQLExceptionGenerator.java:432)
at COM.ibm.db2.jdbc.net.DB2Request.receive(DB2Request.java:664)
at COM.ibm.db2.jdbc.net.DB2Request.sendAndRecv(DB2Request.java:524)
at COM.ibm.db2.jdbc.net.DB2Connection.SQLConnect(DB2Connection.java:319)
at COM.ibm.db2.jdbc.net.DB2Connection.SQLConnect(DB2Connection.java:283)
at COM.ibm.db2.jdbc.net.DB2Connection.create(DB2Connection.java:268)
at COM.ibm.db2.jdbc.net.DB2Connection.(DB2Connection.java:193)
at COM.ibm.db2.jdbc.net.DB2Driver.connect(DB2Driver.java:198)
at java.sql.DriverManager.getConnection(DriverManager.java:517)
at java.sql.DriverManager.getConnection(DriverManager.java:177)
at _test__jsp._jspService(/test.jsp:7)
at com.caucho.jsp.JavaPage.service(JavaPage.java:75)
at com.caucho.jsp.Page.subservice(Page.java:485)
at com.caucho.server.http.FilterChainPage.doFilter(FilterChainPage.java:182)
at com.caucho.server.http.Invocation.service(Invocation.java:311)
at com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:135)
at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:221)
at com.caucho.server.http.HttpRequest.handleConnection(HttpRequest.java:163)
at com.caucho.server.TcpConnection.run(TcpConnection.java:137)
at java.lang.Thread.run(Thread.java:484)
--------------------------------------------------------------------------------
Resin 2.1.2 (built Tue Jun 11 08:26:56 PDT 2002)
|
DB2的默认安装为6789端口,同时还要启动相应的applet服务