Skip to content

Conversation

@turakamou
Copy link
Contributor

Motivation:

At least version 4.5.13 has this issue

I encountered an exception while using vertx-oracle stream API to fetch data from a RAW column.
There is no issue with the regular "Prepared queries" API
The stack trace is:

Caused by: java.sql.SQLException: ORA-17282: Class argument to getObject is null.
https://docs.oracle.com/error-help/db/ora-17282/
	at oracle.jdbc.driver.Accessor.getObject(Accessor.java:1043)
	at oracle.jdbc.driver.OracleStatement.getObject(OracleStatement.java:7407)
	at oracle.jdbc.driver.InsensitiveScrollableResultSet$RowPublisher$ExpiringRow.getObject(InsensitiveScrollableResultSet.java:1487)
	at io.vertx.oracleclient.impl.RowReader.transform(RowReader.java:182)
	at io.vertx.oracleclient.impl.RowReader.apply(RowReader.java:173)
	at io.vertx.oracleclient.impl.RowReader.apply(RowReader.java:38)
	at oracle.jdbc.driver.InsensitiveScrollableResultSet$RowPublisher.mapCurrentRow(InsensitiveScrollableResultSet.java:1361)
	at oracle.jdbc.driver.InsensitiveScrollableResultSet$RowPublisher.requestNext(InsensitiveScrollableResultSet.java:1319)
	at oracle.jdbc.driver.PhasedPublisher$PublishingPhaser.onAdvance(PhasedPublisher.java:233)
	at java.base/java.util.concurrent.Phaser.doArrive(Phaser.java:395)
	at java.base/java.util.concurrent.Phaser.arrive(Phaser.java:630)
	at oracle.jdbc.driver.PhasedPublisher$PhasedSubscription.arriveForNextPhase(PhasedPublisher.java:683)
	at oracle.jdbc.driver.PhasedPublisher$PhasedSubscription.request(PhasedPublisher.java:639)
	at io.vertx.oracleclient.impl.RowReader.lambda$read$1(RowReader.java:105)
	at io.vertx.oracleclient.impl.Helper$SQLBlockingTaskHandler.handle(Helper.java:321)
	at io.vertx.oracleclient.impl.Helper$SQLBlockingTaskHandler.handle(Helper.java:313)
	at io.vertx.core.impl.ContextImpl.lambda$executeBlocking$5(ContextImpl.java:205)
	at io.vertx.core.impl.ContextInternal.dispatch(ContextInternal.java:270)
	at io.vertx.core.impl.ContextImpl$1.execute(ContextImpl.java:221)
	at io.vertx.core.impl.WorkerTask.run(WorkerTask.java:56)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
	at java.base/java.lang.Thread.run(Thread.java:1583)

Here is a simple fix along with a unit test to prove the fix work.

@vietj
Copy link
Member

vietj commented Mar 14, 2025

can you describe in your commit : what is the issue and how the commit fixes it

Oracle will return "[B" as class name for byte[], I don't know why the
class loader is not able to load this.
So when we try to call getObject for this column, it is called with null
class argument.
So let's return the correct class in this case.

Signed-off-by: turakamou <[email protected]>
@turakamou
Copy link
Contributor Author

PS: was I right to propose the commit for master as it will also be needed for 4.x

@vietj vietj modified the milestones: 4.5.14, 5.0.0 Mar 14, 2025
@vietj vietj added the bug label Mar 14, 2025
@turakamou
Copy link
Contributor Author

And I fact I should have check the unitest on master, seems it doesn't compile.
I'm very sorry, let me check now.

Fix unit test for master

Signed-off-by: turakamou <[email protected]>
@turakamou
Copy link
Contributor Author

turakamou commented Mar 14, 2025

Should be ok on this test on master
Should I open a new PR with separated commits based on 4.x to merge into 4.x ?

@vietj
Copy link
Member

vietj commented Mar 14, 2025

let us run first CI and get @tsegismont to review the patch :-)

@vietj vietj requested a review from tsegismont March 14, 2025 09:37
Copy link
Contributor

@tsegismont tsegismont left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for looking into this @turakamou

Can you take care of the fix with my suggestions?

Take into account tsegismont review comments

Signed-off-by: turakamou <[email protected]>
Copy link
Contributor

@tsegismont tsegismont left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@turakamou thank you, this looks good to me!

@tsegismont
Copy link
Contributor

@turakamou I'll wait for CI to complete before merging and will take care of backporting. Thanks again!

@tsegismont tsegismont merged commit cfa375f into eclipse-vertx:master Mar 17, 2025
18 checks passed
@tsegismont
Copy link
Contributor

@turakamou I'll take care of backporting. Thanks again!

tsegismont pushed a commit to tsegismont/vertx-sql-client that referenced this pull request Mar 17, 2025
* simple fix of oracle stream API for RAW column

Signed-off-by: turakamou <[email protected]>

* fixup! simple fix of oracle stream API for RAW column

Oracle will return "[B" as class name for byte[], I don't know why the
class loader is not able to load this.
So when we try to call getObject for this column, it is called with null
class argument.
So let's return the correct class in this case.

Signed-off-by: turakamou <[email protected]>

* fixup! simple fix of oracle stream API for RAW column

Fix unit test for master

Signed-off-by: turakamou <[email protected]>

* simple fix of oracle stream API for RAW column

Take into account tsegismont review comments

Signed-off-by: turakamou <[email protected]>

---------

Signed-off-by: turakamou <[email protected]>
@turakamou
Copy link
Contributor Author

Thanks a lot to you too for the quick help and merge.
And also thanks for backporting to 4.x
And always happy to help.

tsegismont pushed a commit to tsegismont/vertx-sql-client that referenced this pull request Mar 17, 2025
tsegismont added a commit that referenced this pull request Mar 17, 2025
Backported from #1498

Signed-off-by: turakamou <[email protected]>
Co-authored-by: turakamou <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants