**Application Name:**Platform Version Number: 1.11.7
Question: Hello, I’m trying to add a modules given in OpenSHR repository to my OpenMRS docker container. Module omod files are copied to the right directory, but modules didn’t start and errors are thrown:
ERROR - Listener.contextInitialized(188) |2017-06-06 09:58:11,682| Got exception while starting up:
org.openmrs.module.ModuleException: Unable to start OpenMRS. Error thrown was: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'serviceContext$child#0' defined in URL [jar:file:/root/.OpenMRS/.openmrs-lib-cache/shr-cdahandler/lib/shr-cdahandler-api-0.6.0.jar!/moduleApplicationContext.xml]: Cannot create inner bean 'org.springframework.transaction.interceptor.TransactionProxyFactoryBean#41a7303f' of type [org.springframework.transaction.interceptor.TransactionProxyFactoryBean] while setting bean property 'moduleService' with key [1]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.transaction.interceptor.TransactionProxyFactoryBean#41a7303f' defined in URL [jar:file:/root/.OpenMRS/.openmrs-lib-cache/shr-cdahandler/lib/shr-cdahandler-api-0.6.0.jar!/moduleApplicationContext.xml]: Cannot create inner bean 'org.openmrs.module.shr.cdahandler.api.impl.CdaImportServiceImpl#b63bf58' of type [org.openmrs.module.shr.cdahandler.api.impl.CdaImportServiceImpl] while setting bean property 'target'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.openmrs.module.shr.cdahandler.api.impl.CdaImportServiceImpl#b63bf58' defined in URL [jar:file:/root/.OpenMRS/.openmrs-lib-cache/shr-cdahandler/lib/shr-cdahandler-api-0.6.0.jar!/moduleApplicationContext.xml]: Initialization of bean failed; nested exception is java.lang.LinkageError: loader constraint violation: loader (instance of org/openmrs/util/OpenmrsClassLoader) previously initiated loading for a different type with name "org/marc/everest/rmim/uv/cdar2/pocd_mt000040uv/ClinicalDocument"
Caused by: javax.servlet.ServletException: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'serviceContext$child#0' defined in URL [jar:file:/root/.OpenMRS/.openmrs-lib-cache/shr-cdahandler/lib/shr-cdahandler-api-0.6.0.jar!/moduleApplicationContext.xml]: Cannot create inner bean 'org.springframework.transaction.interceptor.TransactionProxyFactoryBean#41a7303f' of type [org.springframework.transaction.interceptor.TransactionProxyFactoryBean] while setting bean property 'moduleService' with key [1]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.transaction.interceptor.TransactionProxyFactoryBean#41a7303f' defined in URL [jar:file:/root/.OpenMRS/.openmrs-lib-cache/shr-cdahandler/lib/shr-cdahandler-api-0.6.0.jar!/moduleApplicationContext.xml]: Cannot create inner bean 'org.openmrs.module.shr.cdahandler.api.impl.CdaImportServiceImpl#b63bf58' of type [org.openmrs.module.shr.cdahandler.api.impl.CdaImportServiceImpl] while setting bean property 'target'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.openmrs.module.shr.cdahandler.api.impl.CdaImportServiceImpl#b63bf58' defined in URL [jar:file:/root/.OpenMRS/.openmrs-lib-cache/shr-cdahandler/lib/shr-cdahandler-api-0.6.0.jar!/moduleApplicationContext.xml]: Initialization of bean failed; nested exception is java.lang.LinkageError: loader constraint violation: loader (instance of org/openmrs/util/OpenmrsClassLoader) previously initiated loading for a different type with name "org/marc/everest/rmim/uv/cdar2/pocd_mt000040uv/ClinicalDocument"
and so on…
Modules should be started in the specific order. Is a way to ensure this order of module loading order?
I’m using following versions of modules:
- shr-atna-1.0.0
- shr-contenthandler-3.0.0.omod
- xds-b-repository-0.4.5.omod
- shr-cdahandler-0.6.0.omod
- shr-odd-0.5.1.omod
Additionally I’m using openhie-client-0.5 and webservices.rest-2.12 modules.
Sometimes all modules will start properly, but usually the errors given above are occurring.
Regards, Marcin