Can we keep Reference Application modules (omod files) in openmrs-webapp's /WEB-INF/view/module/ folder?


(Vamsi Krishna Rajulapati) #1

Hi,

We are trying to host OpenMRS on Openshift origin. We successfully hosted OpenMRS core module and Initial setup was also completed. To access the UI we copied the UI module into the modules folder also but the challenge here is we could not able to restart the Pod here.

So we are planning to copy these modules into some folder in webapp so that it copies the omod files into Modules folder.

Can somebody please suggest a way to have the Reference Application modules in the webapp, so that they will be in WAR file and while installing will be copied into the modules folder.

Please correct me If I am wrong.

Thanks


(Juliet Wamalwa) #2

Could this https://wiki.openmrs.org/display/docs/Open+Web+Apps+Module be of help?


(Daniel Kayiwa) #3

I think what you are asking is exactly what UgandEMR does. @ssmusoke can you fill him in?


(Vamsi Krishna Rajulapati) #4

Hi @ssmusoke, could you please assist me.


(Stephen Senkomago Musoke) #5

Sorry for the delay in responding, we are using the OpenMRS SDK to build a WAR file with all the bundled modules

Add this to the pom.xml file of your omod sub-project


(Vamsi Krishna Rajulapati) #6

Thanks @ssmusoke for the help. Not sure if same works for us.


(Daniel Kayiwa) #7

Did you even try it out?


(Vamsi Krishna Rajulapati) #8

Hi @dkayiwa, what we are doing currently is, we are using the openmrs-core source code and using the CICD we are building the WAR and then Docker Image and hosting it on OpenShift Origin.

So I am not sure how to try the above mentioned steps.

Thanks


(Daniel Kayiwa) #9

Is this of help? https://github.com/openmrs/openmrs-distro-platform


(Stephen Senkomago Musoke) #10

@vamsioptum How are you building the WAR file? Why are you building the WAR file from core?


(Vamsi Krishna Rajulapati) #11

Hi @ssmusoke, I am building the WAR using Maven only (mvn clean install) and deploying that on OpenShift Origin (on JBOSS EAP server).


(Stephen Senkomago Musoke) #12

Are you using OpenMRS SDK? Do you have a link to a code repo?


(Vamsi Krishna Rajulapati) #13

I am using this code base: https://github.com/openmrs/openmrs-core (OpenMRS API and web application code)


(Stephen Senkomago Musoke) #14

The folder you are referring to is where modules with web components are unpacked. The omod files are copied into WEB-INF/bundledModules folder


(Vamsi Krishna Rajulapati) #15

Thank you so much @ssmusoke. When I copy the omod files in WEB-INF/bundledModules, the app is able to access the modules. But I am getting the new error:

ERROR - AbstractLoggingWriter.write(71) |2019-02-07 02:44:02,805| java.lang.IllegalStateException: JBWEB000243: Context /openmrs has already been initialized

ERROR - AbstractLoggingWriter.write(71) |2019-02-07 02:44:02,806| at org.apache.catalina.core.StandardWrapperFacade.addMapping(StandardWrapperFacade.java:125)

Could you please help me on this.

Thanks


(Stephen Senkomago Musoke) #16

Can you share the complete stack trace - at times these errors can be ignored if they do not cause OpenMRS not to start


(Stephen Senkomago Musoke) #18

You can ignore the errors as I see the loading continues in the last line


(Vamsi Krishna Rajulapati) #19

But I am not able to access the Application. :weary:


(Stephen Senkomago Musoke) #20

What erorr is displayed?


(Vamsi Krishna Rajulapati) #21

Not able to access the Login page (Legacy UI) even though it loaded the module.

INFO - LoggingAdvice.invoke(116) |2019-02-07 02:43:43,496| In method AdministrationService.saveGlobalProperty. Arguments: GlobalProperty=property: legacyui.started value: true,

INFO - LoggingAdvice.invoke(156) |2019-02-07 02:43:43,794| Exiting method saveGlobalProperty

INFO - LoggingAdvice.invoke(116) |2019-02-07 02:43:43,805| In method AdministrationService.saveGlobalProperty. Arguments: GlobalProperty=property: legacyui.mandatory value: false,

INFO - LoggingAdvice.invoke(156) |2019-02-07 02:43:43,993| Exiting method saveGlobalProperty

Still its showing no user interface module is installed.