Data Stores empty

I have a project, which is running fine.

But the menu does not show any datastore. How can I solve this ?

image

This is with Jmix Studio 2.6.2 and 2.7.0-RC2. Clean, Re-Import Gradle, reopening the IDE, Repair IDE, Invalidate caches does not help.

Regards
Felix

Update: I cannot Add Attribute from DB because of this.

java.util.NoSuchElementException: List is empty.
	at kotlin.collections.CollectionsKt___CollectionsKt.first(_Collections.kt:221)
	at com.haulmont.jmixstudio.db.connection.DataSourceField.getSelectedDataSource(DataSourceField.kt:79)
	at com.haulmont.jmixstudio.ui.re.DbTablesLoaderPanel.getSelectedDataStore(DbTablesLoaderPanel.kt:281)
	at com.haulmont.jmixstudio.ui.re.DbTablesLoaderPanel.updateDbSnapshotPanel(DbTablesLoaderPanel.kt:135)
	at com.haulmont.jmixstudio.ui.re.DbTablesLoaderPanel.updateDbSnapshotPanel$default(DbTablesLoaderPanel.kt:133)
	at com.haulmont.jmixstudio.ui.re.DbTablesLoaderPanel.createSnapshotPanel(DbTablesLoaderPanel.kt:116)
	at com.haulmont.jmixstudio.ui.re.DbTablesLoaderPanel.<init>(DbTablesLoaderPanel.kt:102)
	at com.haulmont.jmixstudio.ui.re.SelectColumnsOfTablePanel.<init>(SelectColumnsOfTablePanel.kt:31)
	at com.haulmont.jmixstudio.ui.re.ReColumnsDialog.<init>(ReColumnsDialog.kt:49)

Hi Felix,

Perhaps Studio doesn’t recognize your data store configuration for some reason.
Is this an application or add-on project?

Hi @krivopustov

This is a normal application.

Then provide your main application class and application.properties (clean up sensitive values please).

Now I got it !
→ As I had no default main.datasource.url the gui cannot find it.
→ The database credentials are in an external application.properties
Thank you and sorry for not taking enough attention.

OK.
BTW, Studio can read profile-specific property files too:
https://docs.jmix.io/jmix/studio/profile-specific-properties.html

1 Like