Issue Details (XML | Word | Printable)

Key: JDBC-620
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Mark Rotteveel
Reporter: Mark Rotteveel
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Jaybird JDBC Driver

FbClientResource disposes client library incorrectly

Created: 04/Apr/20 01:35 PM   Updated: 11/Aug/20 02:38 PM
Component/s: JNI/JNA layer
Affects Version/s: Jaybird 4.0.0
Fix Version/s: Jaybird 4.0.1, Jaybird 5


 Description  « Hide
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.

 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
There are no comments yet on this issue.