I have started a local instance of openmrs with the reference application as per instructions outlined here:
Everything seems to run fine (I can log in, I get the admin dashboard), but when I click on the “Register a patient” button and load this page:
I get a UI Framework Error. Specifically: org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named ‘registrationapp.NameSupportCompatibility’ is defined. I have uploaded an image of the broken page.
Has anyone else run into this problem? Are there any resources on the wiki that would help troubleshooting this?
What version of the reference application and OpenMRS-core are you running?
Is the Name Phonetics module loaded?
-Darius (by phone)
I’m running openmrs-webapp 2.1.0-SNAPSHOT and Reference Application Distribution 2.6-SNAPSHOT. I pulled a completely fresh version of openmrs-core and openmrs-distro-referenceapplication from github last night to verify none of my local changes had caused the problem.
I can’t find any evidence that the Name Phonetics module is loaded (it does not appear at all in the manage modules page in the advanced admin panel).
I did notice that when I run the webapp with mvn jetty:run, one of the warnings throws a java runtime exception:
WARN - ModuleUtil.refreshApplicationContext(936) |2016-11-18 18:55:10,197| Unable to invoke started() method on the module's activator
java.lang.RuntimeException: java.sql.SQLException: Incorrect string value: '\xDA\xA9\xD8\xB3\xDB\x8C...' for column 'description' at row 1
This warning is followed by an error:
ERROR - AppFrameworkActivator.registerAppsAndExtensions(101) |2016-11-18 18:55:10,417| Error loading app framework. Some apps might not work.org.openmrs.module.appframework.factory.AppConfigurationLoaderFactory@5e801aa2
java.lang.IllegalStateException: App 'referenceapplication.registrationapp.registerPatient' says its an instanceOf 'registrationapp.registerPatient' but there is no AppTemplate with that id
I’m pretty sure this is what’s causing the problem, but I’m still not sure where to start with fixing it.
Thanks for taking the time to help!
EDIT: Given that there’s an SQL warning I should also mention that I have downgraded mysql to version 5.6 (the recommended version on the wiki).
If you are simply trying to setup a dev environment, why not give a go at the SDK?
The previous link points to a short guide for then latest Ref App 2.5-SNAPSHOT (it was before the 2.5 release). If you need the current latest (master branches of everything as they are now) you should just use 2.6-SNAPSHOT instead.
Please follow the link, and use the updated commands then:
mvn openmrs-sdk:help -U
mvn openmrs-sdk:setup -DserverId=distro-2-6 -Ddistro=referenceapplication:2.6-SNAPSHOT -DdbUri=jdbc:mysql://localhost:3306/openmrs_distro-2-6 -DdbUser=root -DdbPassword=pass
mvn openmrs-sdk:run -Dport=8080 -Ddebug=58080 -DserverId=distro-2-6
@isears Your problem has do with the character set and collation of your database. The expected character set is utf8 and collation is utf8_general_ci.
Once you change this then you need to setup OpenMRS again so that the data is saved correctly.
@ssmusoke: you were right about the character set. After running the following command in mysql and re-installing, the errors went away.
ALTER DATABASE openmrs CHARACTER SET utf8 COLLATE utf8_unicode_ci;
@mksd: Just installed the sdk and it seems to be more stable than my old setup. Looks like I’ll be using that from now on. Thanks for the link!
Just in case some body else lands on this thread with the same error of “java.lang.IllegalStateException: App ‘referenceapplication.registrationapp.registerPatient’ says its an instanceOf ‘registrationapp.registerPatient’ but there is no AppTemplate with that id”, what worked for me was simply upgrading the emrapi module to the latest version.