Kate, I have areas to learn and grow and I believe it’s a normal part of everyone’s journey and I believe its an opportunity for our personal and professional growth but working together to fill those gaps will help us achieve success as a team. Never give up dear!
It’s likely an issue with Apple Silicon. It seems the default version of Java on your system is AArch64, which means its a build for M1 / M2 / M3 and not Intel any more. Sorry, but I’m not entirely sure how to fix that…
@katesherry are you able to run it with? Rosetta 2
Hello @dkayiwa @jwnasambu @ibacher. Thanks for the feedback. Running into the same issue with My MacBook Air M1, 2020 and the standalone-2.5.0 (my old IBM Thinkpad just gave up the ghost a few weeks back after a decade and a half of great service). I haven’t used Rosetta in many, many years. However, I will give it a go, and update the thread either way.
So, Rosetta 2 gets installed automatically when Mac OS identifies the application attempted to be opened needs it for execution. openmrs-standalone.jar never triggered Rosetta 2 installation.
Therefore I took the approach similar to @katesherry and installed Java for ARM after removing my previously installed x64 version. Still I got java.util.MissingResourceException: Resource '5-5-9/Mac_OS_X-aarch64/mysqld
not found. So, I updated:
openmrs-standalone-2.5.0/database/bin/
(which contains mysql
and mysqld
by default*) to
openmrs-standalone-2.5.0/database/bin/5-5-9/Mac_OS_X-aarch64/
(and placed mysql
and mysqld
there)
I still got the same resource error. Also with every installation attempt and permutation (e.g. simple to advanced), both mysql and mysqld executables would be gone thereafter, so I would have to pop them back in the /bin/…/…/ subdirectory with each attempt.
I even tried just creating a new database as an installation option, versus using the demo data. No luck. I will try finding out more about that missing resource (in case I have the path incorrect), as well as trying more recent standalone versions to see if this may have been addressed. I also may consider a non-Mac OS VM or cloud installation, if all else fails.
*default location
Oh sorry for the error! kindly do you mind sharing the error log on your terminal using pastebin please?
@ioluwoletech kindly have you confirmed the mysql
and mysqld
binaries are placed correctly within the OpenMRS directory structure. The correct directory should be:
openmrs-standalone-2.5.0/database/bin/5-5-9/Mac_OS_X-aarch64/
If they are not there, move the mysql
and mysqld
binaries to this directory:
mv /path/to/mysql /path/to/openmrs-standalone-2.5.0/database/bin/5-5-9/Mac_OS_X-aarch64/
mv /path/to/mysqld /path/to/openmrs-standalone-2.5.0/database/bin/5-5-9/Mac_OS_X-aarch64/
Besides, ensure you are using the correct Java version.
@jwnasambu below is the file structure and Java version and pastebin:
The error you’re encountering is due to the OpenMRS standalone application failing to create a connection to the MySQL database server. The specific issue is a MissingResourceException
indicating that a required MySQL resource (5-5-9/Mac_OS_X-aarch64/mysqld
) cannot be found. Here are some steps I thought could help resolve the issue though not sure since I haven’t experienced this problem before:
-
Ensure MySQL is properly installed on your machine by running this command
mysql --version
-
Verify MySQL connection details by openning the
openmrs-standalone-runtime.properties
file in your OpenMRS standalone directory. Ensure that the MySQL connection details (username, password, URL) are correct . This is an example of the configuration looks like:
connection.username=root
connection.password=Admin123
connection.url=jdbc:mysql://localhost:3306/openmrs
-
The error indicates a missing resource (
5-5-9/Mac_OS_X-aarch64/mysqld
). This might be due to the specific version or architecture not being supported. You may need to download the correct version of MySQL or configure OpenMRS to use an existing MySQL installation -
Try to update MySQL Configuration in OpenMRS by openning the
openmrs-standalone-runtime.properties
file and update theconnection.url
property to point to your MySQL server. -
This is funny! If the issue persists, you can downloading and reinstalling the OpenMRS standalone application. There might be a corrupted file or a bug in the current installation.
So, there is, unfortunately, no way to get the standalone running on Rosetta 2. Even if we could move the binaries around to an appropriate location, the binaries included in the MXJ Connector are 32-bit binaries and Rosetta 2 only supports 64-bit binaries.
Currently, the best substitute we have for the standalone is the Docker distribution of the RefApp.
@jwnasambu @ibacher I just wanted to circle back on this thread. I ended up going the openmrs.war route (version 2.6.1) and installed the stack (i.e. Apache Tomcat 9.0.90, MySQL [via homebrew], OpenMRS 2.6.1 [openmrs.war] + adding UI modules [.omod files] only) with an empty database, after a several false starts and blind alleys. So I can now start OpenMRS locally and login. Although, I have a bunch of module alerts I need to sort out. In any case, thank you both for your assistance.
If you download the Reference Applications Addons, it should have all the modules you need to get started.
Yes, I do have all the modules. Initially, I just put them all in the modules folder resulting in a bunch of exceptions and no startup. So I just started with the ui modules, an got to login, with the plan to add the rest of the modules thereafter. Just reading through a few alerts and I can see there are dependencies, which I have to work through.