GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||
GeezerVison is showing github.com — Fix ClassCastException with pooled connections in DefaultOutputBuffer by jgebal · Pull Request #111 · utPLSQL/utPLSQL-java-api Conversation
Member
Fixes #110 Connection pools such as HikariCP return proxy statements that are not instances of OracleCallableStatement, so fetching reporter output with a pooled connection failed in DefaultOutputBuffer.getLinesCursorStatement. The cast was never needed, because only standard CallableStatement methods are used. It is replaced with a plain CallableStatement, the same way CompatibilityOutputBufferPre310 already does it. Also close the statement created in Reporter.initDbReporter. It was never closed, so every Reporter.init leaked an open cursor. On long-lived pooled connections this can lead to ORA-01000. Add unit tests for both cases using mocked, non-Oracle JDBC objects.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactionsFixes #110 Connection pools such as HikariCP return proxy statements that are not instances of OracleCallableStatement, so fetching reporter output with a pooled connection failed in DefaultOutputBuffer.getLinesCursorStatement. The cast was never needed, because only standard CallableStatement methods are used. It is replaced with a plain CallableStatement, the same way CompatibilityOutputBufferPre310 already does it. Also close the statement created in Reporter.initDbReporter. It was never closed, so every Reporter.init leaked an open cursor. On long-lived pooled connections this can lead to ORA-01000. Add unit tests for both cases using mocked, non-Oracle JDBC objects. Uh oh!
There was an error while loading. Please reload this page.
|
There was an error while loading. Please reload this page.
Test Results26 files +2 26 suites +2 16s ⏱️ -1s Results for commit d623cff. ± Comparison against base commit f443528. ♻️ This comment has been updated with latest results. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…e in a shared helper in AbstractOutputBuffer. The helper closes the statement if binding fails, so it no longer leaks on that error path.
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
ClassCastException when using Hikari Database Pool
There was an error while loading. Please reload this page.