Liquibase Error while Installing Inventory Module

OpenMRS Version: 1.11.4

Question: I am getting the following error when I try to install the inventory module via the web interface:

“Error while trying to start module Unable to update data model using liquibase.xml. Module: OpenHMIS Inventory Module”

I have referred this page : https://wiki.openmrs.org/display/docs/Liquibase+error+when+upgrading+the+module

When i ran the first query (to check for ‘?’) - i got 0 results - turns out there are no entries for ‘reporting_report_design’ table in the information schema

I have checked that my user - “root” has access to the INFORMATION_SCHEMA and openmrs db. I can also query the liquibase tables via workbench.

Overall - I have downloaded the openmrs war and am running it locally via tomcat and the small demo data set.

Could someone please help me out with potential solutions?

Offhand it sounds like you need to install the Reporting module first.

Hey,

Thanks for the response! I installed the reporting module and restarted tomcat but i’m still getting the same error and the query still returns empty. Anything else I can try please?

Hey - Found a fix.

Re-installed openmrs without the demo data and it worked. Not entirely sure why though.

Anyway - good to go for now.

Thanks everyone

1 Like

Hello, I am creating a new Drug Order module. I am trying to create a new table ‘drugorders’. I have updated by liquibase file and the DrugOrders.hbm.xml file and I see my config file updated with tag. I am getting the same error while uploading the module. I am working on OpenMRS 2.3

Could you please let me know what I am missing… I have followed the suggestion posted here but that didn’t help. Sorry, I am unable to locate the missing requirement.

files.pdf (3.7 KB)

Have included the Service and DAO files as well…

Upload the entire module on github for review.

Hello,

Thanks, Here it is https://github.com/HariniParth/drug2

@hariniparth can you paste the error you are getting at pastebin.com?

Only this much -

“Error while trying to start module Unable to update data model using liquibase.xml. Module: drugorders”

I don’t find any link / file where I can see the detailed error. Btw - I am able to see the table created when I upload it for the first time, but thereafter when I rebuild my module again, it fails…

What do you have in the tomcat logs?

Please check these - http://pastebin.com/sEkuXLd3

@hariniparth the root cause is: org.hibernate.PropertyNotFoundException: Could not find a getter for startdate in class org.openmrs.module.drugorders.drugorders

You do not have a getter for startdate as you can see here: https://github.com/HariniParth/drug2/blob/master/api/src/main/java/org/openmrs/module/drugorders/drugorders.java

You may also want to look at the naming conventions here: http://www.oracle.com/technetwork/java/codeconventions-135099.html

I had the get and set methods removed from comments before i got that error…but Thanks for the link on naming conventions - I see that I had got them wrong. However I still see the same error when I try to rebuild the next time

“Error while trying to start module Unable to update data model using liquibase.xml. Module: drugorders”

Since your variable name is startdate, then your getter should be getStartdate() instead of setStartDate()

Yes, I mean, I get that error even after modifying that

Did you make any changes to your hibernate mapping file? Commit all your changes.

Please check https://github.com/HariniParth/drug2 Thank you!

Assuming you have compiled and redeployed the new module, what error are you now getting?

It seems like it was the naming conventions of the Getters/Setters that was causing that issue. I added a few more columns according to my requirements yesterday and it still works fine. Thanks for the help!