连接重置

时间:2013-07-25 13:02:15

标签: java sql-server jtds

我使用的是sql server数据库,jtds驱动程序和java1.6.0_16。

在我的客户端代码中,我想执行查询次数(存储过程)并将数据写入文件。 第一个查询成功执行并写入文件。 第二个查询成功执行并在从结果集对象进行迭代时,抛出异常“java.sql.SQLException:I / O错误:连接重置”

**Below is the Full Stack Trace :**

Caused by: java.sql.SQLException: I/O Error: Connection reset
at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2277)
at net.sourceforge.jtds.jdbc.TdsCore.getNextRow(TdsCore.java:761)
at net.sourceforge.jtds.jdbc.JtdsResultSet.next(JtdsResultSet.java:593)
 ... 2 more
Caused by: java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(Unknown Source)
at java.io.DataInputStream.readFully(Unknown Source)
at net.sourceforge.jtds.jdbc.SharedSocket.readPacket(SharedSocket.java:860)
at net.sourceforge.jtds.jdbc.SharedSocket.getNetPacket(SharedSocket.java:707)
at net.sourceforge.jtds.jdbc.ResponseStream.getPacket(ResponseStream.java:466)
at net.sourceforge.jtds.jdbc.ResponseStream.read(ResponseStream.java:103)
at net.sourceforge.jtds.jdbc.ResponseStream.readInt(ResponseStream.java:320)
at net.sourceforge.jtds.jdbc.TdsData.readData(TdsData.java:652)
at net.sourceforge.jtds.jdbc.TdsCore.tdsRowToken(TdsCore.java:2968)
at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2236)

请注意:使用java 1.5时,它可以成功运行而没有任何问题。使用java 1.6.0_16时出错.Google对我没有帮助。

提前致谢

此致 Ganesan

0 个答案:

没有答案