Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Bug with closing SQLServer/Data Direct jdbc connection twice?

843854Oct 6 2003 — edited Oct 21 2003
Hello,
I was wondering if anyone out there in Java land could confirm/deny the following:
from http://dbforums.com/arch/30/2003/7/529049

Apperently with the MSSQL jdbc driver (and also the Data Direct Driver) you cannot close a connection twice. If you do so, something will get screwed in the driver. It wont show up all the time, just when you push the driver. So check your code and make sure you don't close a connection twice.


I spent alot of time going thru the microsoft and data direct web sites and couldn't find anything...
It appears that I'm experiancing this, but am trying to confirm the bug.

According to the java api it's supposed to be a no-op --
The bug seems to be that it isn't a no-op..
The stack trace I'm getting when I try to close the connection is:

java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Object has been closed.
at com.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source)
at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)
at com.microsoft.jdbc.base.BaseConnection.validateClosedState(Unknown Source)
at com.microsoft.jdbc.base.BaseStatement.validateClosedState(Unknown Source)
at com.microsoft.jdbc.base.BasePreparedStatement.clearParameters(Unknown Source)
at com.microsoft.jdbc.base.BasePreparedStatement.close(Unknown Source)
at com.svtechnology.database.DBConnectionBitMechanic.destroy(DBConnectionBitMechanic.java:297)

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 18 2003
Added on Oct 6 2003
1 comment
439 views