Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exceptions during statement preparation leave connection and transaction open after explicit close [JDBC291] #337

Closed
firebird-automations opened this issue Dec 24, 2012 · 6 comments

Comments

@firebird-automations
Copy link

Submitted by: @mrotteveel

Is related to JDBC214
Jira_subtask_outward JDBC311

If an exception occurs during a statement prepare, and that exception is not of type GDSException, then a subsequent close() of the connection does not actually close the connection. A subsequent attempt to drop the database (as done during automated tests) will then result in an exception:
org.firebirdsql.gds.GDSException: lock time-out on wait transaction
object D:\DEVELOPMENT\PROJECT\JAYBIRDECLIPSE\CLIENT-JAVA\FBTEST.FDB is in use

Adding the following catch block to the FBPreparedStatement constructor solves this issue
catch (Exception e) {
notifyStatementCompleted(false);
throw e;
}

However, it would be good to further investigate why this blocks closing the physical connection and if there are more resource leaks like this.

Commits: 781d24c 065496b 2536641 FirebirdSQL/fbt-repository@82c05a1

@firebird-automations
Copy link
Author

Modified by: @mrotteveel

description: If an exception occurs during a statement prepare, and that exception is not of type GDSException, then a subsequent close() of the connection does actually close the connection. A subsequent attempt to drop the database (as done during automated tests) will then result in an exception:
org.firebirdsql.gds.GDSException: lock time-out on wait transaction
object D:\DEVELOPMENT\PROJECT\JAYBIRDECLIPSE\CLIENT-JAVA\FBTEST.FDB is in use

Adding the following catch block to the FBPreparedStatement constructor solves this issue
catch (Exception e) {
notifyStatementCompleted(false);
throw e;
}

However, it would be good to further investigate why this blocks closing the physical connection and if there are more resource leaks like this.

=>

If an exception occurs during a statement prepare, and that exception is not of type GDSException, then a subsequent close() of the connection does not actually close the connection. A subsequent attempt to drop the database (as done during automated tests) will then result in an exception:
org.firebirdsql.gds.GDSException: lock time-out on wait transaction
object D:\DEVELOPMENT\PROJECT\JAYBIRDECLIPSE\CLIENT-JAVA\FBTEST.FDB is in use

Adding the following catch block to the FBPreparedStatement constructor solves this issue
catch (Exception e) {
notifyStatementCompleted(false);
throw e;
}

However, it would be good to further investigate why this blocks closing the physical connection and if there are more resource leaks like this.

@firebird-automations
Copy link
Author

Modified by: @mrotteveel

Link: This issue is related to JDBC214 [ JDBC214 ]

@firebird-automations
Copy link
Author

Modified by: @mrotteveel

Version: Jaybird 2.2.3 [ 10510 ]

Version: Jaybird 2.2.2 [ 10480 ]

Version: Jaybird 2.2.1 [ 10474 ]

Version: Jaybird 2.2 [ 10053 ]

Version: Jaybird 2.1.6 [ 10285 ]

Fix Version: Jaybird 3.0 [ 10440 ]

Version: Jaybird 3.0 [ 10440 ] =>

@firebird-automations
Copy link
Author

Commented by: @mrotteveel

Was fixed a while ago.

@firebird-automations
Copy link
Author

Modified by: @mrotteveel

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Fixed [ 1 ]

@firebird-automations
Copy link
Author

Modified by: @mrotteveel

status: Resolved [ 5 ] => Closed [ 6 ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment