I’ve tried to upgrade the openmrs-insuranceclaims-module from supporting dstu3 to r4 and when I’m trying to start it with bahmni openmrs 2.5.12 it is giving this error -
WARN - ModuleFactory.stopModule(1165) |2023-10-09T09:04:20,401| Unable to call module's Activator.shutdown() method
org.openmrs.module.ModuleException: Unable to load/find moduleActivator: 'org.openmrs.module.insuranceclaims.InsuranceClaimsActivator' Module: Insurance Claims
at org.openmrs.module.Module.getModuleActivator(Module.java:164) ~[openmrs-api-2.5.12.jar:?]
at org.openmrs.module.ModuleFactory.stopModule(ModuleFactory.java:1160) ~[openmrs-api-2.5.12.jar:?]
at org.openmrs.module.ModuleFactory.startModuleInternal(ModuleFactory.java:794) ~[openmrs-api-2.5.12.jar:?]
at org.openmrs.api.context.Daemon$1.run(Daemon.java:86) ~[openmrs-api-2.5.12.jar:?]
Caused by: java.lang.NoClassDefFoundError: org/openmrs/event/EventListener
at java.lang.Class.getDeclaredConstructors0(Native Method) ~[?:1.8.0_372]
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2699) ~[?:1.8.0_372]
at java.lang.Class.getConstructor0(Class.java:3103) ~[?:1.8.0_372]
at java.lang.Class.newInstance(Class.java:412) ~[?:1.8.0_372]
at org.openmrs.module.Module.getModuleActivator(Module.java:155) ~[openmrs-api-2.5.12.jar:?]
... 3 more
Caused by: java.lang.ClassNotFoundException: org.openmrs.event.EventListener
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1420) ~[catalina.jar:8.5.88]
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1228) ~[catalina.jar:8.5.88]
at org.openmrs.module.ModuleClassLoader.loadClass(ModuleClassLoader.java:564) ~[openmrs-api-2.5.12.jar:?]
at java.lang.ClassLoader.loadClass(ClassLoader.java:351) ~[?:1.8.0_372]
at java.lang.Class.getDeclaredConstructors0(Native Method) ~[?:1.8.0_372]
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2699) ~[?:1.8.0_372]
at java.lang.Class.getConstructor0(Class.java:3103) ~[?:1.8.0_372]
at java.lang.Class.newInstance(Class.java:412) ~[?:1.8.0_372]
at org.openmrs.module.Module.getModuleActivator(Module.java:155) ~[openmrs-api-2.5.12.jar:?]
... 3 more
@dkayiwa
I’ve a docker compose setup of bahmni standard which is currently running on openmrs 2.5.10.
And I’ve my additional module which runs fine on plain openmrs as well as bahmni-openmrs.
But as soon as I add this class, bahmni-openmrs is giving this error. However, it still runs fine with the plain openmrs.
We don’t ship the insurance module right now, so can’t comment on its dependencies. That will need further analysis to check which dependencies are not resolving / incompatible.
I found the root cause of the problem. The problem is fhir2 module is imported in my module which is internally using hapi fhir 5.4.0 but the dependency above is using hapi fhir 6.0.3 version.
I tried excluding the hapi-fhir-base from the fhir2 dependency imported in my module but when I’m doing that openmrs is not getting started.
Are you able to start your module (with additional dependency of hcx-integrator-sdk) without fhir2-1.10.0-SNAPSHOT.omod, fhir2Extension-1.3.0-SNAPSHOT.omod in Bahmni-Standard ?
Do you have any other custom module(s) apart for default Bahmni Standard modules ?
Do you have code checked in to git or somewhere ? If yes, provide steps to reproduce the issue.
I’m not able to start the module even after removing fhir2 modules in bahmni standard. I’ve a custom module that works fine with bahmni standard withput the hcx dependency. But due to the latest fhir versions used in this dependency (6.0.3), it is giving multiple errors.