The module development is in two branches so I switch to local branch name(beta) and build the module again and upload it to reference application.The module is not starting and show this error “Error while trying to start module
Unable to update data model using liquibase.xml. Module: Common Lab Test“
The complete error log
https://pastebin.com/jM5c3PtK
The required version for this module was platform 2.1.2 so run that as well,but I’m getting the same error.
Please note on master branch it does not show any error.It’s uploaded successfully,but most updated code is in beta branch which is required so I need to build module from that branch.
@naveed1228 , first you should drop all the tables of commonlabmodule from the database. you can get the table which has name by “commonlab_” . Then you should also all the entries of commonlab in liquliquibasechangelog table .
Now your issue wil be resolved. This is because OpenMRS mantains the database change by liquibase and liquibase saves entries in liquibase table. So if you switch branches , there are some database changes different then in other branch that’s why you are encountering this issue . Hope this resolves the issues.
I try your approach several time but the error is keep coming.Just a brief what I’m doing currently.
1:I cloned the code then switch branch to beta build using mvn clean install.
2:I uploaded but it’s show the liquibase error.
3:I removed the five table of commonlabModule from DB and all entries from liquibaselogtable.
4:I removed the module and upload it again it does not start.When I hit start button the same error appear again.
Please try cleaning your tomcat work directory also.
We don’t necessarily need to drop all the module tables but since, this module is not in release environment therefore, module tables can be dropped to incorporate any new db changes that were made during development.