Friday, February 24, 2012

Connection closes often

Hi Team,

I get the below error very often.

java.sql.SQLException: I/O Error: Connection reset Caused by: java.net.SocketException: Connection reset
Followed by a number of "java.sql.SQLException: Invalid state, the Connection object is closed.".
Some time Invalid state, the Statement object is closed."
I have checked out the network problem and time out of queries. And both does not seems to be an issue for me. Because my application send queries continuously (Checked it with mssql profiler all queries executed in minimum interval) and MSSQL runs in the local machine. Meantime i do not see any wrong packet exception.
Is there any other thing i could check out. Any kind of Help is much appreciated.

Thanks for your help.

Hi,

Could you post a full stack trace of the exception(s)?

Thanks,

--David Olix

JDBC Development

|||Hi David,

Thanks for your reply.

Please find the trace below.

16:06:46:454 PM Caused by: java.sql.SQLException: Invalid state, the Connection object is closed.
16:06:46:454 PM at net.sourceforge.jtds.jdbc.ConnectionJDBC2.checkOpen(ConnectionJDBC2.java:1213)
16:06:46:454 PM at net.sourceforge.jtds.jdbc.ConnectionJDBC2.createStatement(ConnectionJDBC2.java:1735)
16:06:46:454 PM at com.adventnet.persistence.standalone.LogicalConnection.createStatement(LogicalConnection.java:72)
16:06:46:454 PM at com.adventnet.db.api.RelationalAPI.createStatement(RelationalAPI.java:952)
16:06:46:454 PM at com.adventnet.db.api.RelationalAPI.createStatement(RelationalAPI.java:947)
16:06:46:454 PM at com.adventnet.db.api.RelationalAPI.executeQuery(RelationalAPI.java:750)
16:06:46:454 PM at com.adventnet.persistence.internal.GetUtil.get(GetUtil.java:89)

Thanks,
Navaneeth
|||

I had assumed that you were using the new Microsoft SQL Server 2005 JDBC driver... My apologies. I probably won't be much help to you then.

You may be able to figure out why the connection is being closed by running the SQL Server Profiler to gather a trace while you run your app. You might also want to submit your question to the jTDS or adventnet folks.

Or if you can reproduce your problem with Microsoft's JDBC driver, I might be able to provide some assistance. :-)

--David Olix

JDBC Development

|||

Hi ,

i also facing the same problem .i am using the latest jdbc driver from microsoft .

No comments:

Post a Comment