When i click in Database Update i get the next error: Task ‘updateDb’ failed, i see in the forum for resolve the error: Unexpected error
Please contact system administrator, i have to update the data base
Mysql 5.6 Community:
com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry ‘10-cuba/update/mysql/16/160405-createUniqSysCategory.sql’ for key ‘PRIMARY’
Unexpected error:
2017-02-03 17:24:23.063 ERROR [http-nio-8080-exec-21] com.haulmont.cuba.web.AppUI - Unable to init ui
com.haulmont.cuba.security.global.LoginFailedException: Unable to obtain anonymous session with id 652d9283-af10-47c5-bdfc-e69cd7760093
It seems that you have created the project on the platform version 6.2 (or earlier) and then migrated it to 6.4. The updateDb task fails after migration. Right?
Do you use custom application components?
Also, try to launch Build->Clean in Studio and make one more attempt to update the database.
Let me explain how the updateDb task works:
All the scripts are assembled in the ‘modules/core/build/db’ folder.
For the selected DBMS Gradle executes all scripts except those which are already registered in the sys_db_changelog table.
After the script execution new record appears in the sys_db_changelog table.
From your description, I assume that Gradle tries to register ‘10-cuba/update/mysql/16/160405-createUniqSysCategory.sql’ twice, for some unknown reason. So if the problem persists check the contents of the ‘modules/core/build/db/10-cuba/update/mysql/16’ folder and state of your DB and sys_db_changelog.