I cloned the module from here https://github.com/seekme94/openmrs-module-commonlabtest/tree/beta the module build successfully with mvn clean install command.
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
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.
@owais.hussain @tahira @dkayiwa @shujaat @ahmed14 your help will be highly appreciated.
@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.
okay @naveed1228 , try this for once ,
- delete Module from OpenMRS ,
- Delete Module from Modules folder also .
- drop all the tables having name “commonlab*”
- delete all the entries of CommonLab* from liquibasechangelog table .
- restart openMRS
- install omod file of the module.
See , if this works for you or not ?
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.
It’s not working @ahmed14.I try also with removing the directory as well.
@dkayiwa I have responded to your comment on git.