unable to install module reporting

Hi, I get an error installing module Reporting. When I try to upload this module from the application I get this error.

So i Manually placed it in the directory modules and restarted tomcat. I can see the module but i’am not able to start it.

Does anyone know a solution?

INFO - Slf4jLogger.info(42) |2021-04-29T12:50:37,894| CREATE INDEX report_definition_uuid_for_reporting_report_design ON openmrs.reporting_report_design(report_definition_uuid) ERROR - Slf4jLogger.severe(22) |2021-04-29T12:50:37,912| Change Set liquibase.xml::reporting_report_design_5::mseaton failed. Error: Key column ‘report_definition_uuid’ doesn’t exist in table [Failed SQL: (1072) CREATE INDEX report_definition_uuid_for_reporting_report_design ON openmrs.reporting_report_design(report_definition_uuid)] INFO - Slf4jLogger.info(42) |2021-04-29T12:50:37,914| Successfully released change log lock WARN - ModuleFactory.startModuleInternal(788) |2021-04-29T12:50:37,915| Error while trying to start module: reporting org.openmrs.module.ModuleException: Unable to update data model using liquibase.xml. Module: Reporting at org.openmrs.module.ModuleFactory.runLiquibase(ModuleFactory.java:997) ~[openmrs-api-2.4.0.jar:?] at org.openmrs.module.ModuleFactory.startModuleInternal(ModuleFactory.java:728) [openmrs-api-2.4.0.jar:?] at org.openmrs.api.context.Daemon$1.run(Daemon.java:80) [openmrs-api-2.4.0.jar:?] Caused by: liquibase.exception.MigrationFailedException: Migration failed for change set liquibase.xml::reporting_report_design_5::mseaton: Reason: liquibase.exception.DatabaseException: Key column ‘report_definition_uuid’ doesn’t exist in table [Failed SQL: (1072) CREATE INDEX report_definition_uuid_for_reporting_report_design ON openmrs.reporting_report_design(report_definition_uuid)] at liquibase.changelog.ChangeSet.execute(ChangeSet.java:659) ~[liquibase-core-3.10.2.jar:?] at liquibase.changelog.visitor.UpdateVisitor.visit(UpdateVisitor.java:53) ~[liquibase-core-3.10.2.jar:?] at org.openmrs.util.DatabaseUpdater$OpenmrsUpdateVisitor.visit(DatabaseUpdater.java:850) ~[openmrs-api-2.4.0.jar:?] at liquibase.changelog.ChangeLogIterator.run(ChangeLogIterator.java:97) ~[liquibase-core-3.10.2.jar:?] at org.openmrs.util.DatabaseUpdater.executeChangelog(DatabaseUpdater.java:232) ~[openmrs-api-2.4.0.jar:?] at org.openmrs.module.ModuleFactory.runLiquibase(ModuleFactory.java:989) ~[openmrs-api-2.4.0.jar:?] … 2 more Caused by: liquibase.exception.DatabaseException: Key column ‘report_definition_uuid’ doesn’t exist in table [Failed SQL: (1072) CREATE INDEX report_definition_uuid_for_reporting_report_design ON openmrs.reporting_report_design(report_definition_uuid)] at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:430) ~[liquibase-core-3.10.2.jar:?] at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:87) ~[liquibase-core-3.10.2.jar:?] at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:159) ~[liquibase-core-3.10.2.jar:?] at liquibase.database.AbstractJdbcDatabase.execute(AbstractJdbcDatabase.java:1276) ~[liquibase-core-3.10.2.jar:?] at liquibase.database.AbstractJdbcDatabase.executeStatements(AbstractJdbcDatabase.java:1258) ~[liquibase-core-3.10.2.jar:?] at liquibase.changelog.ChangeSet.execute(ChangeSet.java:622) ~[liquibase-core-3.10.2.jar:?] at liquibase.changelog.visitor.UpdateVisitor.visit(UpdateVisitor.java:53) ~[liquibase-core-3.10.2.jar:?] at org.openmrs.util.DatabaseUpdater$OpenmrsUpdateVisitor.visit(DatabaseUpdater.java:850) ~[openmrs-api-2.4.0.jar:?] at liquibase.changelog.ChangeLogIterator.run(ChangeLogIterator.java:97) ~[liquibase-core-3.10.2.jar:?] at org.openmrs.util.DatabaseUpdater.executeChangelog(DatabaseUpdater.java:232) ~[openmrs-api-2.4.0.jar:?] at org.openmrs.module.ModuleFactory.runLiquibase(ModuleFactory.java:989) ~[openmrs-api-2.4.0.jar:?] … 2 more Caused by: java.sql.SQLSyntaxErrorException: Key column ‘report_definition_uuid’ doesn’t exist in table at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:120) ~[mysql-connector-java-8.0.21.jar:8.0.21] at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97) ~[mysql-connector-java-8.0.21.jar:8.0.21] at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122) ~[mysql-connector-java-8.0.21.jar:8.0.21] at com.mysql.cj.jdbc.StatementImpl.executeInternal(StatementImpl.java:764) ~[mysql-connector-java-8.0.21.jar:8.0.21] at com.mysql.cj.jdbc.StatementImpl.execute(StatementImpl.java:648) ~[mysql-connector-java-8.0.21.jar:8.0.21] at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:426) ~[liquibase-core-3.10.2.jar:?] at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:87) ~[liquibase-core-3.10.2.jar:?] at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:159) ~[liquibase-core-3.10.2.jar:?] at liquibase.database.AbstractJdbcDatabase.execute(AbstractJdbcDatabase.java:1276) ~[liquibase-core-3.10.2.jar:?] at liquibase.database.AbstractJdbcDatabase.executeStatements(AbstractJdbcDatabase.java:1258) ~[liquibase-core-3.10.2.jar:?] at liquibase.changelog.ChangeSet.execute(ChangeSet.java:622) ~[liquibase-core-3.10.2.jar:?] at liquibase.changelog.visitor.UpdateVisitor.visit(UpdateVisitor.java:53) ~[liquibase-core-3.10.2.jar:?] at org.openmrs.util.DatabaseUpdater$OpenmrsUpdateVisitor.visit(DatabaseUpdater.java:850) ~[openmrs-api-2.4.0.jar:?] at liquibase.changelog.ChangeLogIterator.run(ChangeLogIterator.java:97) ~[liquibase-core-3.10.2.jar:?] at org.openmrs.util.DatabaseUpdater.executeChangelog(DatabaseUpdater.java:232) ~[openmrs-api-2.4.0.jar:?] at org.openmrs.module.ModuleFactory.runLiquibase(ModuleFactory.java:989) ~[openmrs-api-2.4.0.jar:?] … 2 more

helo @djpaulus

Caused by: liquibase.exception.MigrationFailedException: Migration failed for change set liquibase.xml::reporting_report_design_5::mseaton: Reason: liquibase.exception.DatabaseException: Key column ‘report_definition_uuid’ doesn’t exist in table is causing the problem here, what is the module version that your are trying to deploy on openmrs 2.4.0?

hi Cliff. I try Reporting 1.21.0 image

could you try building the module and deploy the snapshot 1.22.0-SNAPSHOT omod file

can you tell me where I can find that snapshot? 1.21.1 is the latest I can find

fork and clone it here and do a mven clean install to generate the omod file

reporting module depends needs the following modules

  1. HTML Widgets
  2. Serialization XStream
  3. Calculation

what openmrs version are you running? @djpaulus

hi Herbert

version 2.4 I installed these modules successfully

HTML Widgets 1.10.0 Serialization Xstream 0.2.14 Calculation 1.2.1

run a snap shot version of reporting module and see

as here from @gcliff

well, that will be a challenge. I never build a module before, i will try

Kindly feel free to use pastebin.com to share your error logs.

we created a new omod file and we still get the errors. See

What is the output of this command? describe reporting_report_design

Hi Daniel,

Thanks (again :slight_smile: ) for your help. This is the result of running this command in the openmrs database:

Is this a new database? Or an existing one that has patient data?

This is a new database. All patient data is synthetic, so we can synthesize it again with no problems.

In that case it is simpler if you just drop the database, delete the runtime properties file and do the installation again.

Hi Daniel,

Thanks for your reply. What do you mean by “do the installation again”? Which step or steps should we do again? Neither Davy nor I have root access to this machine, and we also don’t have admin rights for Tomcat. So some of the steps require emailing back and forth with the admins, who might not respond right away. Do you suspect that the problem is with the database, or with the application? I can do SQL, so if the problem is with the database then it might be easier to fix the database. I also notice that there is no owa directory in the OpenMRS home directory. I don’t have a working install with the latest version of OpenMRS, but in previous versions there’s always been both a /modules/ directory and an /owa/ directory. We had to create the modules directory by hand - do you think it would help if we also create an /owa/ directory before trying to install modules?

As an update: I tried simply adding the missing column to the reporting_report_design table (using OpenMRS Data Models to get the data type) and that seemed to work for getting the reporting module running. However, when I tried to install the reportingrest module, the system crashed (see HTTP Status 500 – Internal Server ErrorType Exception ReportMessage Erro - Pastebin.com ).

I tried removing the .omod file from the modules directory, but this did not bring the system back to a working state, so I put the .omod file back.

Any ideas of what to try next?