GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Fix ClassCastException with pooled connections in DefaultOutputBuffer by jgebal · Pull Request #111 · utPLSQL/utPLSQL-java-api

Conversation

@jgebal

@jgebal 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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Jacek Gębal
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]
github-advanced-security Bot found potential problems Oct 2, 2026
View reviewed changes
Comment thread src/main/java/org/utplsql/api/outputBuffer/DefaultOutputBuffer.java Fixed

Uh oh!

There was an error while loading. Please reload this page.

@github-actions

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

Uh oh!

There was an error while loading. Please reload this page.

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Jacek Gębal
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

sonarqubecloud Bot commented Oct 2, 2026

Copy link
Copy Markdown

Quality Gate Passed 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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@jgebal
jgebal merged commit 12d24f2 into develop Oct 2, 2026
4 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@jgebal
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

Reviewers

1 more reviewer
@github-advanced-security github-advanced-security[bot] github-advanced-security[bot] left review comments
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

ClassCastException when using Hikari Database Pool

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@jgebal @github-advanced-security
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.