Error when starting the default Oracle container for development
See original GitHub issueIf the configuration doesn’t specify the URL:
quarkus:
datasource:
jdbc: false
db-kind: oracle
username:
password:
reactive:
url:
hibernate-orm:
database:
generation: drop-and-create
log:
sql: true
when starting quarkus, the following error occurs:
Caused by: java.lang.IllegalArgumentException: Cannot parse invalid connection URI: oracle:thin:@localhost:49494/quarkusdb
at io.vertx.oracleclient.impl.OracleConnectionUriParser.parse(OracleConnectionUriParser.java:54)
at io.vertx.oracleclient.impl.OracleConnectionUriParser.parse(OracleConnectionUriParser.java:40)
at io.vertx.oracleclient.OracleConnectOptions.fromUri(OracleConnectOptions.java:54)
at io.quarkus.reactive.oracle.client.runtime.OraclePoolRecorder.toOracleConnectOptions(OraclePoolRecorder.java:93)
at io.quarkus.reactive.oracle.client.runtime.OraclePoolRecorder.initialize(OraclePoolRecorder.java:56)
at io.quarkus.reactive.oracle.client.runtime.OraclePoolRecorder.configureOraclePool(OraclePoolRecorder.java:38)
at io.quarkus.deployment.steps.ReactiveOracleClientProcessor$build2113975005.deploy_0(Unknown Source)
at io.quarkus.deployment.steps.ReactiveOracleClientProcessor$build2113975005.deploy(Unknown Source)
... 74 more
The reason is that the url should be:
oracle:thin:@localhost:49494:quarkusdb
I have a reproducer here: https://github.com/DavideD/hibernate-reproducer/tree/oracle-issue
The exception will happen with:
./gradlew quarkusDev
Issue Analytics
- State:
- Created 2 years ago
- Comments:11 (4 by maintainers)
Top Results From Across the Web
Pluggable Database not open automatically - Ask TOM
Pluggable Database not open automatically Some Days before I have Install Oracle Database New version 12.1.0.2 with no error or warnings.
Read more >create container database error - Oracle Communities
Hi, whenever I issue CREATE DATABASE CDB2 DEFAULT TABLESPACE users DEFAULT TEMPORARY TABLESPACE temp.
Read more >SQL Developer 4.0 support for Oracle 12c migration
Hello,. We are trying to migrate a SQL Server DB to Oracle 12c using SQL Developer's migration wizard. We are getting some errors....
Read more >7 Starting and Stopping Oracle Database XE
By default, the Oracle Database Service will automatically startup and open the container database. Pluggable databases will remain closed by default and must ......
Read more >2 Error Codes and Descriptions - Oracle Help Center
Cause: This is an exception that an application should never encounter. The exception can occur at the time of developing TopLink. In cases...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
My understanding is that it’s a bug in the reactive Oracle client. The URL formats for Oracle can be:
jdbc:oracle:thin:@<hostName>:<portNumber>:<sid>
(if you have sid)jdbc:oracle:thin:@//<hostName>:<portNumber>/serviceName
(if you have oracle service name)according to https://stackoverflow.com/questions/1054105/url-string-format-for-connecting-to-oracle-database-with-jdbc .
And only
:sid
is handled in the reactive Oracle client here: https://github.com/eclipse-vertx/vertx-sql-client/blob/master/vertx-oracle-client/src/main/java/io/vertx/oracleclient/impl/OracleConnectionUriParser.java#L28We might be able to work around it as apparently we use
:
if we have a shared network but I’m not sure how it would work for JDBC and Testcontainers use the/
variant if it doesn’t use the SID - which has the fixed value ofxe
so I really think a/
is the way to go in our case.I would rather fix the reactive Oracle client and use a
/
consistently for the URL in theOracleDevServicesProcessor
./cc @tsegismont WDYT?
Yep, upstream seems to work as expected now. Thanks.
I’ve tested it with the
hibernate-reactive-quickstart
: https://github.com/DavideD/quarkus-quickstarts/tree/default-oracle-quickstart