Skip to content

vertx-oracle-client PreparedStatement fails to retrieve RAW column #1490

@mdemont-verimatrix

Description

@mdemont-verimatrix

Version

At least version 4.5.13 has this issue

Context

I encountered an exception which looks suspicious 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)

Do you have a reproducer?

I have a reproducer along with a "dumb" fix in my branch.
turakamou@e5f038e
If you comment out the small fix in RowReader.java, you'll get the exception when passing the new test testDecodeUsingStream

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions