hibernate-test-case-templates
hibernate-test-case-templates copied to clipboard
HHH-19280: reproducer
Here is a reproducer for https://hibernate.atlassian.net/browse/HHH-19280.
The issue is when the DataSource used in MyConnectionProvider is wrapped with the OpenTelemetry JDBC instrumenter. I decided to reuse the ConnectionProvider implementation from Hikari just because I didn't know how to do something simpler, but the problem has nothing to do with Hikari.
Note the debug logs in the log4j file, executing the test will print:
2025-03-26 10:21:45 DEBUG ResourceRegistryStandardImpl:202 - Exception clearing maxRows/queryTimeout [The object is already closed [90007-232]]
The reason why we see this and why it's a problem is explained here: https://hibernate.atlassian.net/browse/HHH-19280?focusedCommentId=119939