GSOC 2025: Replacing OpenMRS Standalone with a Modern, User-Friendly Alternative - Updates and Discussion

Indeed @mherman22, initially I encountered the following error:

java.sql.SQLSyntaxErrorException: Unknown column 'RESERVED' in 'WHERE'

This was due to using a newer version of MariaDB, where some reserved keywords or schema differences can cause SQL syntax issues—particularly with older queries or Liquibase changesets that haven’t accounted for MariaDB-specific behaviors. While this error also appears in the OpenMRS distro 3.x builds (even with MariaDB 11.4.5), it shows up as a warning there and doesn’t block the application from starting. The home page still loads correctly in that case.

However, when working with the OpenMRS Standalone project—especially in demonstration mode, which includes a pre-loaded demo database—I ran into deeper issues. Specifically, I saw errors like:

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

These errors were due to missing tables and Liquibase changesets failing to apply. The root cause was that I was pre-loading the database manually, without using the Maven plugins to trigger the appropriate Liquibase updates during build or runtime which i thought were core related.

:white_check_mark: Solution

To resolve this:

  1. I switched to using the Liquibase Maven plugin to ensure all database changesets were applied correctly during the build process.
  2. Some of the changesets in the standalone project were only tagged with dbms="mysql", which excludes MariaDB by default. I modified these to include dbms="mysql,mariadb" so that they apply cleanly regardless of whether MySQL or MariaDB is used.
  3. The warning Unknown column 'RESERVED' in 'WHERE' is still present and is related to reserved keywords that don’t align with newer MariaDB versions. For references @dkayiwa shared a solution here :link: GSOC 2025: Replacing OpenMRS Standalone with a Modern, User-Friendly Alternative - Updates and Discussion - #10 by dkayiwa. From which later I recommended the approach to ensure proper JDBC configuration, as described in this discussion: :backhand_index_pointing_right: Support MariaDB JDBC URL and MariaDB driver

I hope this sheds light on the root cause and the fix! :blush: