Wiki Spaces


Get Help from Others

Q&A: Ask OpenMRS
Discussion: OpenMRS Talk
Real-Time: IRC Chat | Slack


Page tree
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 15 Next »

"Error Could not acquire change log lock" when installing or running database updates

When running each database changeset update, liquibase creates a row in the database table liquibasechangeloglock to prevent other applications/jars/users from trying to run updates at the same time. If Tomcat or OpenMRS crashes while an update is running, then the row will not be removed (unlocked). So the next time you start up you will see this error.


  1. Clear out all rows in the libuibasechangeloglock table. With a command line SQL client, run one of the following two commands:
    truncate table liquibasechangeloglock;
    delete from liquibasechangeloglock;

    If you normally use a GUI client for MySQL, find the liquibasechangeloglock table and empty it.

  2. Restart OpenMRS (e.g., restart Tomcat) and load the page again.

OpenMRS modules and settings disappear and reappear on reboot

A default Windows install of OpenMRS places its modules and properties files in "%APPDATA%\OpenMRS\". Where "APPDATA" is the home directory Application Data folder of the user that is running Tomcat.

Chances are your install is like most Windows installs, so the OpenMRS folder will be "C:\Documents and Settings\Your Username\Application Data\OpenMRS\". It is often the case that this account is in the Administrators group. Some Windows installs also have a default (but hidden) Administrator account (username: administrator, password: none) which under some circumstances can be used by Tomcat. In this case, the OpenMRS will be looking for its modules in the "C:\Application Data\OpenMRS\" folder. It will not find them there and thus modules and settings will not be loaded.


These problems stem from Windows services being run under the Local System account of the machine on which they are installed. Configure the Apache Tomcat service to start under a specific user account rather than the default "Local System Account". This can be configured in the Services window in Control Panel, Administrative Tools. You should use the same user account when running the installer. 

OpenMRS will not start anymore. There are non-module files in the modules directory; derby.log and/or velocity.log

The BIRT Runtime creates various log files in the modules directory when the BIRT Module is stopped. OpenMRS won't start if there are non-modules in the modules directory. You may find a message in the event log similar to org.openmrs.module.ModuleException: Module file does not have the correct .omod file extension Module: derby.log

org.openmrs.module.ModuleException: Module file does not have the correct .omod file extension Module: velocity.log


Delete the files in the modules directory which aren't modules with an .omod extension. To prevent the derby.log from being created, delete the "org.apache.derby.core_10.1.2.1" directory, under the /birt-runtime-2_2_0/ReportEngine/plugins/ directory.

Some module pages throw java.lang.ClassNotFoundException

There is an incompatibility between OpenMRS and versions of Tomcat later than 6.0.29, that means that modules which rely on custom EL functions will throw this exception. If encountering such an issue you should check which version of Tomcat you are using and if necessary downgrade to 6.0.29.

  • No labels