Hi
I’m a doctor who’s working with my IT friends to implement Bahmni in my hospital.
I’m impressed with flexibility of this software but one thing is it lack of Drug Allergy module.
because OpenMRS has allergyui module which is very good. so we are trying to install this module by placing
allergyui-1.0.omod and allergyapi-1.0.1.omod in /opt/openmrs/modules
and it didn’t work.
so we want to find out why and how from openmrs log and we couldn’t find out.
Anyone please give me a guide for installing new module in Bahmni.
Thanks
Pi
**I installed Bahmni ver 0.89(openMRS Version: 2.1.0 Build 7eadd7) on CentOS 6.9(full) in the cloud.
Allergy UI was not designed to be a UI layer for Bahmni (but rather for the OpenMRS Reference Application).
Depending on the technology used (I haven’t looked yet) it may or may not be straightforward to integrate it within Bahmni Apps - that is the UI layer of Bahmni.
If your goal is indeed to integrate Allergy UI in Bahmni, then you will have to start troubleshooting step by step what’s required to be done.
For a start, what did the logs say?
May 31, 2017 2:16:15 PM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Allocate exception for servlet openmrs
java.lang.IllegalStateException: BeanFactory not initialized or already closed - call 'refresh' before accessing beans via the ApplicationContext
at org.springframework.context.support.AbstractRefreshableApplicationContext.getBeanFactory(AbstractRefreshableApplicationContext.java:170)
at org.springframework.context.support.AbstractApplicationContext.getInternalParentBeanFactory(AbstractApplicationContext.java:1107)
at org.springframework.context.support.AbstractRefreshableApplicationContext.createBeanFactory(AbstractRefreshableApplicationContext.java:200)
at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:126)
at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:537)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:452)
at org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:663)
at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:629)
at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:677)
at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:548)
at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:489)
at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:136)
at javax.servlet.GenericServlet.init(GenericServlet.java:158)
at org.openmrs.web.DispatcherServlet.init(DispatcherServlet.java:84)
at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1241)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1154)
at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:827)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:135)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:534)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1081)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:658)
at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:222)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1566)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1523)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Unknown Source)
@darius
I went to manage module in admin
and found this error on allergyui module
Module Allergy UI Module cannot be started because it requires the following module(s): uicommons 2.1, uiframework 3.9 Please install and start these modules first.
At first (and quick) sight the log seems unrelated to the original problem.
By upgrading those two modules you might stumble upon further similar issues with other modules down the line.
You will have to troubleshoot this step by step:
Is it ok to upgrade UI Framework only?
Is it ok to upgrade UI Commons only?
How did you actually upgrade them?
You would have to remove the older version from the modules/ folder, copy the new one, and restart OpenMRS, is that what you did?
Hi @mksd
Sorry for late reply. I’m busy with other job for the last week.
I did try to remove UI Commons and UI framework and install new version but it make other modules crashed.
I did tried to install allergyui1.0 and allergyapi1.0.1
as I thought this 2 modules were installed in openmrs 2.1.0, the same version as bahmni 0.89(openmrs ver 2.1.0)