openmrsdb data migration into docker (bahmni-standard)

Hello, I am helping a hospital using Bahmni who are looking into what it will take to do a migration to the docker version of Bahmni when it is released. I have migrated their openmrs database to a working install of Bahmni 0.93, and am now trying to migrate the data to bahmni-standard on docker.

Here are the steps taken:

  1. Install bahmni docker (mostly based on this page)
  2. Created a dump of the openmrs database on 0.93 using this command:
mysqldump --routines -u root -pXXXX --databases openmrs | gzip > openmrs_093_backup.sql.gz
  1. Transferred this file to the docker server
  2. Started up the openmrsdb: docker compose up -d openmrsdb
  3. Dropped the openmrs database:
echo 'DROP DATABASE IF EXISTS openmrs;' | mysql -h localhost -P 3306 --protocol=tcp -u openmrs-user -pXXX
  1. Imported the new database:
gunzip -c /root/openmrs_093_backup.sql.gz | mysql -h localhost -P 3306 --protocol=tcp -u root -pXXX
  1. Then start up all the images.

The logs for the openmrs image show the liquibase changes being applied, and then the search index being rebuilt. But when it finishes openmrs starts to generate a large number of errors, something like the following:

...
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.openmrs.module.reporting.dataset.query.service.BaseDataSetQueryService#46c8499d' defined in URL [jar:file:/openmrs/data/.openmrs-lib-cache/reporting/reporting.jar!/moduleApplicationContext.xml]: Initialization of bean failed; nested exception is org.springframework.aop.framework.AopConfigException: Unexpected AOP exception; nested exception is java.lang.IllegalStateException: Unable to load cache item
...
Related cause:
	org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'accountService' defined in URL [jar:file:/openmrs/data/.openmrs-lib-cache/emrapi/lib/emrapi-api-1.32.0.jar!/moduleApplicationContext.xml]: Cannot create inner bean 'org.openmrs.module.emrapi.account.AccountServiceImpl#5bc513d1' of type [org.openmrs.module.emrapi.account.AccountServiceImpl] while setting bean property 'target'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.openmrs.module.emrapi.account.AccountServiceImpl#5bc513d1' defined in URL [jar:file:/openmrs/data/.openmrs-lib-cache/emrapi/lib/emrapi-api-1.32.0.jar!/moduleApplicationContext.xml]: Initialization of bean failed; nested exception is org.springframework.beans.ConversionNotSupportedException: Failed to convert property value of type 'com.sun.proxy.$Proxy411 implementing org.openmrs.api.OpenmrsService,org.springframework.aop.SpringProxy,org.springframework.aop.framework.Advised,org.springframework.core.DecoratingProxy,java.io.Serializable,org.springframework.transaction.interceptor.TransactionalProxy' to required type 'org.openmrs.module.providermanagement.api.ProviderManagementService' for property 'providerManagementService'; nested exception is java.lang.IllegalStateException: Cannot convert value of type 'com.sun.proxy.$Proxy411 implementing org.openmrs.api.OpenmrsService,org.springframework.aop.SpringProxy,org.springframework.aop.framework.Advised,org.springframework.core.DecoratingProxy,java.io.Serializable,org.springframework.transaction.interceptor.TransactionalProxy' to required type 'org.openmrs.module.providermanagement.api.ProviderManagementService' for property 'providerManagementService': no matching editors or conversion strategy found
...
	Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.openmrs.module.emrapi.account.AccountServiceImpl#5bc513d1' defined in URL [jar:file:/openmrs/data/.openmrs-lib-cache/emrapi/lib/emrapi-api-1.32.0.jar!/moduleApplicationContext.xml]: Initialization of bean failed; nested exception is org.springframework.beans.ConversionNotSupportedException: Failed to convert property value of type 'com.sun.proxy.$Proxy411 implementing org.openmrs.api.OpenmrsService,org.springframework.aop.SpringProxy,org.springframework.aop.framework.Advised,org.springframework.core.DecoratingProxy,java.io.Serializable,org.springframework.transaction.interceptor.TransactionalProxy' to required type 'org.openmrs.module.providermanagement.api.ProviderManagementService' for property 'providerManagementService'; nested exception is java.lang.IllegalStateException: Cannot convert value of type 'com.sun.proxy.$Proxy411 implementing org.openmrs.api.OpenmrsService,org.springframework.aop.SpringProxy,org.springframework.aop.framework.Advised,org.springframework.core.DecoratingProxy,java.io.Serializable,org.springframework.transaction.interceptor.TransactionalProxy' to required type 'org.openmrs.module.providermanagement.api.ProviderManagementService' for property 'providerManagementService': no matching editors or conversion strategy found
		at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:602)
		at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:516)
		at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:374)
		... 177 more
	Caused by: org.springframework.beans.ConversionNotSupportedException: Failed to convert property value of type 'com.sun.proxy.$Proxy411 implementing org.openmrs.api.OpenmrsService,org.springframework.aop.SpringProxy,org.springframework.aop.framework.Advised,org.springframework.core.DecoratingProxy,java.io.Serializable,org.springframework.transaction.interceptor.TransactionalProxy' to required type 'org.openmrs.module.providermanagement.api.ProviderManagementService' for property 'providerManagementService'; nested exception is java.lang.IllegalStateException: Cannot convert value of type 'com.sun.proxy.$Proxy411 implementing org.openmrs.api.OpenmrsService,org.springframework.aop.SpringProxy,org.springframework.aop.framework.Advised,org.springframework.core.DecoratingProxy,java.io.Serializable,org.springframework.transaction.interceptor.TransactionalProxy' to required type 'org.openmrs.module.providermanagement.api.ProviderManagementService' for property 'providerManagementService': no matching editors or conversion strategy found
...

(More in pastebin)

The log file was able to fill the ~45GB of the image before it crashed.

It would be great to have help knowing why these happen and what can be done about it.

Thanks!

@mohant is coordinating an online training session on this topic of migrating data from older Bahmni instances to the latest one. Details to be announced soon.

Hi @gsluthra @mdg583

I’m getting a similar error while trying to start openmrs on bahmni-standard. Is there any fix for this error?