Details
Description
Environment (Required on creation):
Quarkus extension
Description (Required on creation; please attach any relevant screenshots, stacktraces, log files, etc. to the ticket):
Quarkus offers a feature to create database with zero configuration [1] in dev mode that doesn't work with Camunda implementation. The database cannot be created because of the h2 datasource configuration provided by default. Observed exception:
2022-08-24 10:57:06,677 ERROR [io.qua.run.Application] (Quarkus Main Thread) Failed to start application (with profile dev): java.sql.SQLException: Driver does not support the provided URL: jdbc:h2:./camunda-h2-dbs/process-engine;TRACE_LEVEL_FILE=0;DB_CLOSE_ON_EXIT=FALSE at io.agroal.pool.ConnectionFactory.connectionSetup(ConnectionFactory.java:220) at io.agroal.pool.ConnectionFactory.createConnection(ConnectionFactory.java:204) at io.agroal.pool.ConnectionPool$CreateConnectionTask.call(ConnectionPool.java:470) at io.agroal.pool.ConnectionPool$CreateConnectionTask.call(ConnectionPool.java:452) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at io.agroal.pool.util.PriorityScheduledExecutor.beforeExecute(PriorityScheduledExecutor.java:68) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630) at java.base/java.lang.Thread.run(Thread.java:832)
Steps to reproduce (Required on creation):
- Use the Quarkus datasource example
- Remove the `h2` driver dependency and uncomment the `postgresql` dependency in the `pom.xml` file
- Comment provided configuration in `application.properties` file and add the following line:
quarkus.datasource.db-kind = postgresql
- Spin up the example in dev mode
mvn clean compile quarkus:dev
Observed Behavior (Required on creation):
The application fails with `SQLException` due to missing h2 driver.
Expected behavior (Required on creation):
The application starts in dev mode and creates out of the box postgresql database.
Root Cause (Required on prioritization):
Quarkus extension is provided with default h2 datasource configuration which prevents application from spin up a different database with no configuration provided by the user.
Solution Ideas (Optional):
Removed the default datasource properties so the users can get better use of Quarkus developer tool. Take care of providing datasource configuration for our test suite that relies on the default configuration at the moment.