question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error when starting the default Oracle container for development

See original GitHub issue

If 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:closed
  • Created 2 years ago
  • Comments:11 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
gsmetcommented, Feb 22, 2022

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#L28

We 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 of xe 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 the OracleDevServicesProcessor.

/cc @tsegismont WDYT?

0reactions
DavideDcommented, Mar 25, 2022

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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found