I’ve searched through the demo-data file and as far as I can see there are no duplicates, so I’m lost as to what is causing this. Any help is really appreciated.
I’m trying to install OpenMRS-core, during the install I chose Reference Application 2.11.0. I’m working on Ubuntu 20.04 and have MySQL 5.7 installed. I checked all dependencies against the release notes and I (should) have the correct versions.
In the attachment you can find all steps that I go through from a fresh installation of Ubuntu 20.04. During installation of OpenMRS (in the browser, providing I even get that far without tests crashing), I choose simple install and add demo data. It then gives the error as described before.
Yesterday I managed to install a version of OpenMRS under subideal circumstances. I had to skip all tests and I couldn’t add demo data.
(the part in italics is because another process tends to run on port 8080 and changing the port during installation results in it still running on 8080)
install guide.docx (15.2 KB)
There was an error while updating the database to the latest. file: liquibase-demo-data.xml. Error: Migration failed for change set liquibase-schema-only.xml::1226412230538-11::ben (generated): Reason: liquibase.exception.DatabaseException: Duplicate entry 'concepts.locked' for key 'global_property.PRIMARY' [Failed SQL: (1062) INSERT INTO openmrs.global_property (property, property_value, `description`, uuid) VALUES ('concepts.locked', 'false', 'true/false whether or not concepts can be edited in this database.', 'c97cc1a7-7e03-43b1-892c-385d1b621017')] See the error log for more details
Here is the stacktrace:
WARN - InitializationFilter$InitializationCompletion$1.run(1667) |2021-06-19T10:50:01,604| Error while trying to add demo data
org.openmrs.util.DatabaseUpdateException: There was an error while updating the database to the latest. file: liquibase-demo-data.xml. Error: Migration failed for change set liquibase-schema-only.xml::1226412230538-11::ben (generated):
Reason: liquibase.exception.DatabaseException: Duplicate entry 'concepts.locked' for key 'global_property.PRIMARY' [Failed SQL: (1062) INSERT INTO openmrs.global_property (property, property_value, `description`, uuid) VALUES ('concepts.locked', 'false', 'true/false whether or not concepts can be edited in this database.', 'c97cc1a7-7e03-43b1-892c-385d1b621017')]
at org.openmrs.util.DatabaseUpdater.executeChangelog(DatabaseUpdater.java:189) ~[classes/:?]
at org.openmrs.web.filter.initialization.InitializationFilter$InitializationCompletion$1.run(InitializationFilter.java:1658) [classes/:?]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_291]
Caused by: liquibase.exception.MigrationFailedException: Migration failed for change set liquibase-schema-only.xml::1226412230538-11::ben (generated):
Reason: liquibase.exception.DatabaseException: Duplicate entry 'concepts.locked' for key 'global_property.PRIMARY' [Failed SQL: (1062) INSERT INTO openmrs.global_property (property, property_value, `description`, uuid) VALUES ('concepts.locked', 'false', 'true/false whether or not concepts can be edited in this database.', 'c97cc1a7-7e03-43b1-892c-385d1b621017')]
at liquibase.changelog.ChangeSet.execute(ChangeSet.java:659) ~[liquibase-core-3.10.3.jar:?]
at liquibase.changelog.visitor.UpdateVisitor.visit(UpdateVisitor.java:53) ~[liquibase-core-3.10.3.jar:?]
at org.openmrs.util.DatabaseUpdater$OpenmrsUpdateVisitor.visit(DatabaseUpdater.java:850) ~[classes/:?]
at liquibase.changelog.ChangeLogIterator.run(ChangeLogIterator.java:97) ~[liquibase-core-3.10.3.jar:?]
at org.openmrs.util.DatabaseUpdater.executeChangelog(DatabaseUpdater.java:232) ~[classes/:?]
at org.openmrs.util.DatabaseUpdater.executeChangelog(DatabaseUpdater.java:185) ~[classes/:?]
... 2 more
Caused by: liquibase.exception.DatabaseException: Duplicate entry 'concepts.locked' for key 'global_property.PRIMARY' [Failed SQL: (1062) INSERT INTO openmrs.global_property (property, property_value, `description`, uuid) VALUES ('concepts.locked', 'false', 'true/false whether or not concepts can be edited in this database.', 'c97cc1a7-7e03-43b1-892c-385d1b621017')]
at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:430) ~[liquibase-core-3.10.3.jar:?]
at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:87) ~[liquibase-core-3.10.3.jar:?]
at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:159) ~[liquibase-core-3.10.3.jar:?]
at liquibase.database.AbstractJdbcDatabase.execute(AbstractJdbcDatabase.java:1276) ~[liquibase-core-3.10.3.jar:?]
at liquibase.database.AbstractJdbcDatabase.executeStatements(AbstractJdbcDatabase.java:1258) ~[liquibase-core-3.10.3.jar:?]
at liquibase.changelog.ChangeSet.execute(ChangeSet.java:622) ~[liquibase-core-3.10.3.jar:?]
at liquibase.changelog.visitor.UpdateVisitor.visit(UpdateVisitor.java:53) ~[liquibase-core-3.10.3.jar:?]
at org.openmrs.util.DatabaseUpdater$OpenmrsUpdateVisitor.visit(DatabaseUpdater.java:850) ~[classes/:?]
at liquibase.changelog.ChangeLogIterator.run(ChangeLogIterator.java:97) ~[liquibase-core-3.10.3.jar:?]
at org.openmrs.util.DatabaseUpdater.executeChangelog(DatabaseUpdater.java:232) ~[classes/:?]
at org.openmrs.util.DatabaseUpdater.executeChangelog(DatabaseUpdater.java:185) ~[classes/:?]
... 2 more
Caused by: java.sql.SQLIntegrityConstraintViolationException: Duplicate entry 'concepts.locked' for key 'global_property.PRIMARY'
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:117) ~[mysql-connector-java-8.0.22.jar:8.0.22]
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97) ~[mysql-connector-java-8.0.22.jar:8.0.22]
at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122) ~[mysql-connector-java-8.0.22.jar:8.0.22]
at com.mysql.cj.jdbc.StatementImpl.executeInternal(StatementImpl.java:764) ~[mysql-connector-java-8.0.22.jar:8.0.22]
at com.mysql.cj.jdbc.StatementImpl.execute(StatementImpl.java:648) ~[mysql-connector-java-8.0.22.jar:8.0.22]
at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:426) ~[liquibase-core-3.10.3.jar:?]
at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:87) ~[liquibase-core-3.10.3.jar:?]
at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:159) ~[liquibase-core-3.10.3.jar:?]
at liquibase.database.AbstractJdbcDatabase.execute(AbstractJdbcDatabase.java:1276) ~[liquibase-core-3.10.3.jar:?]
at liquibase.database.AbstractJdbcDatabase.executeStatements(AbstractJdbcDatabase.java:1258) ~[liquibase-core-3.10.3.jar:?]
at liquibase.changelog.ChangeSet.execute(ChangeSet.java:622) ~[liquibase-core-3.10.3.jar:?]
at liquibase.changelog.visitor.UpdateVisitor.visit(UpdateVisitor.java:53) ~[liquibase-core-3.10.3.jar:?]
at org.openmrs.util.DatabaseUpdater$OpenmrsUpdateVisitor.visit(DatabaseUpdater.java:850) ~[classes/:?]
at liquibase.changelog.ChangeLogIterator.run(ChangeLogIterator.java:97) ~[liquibase-core-3.10.3.jar:?]
at org.openmrs.util.DatabaseUpdater.executeChangelog(DatabaseUpdater.java:232) ~[classes/:?]
at org.openmrs.util.DatabaseUpdater.executeChangelog(DatabaseUpdater.java:185) ~[classes/:?]
... 2 more
@dkayiwa It is 2.12.0, I copied the modules got from the SDK, tried with war from openmrs-core , working fine in local machine, but no luck in Ubuntu server environment, Thanks.
@dkayiwa Thanks for your help, previous error gone away, but there is another error showing nested exception is java.lang.NoClassDefFoundError: org/openmrs/ui/framework/page/PageRequest