Issue with appsetings addon

Hi!
With

  1. jmix version 1.3.3
  2. jmix studio version 1.3.6-213
  3. JDK 17

i have create a new jmix project and i have follow this guide ( Application Settings :: Jmix Documentation ) to setup “Application Settings” module .

Unfortunately this doesnt work when i run the project , because it does not create the necessery db tables to storage the settings.

What is wrong ?

Did you update the database from Jmix-Studio after adding the addon to the project?

yes , but does not see any changes that must do on db.
The change log from liquibase is empty

The Application Settings add-on doesn’t contain any entities (except the base AppSettingsEntity) and doesn’t create any tables itself.
You should create your own entities for storing settings, see the docs.

Konstantin , as i mention before i have follow exactly the guide
and i have create an entity as it described in the guide .

download from this link demo project with issue the test project with app settings

Hi, Giorgos

I downloaded your project.
Run ‘Recreate DB’ command and try run app.
Then I saw a message from Studio that a new liquibase script had been created to create the TASP_MY_APP_SETTINGS table.
I applied this update script, the application started and your settings work.
image

Jmix Studio plugin version: 1.3.7-213
IntelliJ version: IntelliJ IDEA 2021.3.2 (Community Edition)

Perhaps the reason was in an older version of the Studio plugin?

You can download the project with the necessary liquibase update script. Everything works here
TestAppSettingsPro.zip (85.5 KB)

Hello Andrey ,
i have upgrade the Jmix Studio plugin version to 1.3.7-213
You mention “Then I saw a message from Studio that a new liquibase script had been created to create the TASP_MY_APP_SETTINGS table.”
That step does not happens to me .
Can i ask if this has any relationship with the “FREE” or the “COMMERCIAL” version of addon ? (i dont have active subscription in my workstation)

I have a subscription to Sudio.
Indeed, database version scripts generator are not included in the free version
Subscription Plans and Prices – Jmix
image

Right, since September, 2022, in all new releases of Studio automatic generation of Liquibase changelogs requires a subscription.

It was announced a few months ago in release 1.3. In the free mode, Studio displayed the following information when generated changelogs:
image

Thank you Konstantin and Andrey for your answer.
its clear understood about the differences about the versions.
And this is something that is needed ( from business side ) to be healthy the feature of JMIX platform (with out money you cant have develop).

But i see a little “conflict” on the price plan

image

it said that you can use the “Add on’s Marketplace”.
The problem in this statement is that you have access on market place BUT you cant use any addon from marketplace that have entities and must alter the database .

My thread starts from that i had the need to use “application properties addon” that is free for use even in “Free” version of Jmix Studio . but with out the ability to create the database script i cant use it. Is useless .

I think that is something that must discuss the product develop team of the Jmix platform.

Best regards

Hello

I think you mixed 2 topics Liquibase changelog generation and executions.

As i see it addons that need additional db chages come with the necessary changelogs. Example reports: jmix/jmix-reports/reports/src/main/resources/io/jmix/reports/liquibase at master · jmix-framework/jmix · GitHub

For usage of addons you should not have to create the changelogs yourself (for example by using jmix generation).

Of course if you have the need of custom tables that integrate with a addon you have to create the changelogs yourself. But that also can be done manually or by other tools.

Edit: In your case for appsettings you will have a entity that inherits from AppSettingsEntity. That means it will get a id and version field. Here is a example for you:

@JmixEntity
@Table(name = "abc_CONFIG_TEST")
@Entity(name = "abc_ConfigTest")
public class ConfigTest extends AppSettingsEntity {

    @Column(name = "TEST")
    private String test;

    public String getTest() {
        return test;
    }

    public void setTest(String test) {
        this.test = test;
    }
}

Changeset for this table can look something like this:

    <changeSet id="1">
        <createTable tableName="abc_CONFIG_TEST">
            <column name="id" type="INT">
                <constraints primaryKey="true" primaryKeyName="PK_CONFIG_TEST"/>           
            </column>
            <column name="version" type="INT">
                <constraints nullable="false"/>
            </column>
            <column name="test" type="VARCHAR(255)"/>
        </createTable>
    </changeSet>
3 Likes

Hi Giorgos,

That’s not exactly correct. As @kernelcurling mentioned above, all add-ons come with their own Liquibase changelogs, so you don’t have to create them in your project. The Application Settings add-on is a sole exception, and it’s defined by its nature: you have to create entities for settings in your project to use them through the add-on’s functionality.

Please also note that even in the free mode, Studio helps you create Liquibase changelogs:

  • Open context menu for your Data Store and click New → Liquibase Changelog to create an empty changelog in an appropriate folder.
  • When you write Liquibase XML, Studio will provide code completion for entity and attribute names (and of course for XML tags by XSD).

Regards,
Konstantin

1 Like

Thank you all

Keep up your good work