← Winnitude! Search  ·  Reader Mode (2500 ms)
Links: Stay in Reader Retro Site Converter Retro Mode: OFF Original Page ↗
GITHUB · 37 LINKS

Fix ClassCastException with pooled connections in DefaultOutputBuffer by jgebal · Pull Request #111 · utPLSQL/utPLSQL-java-api

Repository navigation

Fix ClassCastException with pooled connections in DefaultOutputBuffer - #111


Merged
jgebal merged 2 commits into develop from bugfix/issue_110_pooled_connection_cast Oct 2, 2026
Merged

Fix ClassCastException with pooled connections in DefaultOutputBuffer #111 jgebal merged 2 commits into develop from bugfix/issue_110_pooled_connection_cast

Conversation

jgebal commented Oct 2, 2026



Copy link Copy Markdown
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.

Fix ClassCastException with pooled connections in DefaultOutputBuffer db1e358
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.
github-advanced-security
Bot
found potential problems Oct 2, 2026
View reviewed changes

github-actions
Bot
commented Oct 2, 2026 · edited Loading



Copy link Copy Markdown
Contributor

Test Results

26 files  +2  26 suites  +2   16s ⏱️ -1s
77 tests +4  77 ✅ +4  0 💤 ±0  0 ❌ ±0 
89 runs  +4  89 ✅ +4  0 💤 ±0  0 ❌ ±0 

Results for commit d623cff . ± Comparison against base commit f443528 .

♻️ This comment has been updated with latest results.

The statement preparation and binding for both output buffers now liv... d623cff
...e in

a shared helper in AbstractOutputBuffer. The helper closes the statement
if binding fails, so it no longer leaks on that error path.

sonarqubecloud
Bot
commented Oct 2, 2026



Copy link Copy Markdown

Quality Gate passed

Issues
1 New issue
0 Accepted issues

Measures
0 Security Hotspots
90.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarQube Cloud

jgebal merged commit 12d24f2 into develop Oct 2, 2026 4 checks passed jgebal deleted the bugfix/issue_110_pooled_connection_cast branch October 11, 2026 20:58 Sign up for free to join this conversation on GitHub . Already have an account? Sign in to comment

Labels

None yet

2 participants