I am working to get an instance of OpenMRS up and running for educational use here in Amsterdam. We are using OpenMRS 2.4.0 Build e4adbd . I keep encountering errors indicating that the database is not populated correctly - for example, there were no locations in the database, so I had to add some locations in order to log in. Right now I cannot create a visit; I get the error “requested type class org.openmrs.EncounterType of metadata term mapping 2569c296-7de8-4527-aa7f-a1683236eed5 refers to type org.openmrs.EncounterType$HibernateProxy$Q1UrRwyn” and I can see in the database that the table metadatamapping_metadata_term_mapping has an entry “org.openmrs.EncounterType” that contains this setting. Presumably, it refers to the UUID of something that isn’t there.
Can I get a mysqldump of a working installation to compare it with mine, so I can try to figure out what went wrong?
could you try a fresh installation of reff app using platform 2.4 and you can get the mysql dump from it
@ace can you try bumping up that version to 2.11 (the latest version), which will have fewer issues IMO
Thanks for this suggestion. We do not have root access to this machine so starting over with a fresh install is not an easy option and I’d rather not go that route if I can avoid it. However, if we can’t make the 2.4 installation work correctly, we will indeed start over with the older release.
I am trying exactly that on my own machine, but I’ve run into some hiccups in the install so I don’t have a working system yet. I was hoping someone would have a working install handy (e.g. the system at demo.openmrs.org) and would be able to do a mysqldump for me.
I’m working on making a fresh install of 2.4 on a machine where I have root access (to see if I can get things working there and use it to troubleshoot the install on the machine where I don’t have root access). Only the FHIR and OpenWebApps module loaded automatically, so I have been adding the other modules from the reference implementation one by one. I was able to add:
legacyui-1.8.0.omod (copied into the modules directory; everything else is added via the UI)
… but providermanagement-2.12.0.omod throws an error and won’t start:
Error while trying to start module
Unable to update data model using liquibase.xml. Module: Provider Management Module
(full error text in 2021-05-16 13:52:01,751 Thread-13 ERROR Unable to invoke factory method in class - Pastebin.com ).
The problem seems to be here: liquibase.xml::providermanagement-8::bgeVam was: 8:c9cba28768d4c5d2c70f71916d90bf5e but is now: 8:023f27b0a5c5993cca87d2bc131c0a8b ) … which is reminiscent of the database problems I’ve been noticing in the main installation. I can just change the value in the database so the test will pass (this is the value that’s in my old install from 2017), but I wonder if there’s a better way to address this problem?
The liquibase validation error that you are getting means that you are not doing a fresh installation with a brand new database. Are you able to drop the database and delete the runtime properties file to try again?
Hi @dkayiwa ,
Thanks (again…) for your help! This is a fresh install. Starting with no database didn’t work, but starting with a completely empty database named “openmrs” seems to work.
I dropped the database and started over. This time, the module providermanagement installed correctly, which gave me the idea that the modules already have to be in the modules directory when the database is created. So I copied all the .omod files from the reference implementation into the modules directory, wiped the database and the runtime_properties file, and ran the installer again. This seemed to do the trick, except for three modules:
The system starts with the legacy UI, and in the modules view I can see that these three modules are not running. Manually starting them does not work. Using the legacy UI modules interface, I removed all three and then tried installing referenceapplication-2.11.0.omod via the UI. This throws an error: HTTP Status 500 – Internal Server ErrorType Exception ReportMessage Requ - Pastebin.com .
Tomcat log is here: WARN - OpenmrsUtil.getRuntimePropertiesFilePathName(2138) |2021-05-17T08:49:25,3 - Pastebin.com
Restarting Tomcat brought the system back up, but the reference application still isn’t working. INFO - LoggingAdvice.invoke(117) |2021-05-17T09:19:11,923| In method Administrat - Pastebin.com
I followed those steps. OpenMRS did not start successfully: UI Framework ErrorRoot Errororg.openmrs.ui.framework.UiFrameworkException: - Pastebin.com .
I restarted Tomcat; this time OpenMRS came up but with the same 3 modules stopped as before.
I tried it again, this time clearing both the /modules/ and /owa/ folders before reinstalling openmrs. However, this didn’t seem to make any difference:
Error as seen in browser: UI Framework ErrorRoot Errororg.openmrs.ui.framework.UiFrameworkException: - Pastebin.com
Tomcat log, after restarting Tomcat: 17-May-2021 10:57:38.175 INFO [main] org.apache.catalina.core.StandardServer.awa - Pastebin.com
The same 3 modules are still stopped.
Thanks Daniel! That did the trick! Thanks for pointing out the other post… I tried searching but wasn’t using the right keywords. In case someone gets to this post by searching: the problem was that the installer did not successfully create the database, so I created the empty database by hand. However, when I created it, I did not specify a character set. What worked was:
CREATE database openmrs;
ALTER DATABASE openmrs CHARACTER SET utf8 COLLATE utf8_unicode_ci;
(Though I’m sure that can be done in a single CREATE statement instead.)
I then repeated the reinstall steps outlined by Daniel earlier in this thread.
Thanks again Daniel! The reference implementation now seems to be working on this box. I still need to get some of the other modules working, and then get it all working on the machine we’re using for the course, so I will probably have some more questions, but this is a big hurdle crossed! Thanks!