Demo Data global property doesn't seem to do anything

Application Name: OpenMRS 2.6.1 Standalone Version Number: 2.6.1

Question: I’m brand new to OpenMRS. I have it installed on a Windows 2012 R2 server. The install seems to go fine, the front-end and back-end are accessible. I am trying to generate additional demo data, which I understand I need to change this global property: referencedemodata.createDemoPatientsOnNextStartup = x, replacing ‘x’ with the number of patients I want to create. I change that value from the GUI (system admin). I then restart by selecting File–>Quit on the console app and then double clicking on the .jar again. When it restarts, I seem to get only 1 more patient in the patient table than the prior run no matter what value I set the global property to.

Few questions:

  1. What is the proper way to restart the OpenMRS? Is it File–>Quit and then double click on the jar again?
  2. If I set the referencedemodata.createDemoPatientsOnNextStartup = 250 for example, should I expect to see 250 patients in the patient table after it boots up?
  3. If the answer to (2) is yes, then what could I be doing wrong?

Thanks for any help!!!

Is the referencedemodata module started and running? There could be errors while trying to generate the patients. Can you paste the contents of your log file at

Should be in the tomcat/logs folder

Thanks for the reply Daniel. The module is unloaded at start, when I load it from the web app admin pages, it appears to throw some errors. The log contents are here

Specifically I see an error “java.lang.IndexOutOfBoundsException: Index: 0, Size: 0”

at org.openmrs.module.referencedemodata.ReferenceDemoDataActivator.createDiagnosisObsGroup(
at org.openmrs.module.referencedemodata.ReferenceDemoDataActivator.createVisitNote(
at org.openmrs.module.referencedemodata.ReferenceDemoDataActivator.createDemoVisit(
at org.openmrs.module.referencedemodata.ReferenceDemoDataActivator.createDemoPatient(
at org.openmrs.module.referencedemodata.ReferenceDemoDataActivator.createDemoPatients(

When you did run it for the first time, which setup option did you choose? If you do not remember, you can just delete the unzipped standalone folder, then extract the original zip again and run.

I select the “demo mode” option. I’ve run through the install twice now with the same results. I did exactly what you mentioned, I deleted the folder then re-installed.

Should the referencedemodata module load automatically on initial install (should not require user starting the module)?

Just as a sanity check, are you able to reproduce this with the standalone version of the reference application verson 2.5.0?

Hi Daniel,

Thank you for the reply. I can try that. I think you mean 2.0.5 and not 2.5.0. I installed that but it doesn’t come with a UI. Do I use the legacy with that (version 1.3.2)?


I mean reference application 2.5.0

Hi Daniel, do you have a link to that?

I don’t see it on the downloads page nor in the prior releases.

I see a standalone 2.5.0 and a ReferenceApplication 2.6.0.

Pick one from here that has standalone in its name:

I ran the 2.5 standalone but the UI is not functional. 2.5 comes bundled with the “legacyui1.2.3” module in the modules folder, and reviewing the tomcat log, I see it load with no error, but launching the browser takes you too the “you’re seeing this because…” page. Is there a trick to getting the UI to load?

Did you download it from the link i gave above? If yes, do you see any modules in the appdata folder?

Hi Daniel, I did. I can see one problem that is blocking me now from moving forward. As mentioned I had earlier installed the 2.0.5, my mistake thinking that is the one you were referring to. It looks like that version installs something somewhere that is not deleted when you delete the folder. I have deleted the 2.0.5 folder but now when I try to install/launch ANY other version, I am greeted with this:

OpenMRS Platform Running!

If you are seeing this page, it means that the OpenMRS Platform is running successfully, but no user interface module is installed. Learn about the available User Interface Modules

How do I clean my system of 2.0.5? I’ll start another thread on how to clean the system after a 2.0.5 install.


I have the same problem. It looks like there’s an error with the concept service finding multiple concepts when this line is run in the module activator.

Tomcat Log:

WARN - HibernateConceptDAO.getConceptByName(1713) |2017-11-28 20:47:20,751| Multiple concepts found for ‘Height (cm)’

WARN - ReferenceDemoDataActivator.createBasicObs(593) |2017-11-28 20:47:20,755| incorrect concept name? Height (cm)

WARN - ModuleUtil.refreshApplicationContext(889) |2017-11-28 20:47:20,766| Unable to invoke started() method on the module’s activator org.openmrs.api.ValidationException: ‘obs id is null’ failed to validate with reason: concept: Cannot be empty or null at org.openmrs.validator.ValidateUtil.validate( at org.openmrs.aop.RequiredDataAdvice.before( at org.springframework.aop.framework.adapter.MethodBeforeAdviceInterceptor.invoke( at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed( at org.springframework.aop.framework.adapter.MethodBeforeAdviceInterceptor.invoke( at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed( at org.springframework.aop.framework.JdkDynamicAopProxy.invoke( at com.sun.proxy.$Proxy156.saveObs(Unknown Source) at org.openmrs.module.referencedemodata.ReferenceDemoDataActivator.createNumericObs( at org.openmrs.module.referencedemodata.ReferenceDemoDataActivator.createDemoVitalsObs( at org.openmrs.module.referencedemodata.ReferenceDemoDataActivator.createDemoVitalsEncounter( at org.openmrs.module.referencedemodata.ReferenceDemoDataActivator.createDemoVisit( at org.openmrs.module.referencedemodata.ReferenceDemoDataActivator.createDemoPatient( at org.openmrs.module.referencedemodata.ReferenceDemoDataActivator.createDemoPatients( at org.openmrs.module.referencedemodata.ReferenceDemoDataActivator.started( at org.openmrs.module.ModuleUtil.refreshApplicationContext( at org.openmrs.module.web.WebModuleUtil.refreshWAC( at org.openmrs.web.Listener.performWebStartOfModules( at org.openmrs.web.Listener.performWebStartOfModules( at org.openmrs.web.Listener.startOpenmrs( at org.openmrs.web.WebDaemon$

I searched the concept_name table and found:

mysql> mysql> select concept_name_id, concept_id, name, locale, date_created, concept_name_type, voided, voided_by, date_voided from concept_name where name like ‘Height%’;

I’m not sure if these are duplicate entries or if something changed in the conceptService.

I should also note that I loaded in the latest CIEL dictionary and this isn’t a problem. Only one Concept_name “Height (cm)” shows up with the same query. I dug around and see that the referencemetadata module loads in the concept_name_id 2194. Maybe the other one is loaded by another module or a liquibase activity somewhere.

@craigappl these look like duplicate entries.