This error occurs when the OpenSpecimen process was killed (explicitly) during its bootstrap routine. As a result, OpenSpecimen doesn't get a chance to free the lock that it acquired during the schema update process.

Given below are the steps to solve the problem:

  1. Ensure OpenSpecimen (Tomcat) process is completely stopped.
  2. Login to the OpenSpecimen database and execute the below DML command to clear the schema lock

    delete from databasechangeloglock;
    commit;


  3. Start OpenSpecimen (Tomcat).