Uploaded image for project: 'camunda BPM'
  1. camunda BPM
  2. CAM-14830

In Quarkus, default h2 datasource configuration breaks dev services feature

    XMLWordPrintable

Details

    • Bug Report
    • Resolution: Unresolved
    • L3 - Default
    • 7.17.x, 7.19.0, 7.18.x
    • 7.16.0, 7.17.0, 7.18.0
    • quarkus
    • None

    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):

      1. Use the Quarkus datasource example
      2. Remove the `h2` driver dependency and uncomment the `postgresql` dependency in the `pom.xml` file
      3. Comment provided configuration in `application.properties` file and add the following line:
        quarkus.datasource.db-kind = postgresql
      1. 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.

      Hints (optional):

      [1]: https://quarkus.io/guides/datasource#dev-services

      mgm-controller-panel

        This is the controller panel for Smart Panels app

        Attachments

          Activity

            People

              Unassigned Unassigned
              yana.vasileva Yana Vasileva
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Salesforce