MySQL Database Engine
Be sure the MySQL database engine is running first.
If MySQL is not running, the following messages may appear on OpenMRS console log as well as in the Tomcat log file:
These errors may be related to MySQL Database startup.
There are multiple different versions of MySQL provided with the link given in the developer’s guide. It could be confusing for new developers.
The easiest way is to download using apt.
Be sure to download MySQL server instead of MySQL client.
War file deploys in Tomcat but it won't start OpenMRS
- Go to MySQL command line (accessible from Start menu)
Type the following lines and press Enter after each one:
- Go to C:\Documents and Settings\LocalService\Application Data\OpenMRS
- There should be a file there called OPENMRS-runtime.properties
In this file, ensure it says the following:
- Copy the file into C:\Documents and Settings\YOURUSERNAME\Application Data\OpenMRS where YOURUSERNAME is the name you use to log in to windows. This is in case Tomcat looks there instead of in LocalService.
Where to find your openmrs-runtime.properties
- Under C:\Documents and Settings\YOURUSERNAME\Application Data\OpenMRS
- Under C:\Windows\system32\config\systemprofile\Application Data\OpenMRS
- Under C:\Users\YOURUSERNAME\AppData\Roaming\OpenMRS
- Under /home/YOURUSERNAME/.OpenMRS
- Under /usr/share/tomcatX/.OpenMRS
For more troubleshooting tips see Troubleshooting Tomcat.
- Download the newest version of legacy UI.
- Find the legacy-version-SNAPSHOT.omod file
- Put it into the hidden folder ~/.OpenMRS/modules.
- Be sure to kill the previous operations running the webapp.
Clear the browser cache.
- Rerun the webapp using command:
The time taken for maven to compile could vary for different computers.
Kill the previous mvn clean install or mvn jetty: run every time you rerun maven. Otherwise, it might gives a following error indicating address already in use.
HTTP 500 error
After opening http://localhost:8080/openmrs in the web browser, you might encounter the following error.
Close the window and kill the prior operations.
Rerun mvn jetty:run in the webapp folder and it usually works.