Users and roles overwritten on Tomcat restart

OpenMRS Platform 1.11.5 OpenMRS Reference Application 2.3.1

I have reproduced this on a Ubuntu laptop and on an AWS installation. For the latter, I actually re-installed everything and dropped the openmrs schema. Same problem.

  1. Install the Platform (no to demo data, yes to database updates)
  2. Copy the Reference Application modules
  3. Restart Tomcat
  4. Change the name of John Smith -> Medical Doctor
  5. Logout and login (name remains Medical Doctor)
  6. Restart Tomcat
  7. Name is back to John Smith

This also happens if I try to change a role that is bundled with the Reference Application. Users and roles (and likely other data) is being re-applied on Tomcat restart. My hunch is that Liquibase cannot detect that it has already applied the relevant change(s).

The installations are as vanilla as can be. No modules added other than those bundled with the reference application. I installed using the platform WAR and modules separately. Using JDK 7, Tomcat 6 and MySQL.


You need to disable/remove the Reference Demo Data module (because that’s what sets up this demo data on server startup).

Thanks so much for the quick response. I will do so tonight when I get home and let you know if that works.

BTW, I think it would be good to update the install Wiki to include this as a final step.

1 Like

Indeed it would! Would you like to do this? :slightly_smiling:

(Actually, which is the wiki page whose instructions you were following?)

That did the trick. Thanks!

Will happily update the Wiki. One other thing I found confusing was that the default implementation instructions are for 1.0, but most users will download the reference application. I will link to those instructions on that page as well if that is okay with you.

Thanks again, Saish

1 Like

@saish, just to check, which instruction page are you talking about, and how did you get there? (I agree that we are in a bad place as far as clearly distinguishing between 1.x and 2.x instructions, and helping people find the right ones.)


If I were already familiar with web app development, and the Java and Tomcat stacks in particular, I would navigate to something like:

First visit: Decide I want to experiment:

Now, I am confronted with several choices. Here I think the Wiki is muddled. There are multiple locations where you can download the standalone WAR. The categories themselves are a bit confusing, and there is no call-out at all that if you want to use the Reference Application (which by now is probably the default, that you have to do additional work). If this page could be reorganized, I think it would go:

— Proposed new Download page ----

New to OpenMRS? Want to test drive the features? Visit for our online demonstrations.


Want to install OpenMRS on your own server? If yes, please be aware that there are two versions: a standalone version for testing and a production version (see below) for installation at an actual site. Download a self-contained complete system at

Instructions for how to install the standalone addition are found here: [need link]


If you are planning to deploy to production, there are two components: the base platform (a standalone WAR) and the Reference Application (a collection of OpenMRS modules deployed to the base platform).

You must always install at least the base platform. This will include a limited user interface that you can customize and extend to your exact needs. Many sites will also prefer to have standard features to register patients, record vitals, enter visit notes, etc. The Reference Application contains these base features with an intuitive and extendable user interface.

Note the standalone application contains the Reference Application as do the online demos. The production ready downloads assume you have an application server (typically Tomcat or Jetty) as well as a relational database (typically MySQL) that you will set up per the installation instructions. You also have the option to host OpenMRS in the cloud (such as on AWS or bundled as a Docker container).

Download the base platform here:

Instructions for installing the base platform are here:

Download the Reference Application here:

Instructions for installing the Reference application are here:

Remember that the base platform must be completely installed before you proceed to install the modules in the Reference Application.

Confused or need help? Visit for answers to your questions on our Forums.

Welcome to OpenMRS!

— End of Download Page —

Then there is general confusion on where to link for installation. IMO, it would make sense to have “Install” as a top level item on itself. Ideally, the “Download” menu option would have two items: Get Open MRS for Free and Installation Instructions.

The installation instructions could still be on the Wiki, but there would be three sections:

  • Installing the standalone version
  • Install the Base Platform
  • Install the Reference Application

The standalone version page should have a very prominent warning at the top “not for production use”. And then link to the Base Platform instructions for those interested in a full installation. The “Base Platform” page should have at the top a prominent warning that a more modern UI with more base features exists in the “Reference Application”, as well as a prominent reminder that the base platform must be installed first. Finally, the Reference Application page should have a very prominent warning that the base platform installation must be completed first.

Last item, which relates to my original question, the Reference Application should have a step whereby the demo data module is deleted and the application server restarted. (Alternatively, it would be better to just have a global property or something the user could set that would disable reloading by the demo module so uses don’t have to muck with the filesystem and restart). I think the base behavior should be to just load the data once, and then set a flag if the user wants to reload the old data, which would reset the flag again once the server re-applies the reference application data. This might also be nice when upgrading reference applications to a new version (i.e., don’t wipe out user data unless the flag is set, perhaps with a warning on screen that new data is available in this version of the reference application).

That’s a mouthful. Happy to do some of the edits described above. Let me know what you think.

Thanks, Saish

1 Like