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

FbClientResource disposes client library incorrectly [JDBC620] #651

Closed
firebird-issue-importer opened this issue Apr 4, 2020 · 3 comments
Closed

Comments

@firebird-issue-importer
Copy link

@firebird-issue-importer firebird-issue-importer commented Apr 4, 2020

Submitted by: @mrotteveel

Attempts by NativeResourceTracker to shutdown native resources will result in a ClassCastException as the provided handle will no longer directly unwrap to com.sun.jna.Library.Handler. Instead it should unwrap the FbClientFeatureAccessHandler.

The resulting stacktrace is:

Error disposing of Proxy interface to Native Library <C:\Users\mark\AppData\Local\Temp\fbembed3289550959086440136\fbclient.dll@140726091841536>
java.lang.ClassCastException: org.firebirdsql.gds.ng.jna.FbClientFeatureAccessHandler cannot be cast to com.sun.jna.Library$Handler
at org.firebirdsql.gds.ng.jna.FbClientResource$1.run(FbClientResource.java:88)
at org.firebirdsql.gds.ng.jna.AbstractNativeDatabaseFactory.disposing(AbstractNativeDatabaseFactory.java:145)
at org.firebirdsql.gds.ng.jna.FbClientResource.dispose(FbClientResource.java:75)
at org.firebirdsql.gds.ng.jna.NativeResourceTracker.shutdownNativeResources(NativeResourceTracker.java:94)
at org.firebirdsql.gds.ng.jna.NativeResourceTracker$NativeLibraryShutdownRunnable.run(NativeResourceTracker.java:153)
at java.lang.Thread.run(Thread.java:748)

This indicates a lack of test coverage.

Commits: 23f40de d326e87

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Apr 4, 2020

Modified by: @mrotteveel

Fix Version: Jaybird 4.0.1 [ 10921 ]

Fix Version: Jaybird 5 [ 10871 ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Apr 4, 2020

Modified by: @mrotteveel

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

resolution: Fixed [ 1 ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Aug 11, 2020

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
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants