STAND-121: Improve Windows Compatibility and Safe Data Directory Reuse for Standalone Platform#78
Conversation
# Conflicts: # .github/workflows/standalone-ci.yml
| StandaloneUtil.resetConnectionPassword(); | ||
| StandaloneUtil.startupDatabaseToCreateDefaultUser(mySqlPort); | ||
| Context.updateSearchIndex(); | ||
| //Context.updateSearchIndex(); |
There was a problem hiding this comment.
commented out these because they are crushing on Windows yet passing on linux and mac
There was a problem hiding this comment.
Then why not completely remove?
There was a problem hiding this comment.
okay but this means the search Index will be updated by loading the war itself
There was a problem hiding this comment.
| import ch.vorburger.mariadb4j.DBConfigurationBuilder; | ||
|
|
||
| import java.io.File; | ||
|
|
There was a problem hiding this comment.
Can you document what this class is used for?
|
Did you test this on mac? |
|
cc @dkayiwa I think now this is ready for review |
|
@Muta-Jonathan can we also get rid of this error? |
|
@dkayiwa thats possible however need to support the driver for mariadb here However this means which fix will apply for 2.8 unless we include it also for 2.7 however that version is already out so the support will apply for 2.8.0 |
|
How would the fix look like? Do you have a pull request that i can review? |
|
Can we also have the standalone window include the version of the platform or reference application (O2, O3) that we are running? |
| } | ||
|
|
||
| String os = System.getProperty("os.name").toLowerCase(); | ||
| boolean isWindows = os.contains("win"); |
There was a problem hiding this comment.
Are you sure this is how we check for windows?
There was a problem hiding this comment.
oh yes only if there is better way i can look into it
|
By the way, how are we going to deal with the search index problem? Because the standalone's demo mode option runs with no data for patients and concepts. |
|
I am merging this because it fixes the windows problem. Let us fix the remaining issues using different tickets and pull requests. |
am gonna look into finding the better place to refresh it |
oh yes |
|
@Muta-Jonathan did you see this failure on linux? https://github.com/openmrs/openmrs-standalone/actions/runs/16427476389 |
|
oh yes Am wondering this passed locally and on PR but failing on merge |
|
let me tryto re-run it and see the output |


See https://openmrs.atlassian.net/browse/STAND-121
Description
This PR improves Windows support for the OpenMRS Standalone launcher by addressing issues related to MariaDB startup and file system behavior, particularly around data directory handling and platform-specific constraints.
It addresses On Windows, MariaDB startup fails with:
ERROR : Data directory ... is not empty. Only new or empty existing directories are accepted for --datadirScreen Record on Windows
2025-07-18.07-49-49.mp4
Screen Record on Linux
Screencast.from.18-07-25.10.20.40.webm
Screen Record on Mac m2 Chip
Screen.Recording.2025-07-18.at.11.38.59.AM.mov