Jmix-bookstore liquibase issue

Hi Mario, after upgrading to Enterprise Edition I started a new project and cloned jmix-bookstore.

I kept the initial settings for hsqldb and database URL “jdbc:hsqldb:file:.jmix/hsqldb/bookstore13” and Database User “sa”.

Trying to start it I receive a message stating that I need liquibase professional to run the update, respectively create script.

Message (partially):
“INFORMATION [liquibase.integration] No Liquibase Pro license key supplied. Please set liquibaseProLicenseKey on command line or in liquibase.properties to use Liquibase Pro features.
Liquibase Community 4.11.0 by Liquibase”

Obviously several commands ran through but at the end I receive the following error message (partially):

" Migration failed for change set io/jmix/bookstore/liquibase/changelog/2023/02/17-193108-f2efbaf3.xml::1::bookstore: … Reason: liquibase.exception.DatabaseException: user lacks privilege or object not found: FK_BOOKSTORE_PRODUCT_ON_CATEGORY in statement [DROP INDEX PUBLIC.FK_BOOKSTORE_PRODUCT_ON_CATEGORY] [Failed SQL: (-5501) DROP INDEX PUBLIC.FK_BOOKSTORE_PRODUCT_ON_CATEGORY] … "

Do you have any idea how to get around that problem?

Thx in advance,

Michael Lutz

Hi Michael,

That is true, but no problem. It is just an info message from Liquibase that you cannot use Liquibase pro features.

[2023-02-17 20:20:16] INFO [liquibase.integration] No Liquibase Pro license key supplied. Please set liquibaseProLicenseKey on command line or in liquibase.properties to use Liquibase Pro features.

Jmix does not use Liquibase pro features at all. But if you would like to leverage those on your own, you can read more about it here: Liquibase Pro | Update your database schema & logic quickly and reliably. This has nothing to do with Jmix Enterprise / RAD though.

Regarding the error message that you mentioned, it seems Jmix Studio has created a file called 17-193108-f2efbaf3.xm in the liquibase resource directory.

In the repository this file is not present: jmix-bookstore/src/main/resources/io/jmix/bookstore/liquibase/changelog/2023/01 at main · jmix-framework/jmix-bookstore · GitHub

So feel free to remove it once again. Then to be 100% sure, you can remove the build and .jmix directory or change the filename of the HSQLDB file (as I did in the screencast: Jmix Bookstore - DB Migration - YouTube).

Then the error should be gone. I hope this helps. Have a nice weekend!

Cheers
Mario

Hi Mario, one more time to express my thanks for your help. So far I could overcome the database / liquibase challenge. But then the next problem occured as stated by the debug information below:

2023-02-20T17:59:18.326+0100 [ERROR] [system.err] Ursache: java.lang.ClassNotFoundException: Lutz/gradle\caches\modules-2\files-2/1\io/jmix/core\jmix-core-starter\1/4/4\63786e0f590beeeeaca06d6706367c343dab20da\jmix-core-starter-1/4/4/jar;C:\Users\Michael
2023-02-20T17:59:18.360+0100 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
2023-02-20T17:59:18.360+0100 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] FAILURE: Build failed with an exception.
2023-02-20T17:59:18.360+0100 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
2023-02-20T17:59:18.360+0100 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * What went wrong:
2023-02-20T17:59:18.360+0100 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Execution failed for task ‘:compileWidgets’.
2023-02-20T17:59:18.360+0100 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] > Process ‘command ‘C:\Users\Michael Lutz.jdks\openjdk-17.0.2\bin\java.exe’’ finished with non-zero exit value 1
2023-02-20T17:59:18.360+0100 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
2023-02-20T17:59:18.361+0100 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * Try:
2023-02-20T17:59:18.361+0100 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] > Run with --stacktrace option to get the stack trace.
2023-02-20T17:59:18.361+0100 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
2023-02-20T17:59:18.361+0100 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * Get more help at https://help.gradle.org
2023-02-20T17:59:18.361+0100 [ERROR] [org.gradle.internal.buildevents.BuildResultLogger]
2023-02-20T17:59:18.361+0100 [ERROR] [org.gradle.internal.buildevents.BuildResultLogger] BUILD FAILED in 4s

Do you have any further idea?

thanks, Michael

Hi Mario, I think I got an idea about a possible cause for the above explained problem. Unfortunately my User Account on my Windows Machine is named “Michael Lutz”. It is consisting a space.

One entry in the error log states: “2023-02-21T17:50:55.355+0100 [ERROR] [system.err] Fehler: Hauptklasse Lutz.gradle\caches\modules-2\files-2.1\io.jmix.core\jmix-core-starter\1.4.4\63786e0f590beeeeaca06d6706367c343dab20da\jmix-core-starter-1.4.4.jar;C:\Users\Michael konnte nicht gefunden oder geladen werden”

Part of the entry “Hauptklasse Lutz.gradle\caches\modules-2\files-2.1\io.jmix.core\jmix-core-starter\1.4.4\63786e0f590beeeeaca06d6706367c343dab20da\jmix-core-starter-1.4.4.jar” only reflects the second part of my user name (“Lutz”).

The other part of the entry “C:\Users\Michael konnte nicht gefunden oder geladen werden” reflects the first part of my user name (“Michael”).

Can you give me a feedback on my thoughts? Thx in advance.

best regards

Michael

Reinstalling the IDE / jmix under a username without spaces fixed the issue.