I am trying to migrate metadata from my old Platform 1.9.3 to my newly installed Platform 1.11.5 using the Metadata Sharing Module. When importing a package I am always getting this error:
type Exception report
message org/openmrs/ConceptWord
description The server encountered an internal error that prevented it from fulfilling this request.
exception
java.lang.NoClassDefFoundError: org/openmrs/ConceptWord
I also tried importing metadata having Hibernate Compatibility Module installed, but it was still unsuccessful.
Both Metadata Mapping and Metadata Sharing modules are up to date in both installations.
Thank you very much everyone for your support. I have reported the issue in JIRA.
Originally, I was trying to upgrade my OpenMRS Platform 1.9.3 to the latest OpenMRS Platform 1.11.5, but encountered several problems which I posted in these topics:
Is there an alternative solution to migrate metadata to a new installation? Is there maybe also a way to transfer patient data (name, obs etc.) to a new installation?
I tried importing forms from 1.9.3 to 1.10.3. Some could not be imported, because of problems with particular concepts like āyesā or ānoā. I am getting errors like this when importing forms containing these concepts:
Caused by: org.openmrs.api.APIException: ā1067ā failed to validate with reason: Only one preferred name is allowed for each locale, Only one fully specifies name is allowed for each locale
Trying to (re)save the affected concept under dictionary, yields the same error. I checked the fully specified name and synonyms for each locale and can confirm that none are the same. The error also happens, if I choose āMerge (prefer mine)ā when importing.
Can you check the the preferred names? You should have only one per locale. It is possible that you have multiples for some language that you donāt even use.
select concept_name_id,name, locale,locale_preferred
from concept_name
where concept_id = 1067
order by locale;
There are same names for the locale āenā which are also both preferred ones. I deleted these entries (also deleting the respective entry from concept_word table). Now when trying to import a form which is using this concept, it still fails when it tries to save the respective concept without detailed exception specification. Trying to (re)save the concept under dictionary yields a āquery did not return unique result error: 2ā error.
I am using a freshly installed Platform 1.10.3 with the original, non-modified DB with demo data.
Sorry for your trouble. Is the error message still pointing to 1067? Is there some error in the catalina.out log file? Could you post the results of the mysql select for 1066 and 1067?
I could actually solve the problem for 1065 and 1066 by modifying the locale in the DB (changing it from āenā to āen_USā and āen_GBā respectively). The problem also occurs with 5087 (āpulseā). Changing locales in the DB in a similar way enables saving the concept in the dictionary, but during metadata import I am getting the āquery did not return a result: 2ā error.
I should have explained the rules better. Only 1 unvoided preferred name is allowed for each locale. Case doesnāt matter. I should have added the voided field to the query. Your results show 2 preferred names for āenā ā āUNKNOWNā and āUnknownā. Maybe one is already voided. 2 preferred names will not be validated during metadata sharing. Best to change the locale_preferred instead of changing the locale.
Try using this query to confirm voided status:
select concept_name_id,name, locale, locale_preferred
from concept_name
where concept_id = 1067
and voided = 0
order by locale;
Now when trying to save the concept under dictionary and also during metadata import, it does not complain about the preferred locale anymore, but still throws an error saying that only one fully specified name is allowed.
Changing the locale of āUnknownā to āen_GBā solves the problem, but metadata import still gets stuck on 5087 (āPulseā).
Try adding a few more useful and informational fields to your query:
select concept_name_id,name,locale,voided,locale_preferred,concept_name_type from concept_name
There should be 1 FULLY_SPECIFIED name per locale; 1 locale_preferred = 1 per locale. Changing the locale might solve some of the issues, but itās not the correct use of the data model. It is meant for things like ācenterā (en) vs ācentreā (en_gb).