Uploaded image for project: 'Kogito'
  1. Kogito
  2. KOGITO-8389

Regression: `process-postgresql` examples are no more working due to flyway migration

    • False
    • None
    • False
    • ---
    • ---

      Commit: https://github.com/kiegroup/kogito-examples/commit/3029823a98c045cd634b086e7466f03fc0de992f#diff-c5d02a8f7908812ea15d8507528f523b356a57d34a810e6f95a8a3c6ac2c3cebR8-R10

      On Quarkus, `quarkus.datasource.jdbc.url` is now mandatory whereas it was not previous, we could set directly `quarkus.datasource.reactive.url`

      On Spring Boot, `kogito.persistence.postgresql.connection.uri` is not taken into account anymore. We need to define also those properties:

      • spring.datasource.url
      • spring.datasource.username
      • spring.datasource.password

            [KOGITO-8389] Regression: `process-postgresql` examples are no more working due to flyway migration

            Also with the `events` profile activated, I get:

            _  ____  __  _____   ___  __ ____  ______
             --/ __ \/ / / / _ | / _ \/ //_/ / / / __/
             -/ /_/ / /_/ / __ |/ , _/ ,< / /_/ /\ \
            --\___\_\____/_/ |_/_/|_/_/|_|\____/___/
            2022-12-20 15:04:30,543 INFO  [org.fly.cor.int.lic.VersionPrinter] (main) Flyway Community Edition 9.8.3 by Redgate
            2022-12-20 15:04:30,544 INFO  [org.fly.cor.int.lic.VersionPrinter] (main) See what's new here: https://flywaydb.org/documentation/learnmore/releaseNotes#9.8.3
            2022-12-20 15:04:30,545 INFO  [org.fly.cor.int.lic.VersionPrinter] (main)
            2022-12-20 15:04:30,688 INFO  [org.fly.cor.int.dat.bas.BaseDatabaseType] (main) Database: jdbc:postgresql://postgresql:5432/mydb (PostgreSQL 12.7)
            2022-12-20 15:04:30,721 INFO  [org.fly.cor.int.com.DbValidate] (main) Successfully validated 1 migration (execution time 00:00.019s)
            2022-12-20 15:04:30,789 ERROR [io.qua.run.Application] (main) Failed to start application (with profile prod): org.flywaydb.core.api.FlywayException: Found non-empty schema(s) "public" but no schema history table. Use baseline() or set baselineOnMigrate to true to initialize the schema history table.
                at org.flywaydb.core.Flyway.lambda$migrate$0(Flyway.java:166)
                at org.flywaydb.core.FlywayExecutor.execute(FlywayExecutor.java:204)
                at org.flywaydb.core.Flyway.migrate(Flyway.java:128)
                at io.quarkus.flyway.runtime.FlywayRecorder.doStartActions(FlywayRecorder.java:82)
                at io.quarkus.deployment.steps.FlywayProcessor$startActions1770701860.deploy_0(Unknown Source)
                at io.quarkus.deployment.steps.FlywayProcessor$startActions1770701860.deploy(Unknown Source)
                at io.quarkus.runner.ApplicationImpl.doStart(Unknown Source)
                at io.quarkus.runtime.Application.start(Application.java:101)
                at io.quarkus.runtime.ApplicationLifecycleManager.run(ApplicationLifecycleManager.java:109)
                at io.quarkus.runtime.Quarkus.run(Quarkus.java:71)
                at io.quarkus.runtime.Quarkus.run(Quarkus.java:44)
                at io.quarkus.runtime.Quarkus.run(Quarkus.java:124)
                at io.quarkus.runner.GeneratedMain.main(Unknown Source)
                at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
                at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                at java.base/java.lang.reflect.Method.invoke(Method.java:566)
                at io.quarkus.bootstrap.runner.QuarkusEntryPoint.doRun(QuarkusEntryPoint.java:61)
                at io.quarkus.bootstrap.runner.QuarkusEntryPoint.main(QuarkusEntryPoint.java:32)

            Tristan Radisson (Inactive) added a comment - Also with the `events` profile activated, I get: _ ____ __ _____ ___ __ ____ ______ --/ __ \/ / / / _ | / _ \/ //_/ / / / __/ -/ /_/ / /_/ / __ |/ , _/ ,< / /_/ /\ \ --\___\_\____/_/ |_/_/|_/_/|_|\____/___/ 2022-12-20 15:04:30,543 INFO [org.fly.cor.int.lic.VersionPrinter] (main) Flyway Community Edition 9.8.3 by Redgate 2022-12-20 15:04:30,544 INFO [org.fly.cor.int.lic.VersionPrinter] (main) See what's new here: https://flywaydb.org/documentation/learnmore/releaseNotes#9.8.3 2022-12-20 15:04:30,545 INFO [org.fly.cor.int.lic.VersionPrinter] (main) 2022-12-20 15:04:30,688 INFO [org.fly.cor.int.dat.bas.BaseDatabaseType] (main) Database: jdbc:postgresql://postgresql:5432/mydb (PostgreSQL 12.7) 2022-12-20 15:04:30,721 INFO [org.fly.cor.int.com.DbValidate] (main) Successfully validated 1 migration (execution time 00:00.019s) 2022-12-20 15:04:30,789 ERROR [io.qua.run.Application] (main) Failed to start application (with profile prod): org.flywaydb.core.api.FlywayException: Found non-empty schema(s) "public" but no schema history table. Use baseline() or set baselineOnMigrate to true to initialize the schema history table. at org.flywaydb.core.Flyway.lambda$migrate$0(Flyway.java:166) at org.flywaydb.core.FlywayExecutor.execute(FlywayExecutor.java:204) at org.flywaydb.core.Flyway.migrate(Flyway.java:128) at io.quarkus.flyway.runtime.FlywayRecorder.doStartActions(FlywayRecorder.java:82) at io.quarkus.deployment.steps.FlywayProcessor$startActions1770701860.deploy_0(Unknown Source) at io.quarkus.deployment.steps.FlywayProcessor$startActions1770701860.deploy(Unknown Source) at io.quarkus.runner.ApplicationImpl.doStart(Unknown Source) at io.quarkus.runtime.Application.start(Application.java:101) at io.quarkus.runtime.ApplicationLifecycleManager.run(ApplicationLifecycleManager.java:109) at io.quarkus.runtime.Quarkus.run(Quarkus.java:71) at io.quarkus.runtime.Quarkus.run(Quarkus.java:44) at io.quarkus.runtime.Quarkus.run(Quarkus.java:124) at io.quarkus.runner.GeneratedMain.main(Unknown Source) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at io.quarkus.bootstrap.runner.QuarkusEntryPoint.doRun(QuarkusEntryPoint.java:61) at io.quarkus.bootstrap.runner.QuarkusEntryPoint.main(QuarkusEntryPoint.java:32)

              abhkuma@redhat.com Abhishek Kumar
              tradisso@redhat.com Tristan Radisson (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: