This project aims at replacing OpenMRS Standalone version due to outdated technology and lack of support. A new version, compatible with Java 17 and supporting OpenMRS 2.x, 3.x, and Core Platform 2.7.x/2.8.x, will be built on M1/M2 MacBooks.
I’ll use this thread to give updates and discuss the project.
Am facing the issue of the platform versions 2.4+ war file with also mariadb 11.4.5 running into maintainance mode when configured with Tomcat version 7.0.109 which i believe this misbehaving issue is due to
the mention here by @ibacher from Platform 2.4+ and Tomcat
cc @ibacher@wikumc@dkayiwa what could be your suggestions should i go ahead with the newer tomcat versions and what could be the right version?
Also to NOTE: no error logs are showed if i go with the demo Standalone data however Ui turns to the maintanance mode page
which was successfully running without without the logs however seemed not supported by openmrs core since there was no connection to the database … on my small investigation saw that openmrs core expects jdbc connections with MySQL and H2 databases
For references after discussions here Support MariaDB JDBC url and MariaDB driver and more from the Platform calls
Have managed to make the demonstration to work…(this mode comes with pre-installed Demo Database)
All along Was thinking it was core issue yet it just needed a keen follow-up in the flow of pom steps (modules)
here are the screenshots of the working demonstration tested on linux and mac
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.
Solution
To resolve this:
I switched to using the Liquibase Maven plugin to ensure all database changesets were applied correctly during the build process.
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.
One important thing to note is that changesets with dbms="mysql" (or other specific dbms attributes such as oracle) are actually skipped when Liquibase detects that the current dbms is MariaDB. This behavior shows up in the logs, for example:
[INFO] Marking ChangeSet: liquibase-update-to-latest.xml::201610042145-2.1::vshankar ran despite precondition failure due to onFail='MARK_RAN':
liquibase-update-to-latest-from-1.9.x.xml : DBMS Precondition failed: expected mysql, got mariadb
liquibase-update-to-latest-from-1.9.x.xml : DBMS Precondition failed: expected oracle, got mariadb
This means that Liquibase recognizes that the dbms attribute is set to mysql, but since the runtime DBMS is MariaDB, the precondition fails and—depending on the onFail behavior (like MARK_RAN)—the changeset is skipped or marked as executed without being run. as can be seen here Quote from “Preconditions”