@dkayiwa this makes sense now … Have used the lower version of MariaDB4j (3.1.0)
using MariaDB binaries 10.11.5
on a linux machine 20.4.6
using mysql jdbc url and driver
The persistent error was
???There was an error while updating the database to the latest. file: org/openmrs/liquibase/updates/liquibase-update-to-latest-2.0.x.xml. Error: liquibase.exception.LiquibaseException: Unable to execute change set: liquibase-update-to-latest.xml::20090402-1519-concept_map::bwolfe???
Unable to update the database. See server error logs for the full stacktrace.
After I clone the core , applied this changes to 20090402-1519-concept_map
changeset to check if concept_map
exists or else to skip this changeset and this solves the error
Initially was
After change
<changeSet id="20090402-1519-concept_map" author="bwolfe">
<preConditions onFail="MARK_RAN">
<and>
<tableExists tableName="concept_map"/>
<not><indexExists indexName="concept_map_uuid_index"/></not>
</and>
</preConditions>
<comment>Creating unique index on concept_map.uuid column</comment>
<createIndex tableName="concept_map" unique="true" indexName="concept_map_uuid_index">
<column name="uuid" />
</createIndex>
</changeSet>
This solves the liquidbase errors … and able to load all the Demostration mode, Ciel, and Expert mode
Note:
This does not bring the mariadb liquidbase warnings
INFO - Slf4JLogger.log(43) |2025-05-28T18:19:14,867| Marking ChangeSet: "liquibase-update-to-latest.xml::20090402-1516-program_workflow_state::bwolfe" as ran despite precondition failure due to onFail='MARK_RAN':
liquibase-update-to-latest.xml : DBMS Precondition failed: expected mysql, got mariadb
liquibase-update-to-latest.xml : DBMS Precondition failed: expected oracle, got mariadb
After Tried it on the Latest MariaDB (3.2.0) with M1 and M2+ chips support using Mariadb binaries 11.4.5
On a happy note this when i use the updated packaged war file, this also is able to load the home page without errors
However in the logs Initial configuration neededDeleting active databaseUnzipping database from - Pastebin.com these warnings still remain
java.sql.SQLSyntaxErrorException: Unknown column 'RESERVED' in 'WHERE'
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:120) ~[mysql-connector-java-8.0.30.jar:?]
at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122) ~[mysql-connector-java-8.0.30.jar:?]
at com.mysql.cj.jdbc.StatementImpl.executeQuery(StatementImpl.java:1200) ~[mysql-connector-java-8.0.30.jar:?]
at com.mysql.cj.jdbc.DatabaseMetaDataUsingInfoSchema.getSQLKeywords(DatabaseMetaDataUsingInfoSchema.java:1194) ~[mysql-connector-java-8.0.30.jar:?]
at liquibase.database.jvm.JdbcConnection.attached(JdbcConnection.java:57) [liquibase-core-4.31.1.jar:?]
at liquibase.database.AbstractJdbcDatabase.setConnection(AbstractJdbcDatabase.java:162) [liquibase-core-4.31.1.jar:?]
at liquibase.database.DatabaseFactory.findCorrectDatabaseImplementation(DatabaseFactory.java:133) [liquibase-core-4.31.1.jar:?]
Which was also happening on the distro side (tried out with same mariadb version 11.4.5)
cc @dkayiwa @wikumc Should I create a ticket and a pull request for this fix on the Core side? (liquidbase failures on standalone)