oracle / oracle-r2dbc

R2DBC Driver for Oracle Database
https://oracle.com
Other
194 stars 40 forks source link

Connection issue with R2DBC, but not jdbc #62

Closed Stefanqn closed 2 years ago

Stefanqn commented 2 years ago

To follow up my stackoverflow question, where jdbc connects, but r2dbc doesn't.

How can I print the ConnectionFactoryOption that are actually used for the jdbc and r2dbc connection?

Michael-A-McMahon commented 2 years ago

We can print log messages by enabling Oracle JDBC's diagnostic logging. You'll need to have the ojdbc11_g jar on the classpath to use logging. More details about configuring logging can be found in the Developer's Guide: https://docs.oracle.com/en/database/oracle/oracle-database/21/jjdbc/JDBC-diagnosability.html#GUID-4925EAAE-580E-4E29-9B9A-84143C01A6DC

In the face of hangs, I find it useful to dump the JVM threads. This will let us see where our threads are hanging. The jstack command, or CRTL+\ will produce a thread dump.

Also, just in case you haven't already, please be sure to review the Connection Creation section here: https://github.com/oracle/oracle-r2dbc#connection-creation This section explains the options and URL components that Oracle R2DBC supports. It also explains how Oracle R2DBC uses these options and URL components to configure the JDBC connection.

Stefanqn commented 2 years ago

After we couldn't figure out what prevented r2dbc from connecting to the oracle DB, we basically switched back to jdbc due to time constraints. I'm sorry for not being able to dig deeper into what happened. I'm closing the issue for that reason.