Closed sourabhdug closed 1 year ago
Thank you for showing me this. It definitely looks like a bug :( I'll have time to debug tomorrow. I'll update once I learn more...
I've found the root cause:
Oracle JDBC enables DN matching by default when using a URL of the form: jdbc:oracle:thin:@tcps:...
Oracle R2DBC uses this form of URL when ConnectionFactoryOptions.SSL is set to true.
In Oracle R2DBC 1.0.0, we can work around this by configuring a descriptor with PROTOCOL=TCPS
:
ConnectionFactoryOptions options =
ConnectionFactoryOptions.builder()
.option(ConnectionFactoryOptions.DRIVER, "oracle")
.option(OracleR2dbcOptions.DESCRIPTOR,
"(DESCRIPTION=" +
"(ADDRESS=(PROTOCOL=TCPS)(HOST=your.db.host.com)(PORT=1522))" +
"(CONNECT_DATA=(SERVICE_NAME=your.db.service.name)))")
.option(ConnectionFactoryOptions.USER, "...")
.option(ConnectionFactoryOptions.PASSWORD, "...")
.build();
For the next release, I will fix this so that we don't need the work around.
Thank you @Michael-A-McMahon I will try the work around, that would be definitely better than having to specify the entire DN!
Above results in an error of the following trace
however adding
with expected DN causes the query and connection to succeed!
Dependencies
Oracle Version