Blank Error Message When Starting Application

image

Trying to recreate the database. Database shows to be synced and updated, but getting this blank message when starting the application. Any ideas?

Or how to drop the database and re-create fresh and new?

Hi! Could you provide your idea.log? You can find it in Help -> Show logs in explorer.

Where do I upload the log file? This editor only allows pic formats or links.

Tried to copy and paste log here, but getting Bad Gateway when saving…

Hi! The issue with log files looks to be fixed. Please, try again.

idea.log (2.2 MB)

idea.log attached

Could you show your changelog.xml file? It should be in src/main/resources/${base_package}/liquibase/changelog.xml

There isn’t a changelog.xml at location but there is a changelog folder with subfolders underneath.

I may have deleted the changelog.xml file trying to re-create the database from scratch.

I remember that I had a typo in on attribute of a entity. I refactored the attribute but the refactoring didn’t changed the name of the column. I then changed the column name in the gui and reran the application. This is where I began to have issues. The rename of the column failed and I could never get the application to rerun. I finally just tried to delete the changelogs and was hoping that liquibase would simply restart from scratch. That failed. Since then I’ve abandoned the project and restarted anew.

If I was writing this for a real-world production application and not simply in learning mode, this would be a massive failure.

As I asked at the beginning, is there a way to drop the database and recreate it from scratch?

I tried to copy the entity files and screen.xml files to a new project but that proved difficult also.

Thanks

Hi,
Thanks for letting us know about this problem, we’ll make improvements in the Studio UI regarding liquibase changelog re-creation.

The error happens because essential Liquibase changelog files were deleted. You can fix your original project by doing these steps:

  • Create another project with Studio, with exactly the same project name, project id and root package.
  • Copy from fresh project to the existing project with entities the following files: changelog.xml, 010-init-user.xml, to corresponding locations.

For our information, what is the database type in your project, and what was the column data type? We will try to reproduce the problem.

There is an action “Recreate database” in the context menu of the Main Data Store in Jmix tool window. However this action doesn’t re-generate Liquibase scripts from scratch.
Note that in the case of the Liquibase Update error - the library prints the number of the failed XML changeset to console. You can find corresponding changeset in the XML files and manually fix or just delete that corresponding changeset, not all files. Jmix and Studio don’t hide from you the mechanism of the database migration and contents of the database migration scripts, so sometimes you need to navigate there and examine / alter their contents.

In the real-world applications developers usually use the Version Control system such as Git. It allows developer to to view local changes made during today’s coding session and to easily rollback any unintentional or corrupting changes.
Also please note that IntelliJ IDEA has the mechanism of the Local History, that allows you to rollback any changes in the project even without VCS: