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

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

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

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

Hi @ssmusoke, could you please assist me.

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

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

Did you even try it out?

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

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

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

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

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

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

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

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

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

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

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

What erorr is displayed?

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.