Version: Platform 1.11.5 (upgrading from 1.9.3)
I updated my openmrs installation 1.9.3 to the latest version 1.11.5.
Now, when trying to access a patient from the tile “Find patient record”, I am getting this error message:
java.lang.IllegalStateException: Couldn't find primary concept for DiagnosisMetadata which should be mapped as org.openmrs.module.emrapi:Diagnosis Concept Set
I noticed that the reference metadata module is not running, but when trying to start it I get an error that the module could not be started (without additional error details).
Checking the server log reveals these errors:
ERROR - JDBCExceptionReporter.logExceptions(234) |2016-02-19 15:43:58,693|
Cannot delete or update a parent row: a foreign key constraint fails (`openmrs`.`concept`, CONSTRAINT `concept_classes` FOREIGN KEY (`class_id`) REFERENCES `concept_class` (`concept_class_id`))
ERROR - LoggingAdvice.invoke(135) |2016-02-19 15:43:58,707| An error occurred while executing this method.
Current user: admin
Error message: Could not execute JDBC batch update; SQL [delete from concept_class where concept_class_id=?]; constraint [null]; nested exception is org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update
When I remove the constraint ‘concept_class’ from table concept the SQL is executed sucsessfully. However, the reference metadata module still does not start and now the following related warnings/errors are shown under server log:
WARN - AbstractTableMetaData.getDataTypeFactory(166) |2016-02-19 15:53:40,760| Potential problem found: The configured data type factory 'class org.dbunit.dataset.datatype.DefaultDataTypeFactory' might cause problems with the current database 'MySQL' (e.g. some datatypes may not be supported properly). In rare cases you might see this message because the list of supported database products is incomplete (list=[derby]). If so please request a java-class update via the forums.If you are using your own IDataTypeFactory extending DefaultDataTypeFactory, ensure that you override getValidDbProducts() to specify the supported database products.
WARN - ModuleUtil.refreshApplicationContext(879) |2016-02-19 15:53:40,793| Unable to invoke started() method on the module's activator
ERROR - CommonsLoggingOutput.error(75) |2016-02-19 15:53:40,881| Line=113 The content of element type "dwr" must match "(init?,allow?,signatures?)".
ERROR - CommonsLoggingOutput.error(75) |2016-02-19 15:53:40,882| Parameter mismatch parsing signatures section in dwr.xml on line: DWRAtlasService.disableAtlasModule()
ERROR - CommonsLoggingOutput.error(75) |2016-02-19 15:53:40,883| Parameter mismatch parsing signatures section in dwr.xml on line: DWRHtmlFormEntryService.checkIfLoggedIn()
ERROR - CommonsLoggingOutput.error(75) |2016-02-19 15:53:40,895| Parameter mismatch parsing signatures section in dwr.xml on line: DWREncounterService.findEncounters(String phrase, Integer patientId, boolean includeVoided)
When trying to access a patient now I am getting a ‘no encounter type with uuid’ error.
I checked my db encoding as suggested in this thread and checked that my openmrs db and all it’s tables have utf8 encoding:
I also tried restarting the server and using other versions of the reference metadata module (2.3, 2.1.1), but to no avail.