getting referenceapplication to run on 2.7.0 platform

I am trying to get the 2.7.0 platform to run with the O2 UI.

My underlying goal is to try to update our current installation with the recommended security fixes, preferably with minimal changes to the UI and database. Basically, our current installation is 2.4.3 Build 0ff0ed + add-ons from referenceapplication-addons-2.11.0.zip + order entry + one custom module.

What I have working so far is the OpenMRS 2.7.0 docker + a list of modules based on the 2.13 reference application add-ons (see below for list). The problem I have now is that I can’t get the referenceapplication module to work, therefore I don’t have the O2 UI. It gives a null pointer exception, and when I reload the page it gives a UI Framework Error. I have tried updating all modules to the latest versions; for the modules that are not on the latest version, the latest version does not work. I have tried rolling the UI Framework Module back to 3.22 (the version listed in the add-ons) but then the UI Framework module does not load (see errors) . I suspect the problem is that I don’t yet have a working combination of versions of modules. Does anyone have 2.7+ running with the O2 UI, and if so, what combination of modules/versions are you using to get it to work?

I have some log files:

9:25: uploaded referenceapplication-2.13.0.omod (not in log); got errors

openmrs.1.log

9:28: stopped docker, cleared .openmrs-lib-cache, and restarted docker

9:38: LegacyUI loads but shows Reference App module as not started. Clicked Start All. Gives same error as above.

openmrs.log

9:42: restarted Docker

refapp_openmrs.log

10:18: removed reference app module and restarted Docker

10:22: added referenceapplication-2.13.0.omod

Module list:

  • addresshierarchy-2.19.0.omod
  • adminui-1.6.0.omod
  • allergyui-1.8.7.omod
  • appframework-2.17.0.omod
  • appointmentscheduling-2.0.0.omod
  • appointmentschedulingui-2.0.0.omod
  • appui-1.16.0.omod
  • attachments-3.6.0.omod
  • calculation-1.3.0.omod
  • coreapps-1.40.0.omod
  • dataexchange-1.3.8.omod
  • emrapi-1.33.0.omod
  • event-2.10.0.omod
  • fhir2-2.2.0.omod
  • htmlformentry-5.4.0.omod
  • htmlformentryui-2.5.0.omod
  • htmlwidgets-1.11.0.omod
  • idgen-4.14.0.omod
  • legacyui-1.22.0.omod
  • metadatadeploy-1.13.0.omod
  • metadatamapping-1.6.0.omod
  • metadatasharing-1.9.0.omod
  • openconceptlab-2.4.0.omod
  • owa-1.15.0.omod
  • providermanagement-2.14.0.omod
  • referencedemodata-2.4.0.omod
  • referencemetadata-2.13.0.omod
  • registrationapp-1.27.0.omod
  • registrationcore-1.13.0.omod
  • reporting-1.26.0.omod
  • reportingcompatibility-2.0.9.omod
  • reportingrest-1.14.0.omod
  • reportingui-1.11.0.omod
  • serialization.xstream-0.2.16.omod
  • uicommons-2.23.0.omod
  • uiframework-3.23.0.omod
  • uilibrary-2.0.7.omod
  • webservices.rest-2.47.0.omod

Any advice? Thanks!

Try using version 1.10.0 of the metadatasharing module an version 1.27.0 of the reporting module. You can also bump the core war file to version 2.7.3

1 Like

Hi Daniel,

Thanks for your very fast reply! I was able to install the new versions of both modules, but when I add the referenceapplication omod, I get the error:

The page isn’t redirecting properly

Firefox has detected that the server is redirecting the request for this address in a way that will never complete.

    This problem can sometimes be caused by disabling or refusing to accept cookies.

I tried clearing cookies/cache; this did not help.

I also tried refreshing the docker (which resulted in a working system with no modules) and copying the .omod files back to the modules directory. This got the same result. Removing referenceapplication-2.13.0.omod and restarting the Docker gets things working again (but of course without the O2 UI). I have not tried upgrading any of the other modules.

Log: openmrs.log

Where should I download the 2.7.3 war? I don’t see it on the Downloads page or Docker hub. I see there’s a war file here, is that the one I should try?

Thanks!

Yes go ahead and use it.

As for the other problem, when you go to the manage modules page of the administration, are all modules started and running?

Hi Daniel,

Okay, I will give the war file a try.

Yes, all modules show as running when referenceapplication-2.13.0.omod is not installed.

Hi Daniel,

The 2.7.3 war deployed with no problems, but this did not fix the problem with referenceapplication-2.13.0.omod .

It looks like exactly the same problem, to my eye, but here’s the newest log file just in case something changed that I didn’t notice: openmrs.log.

There’s a module called formentry app that the referenceapplication module depends on, but which isn’t in your list of modules. Maybe try adding the latest version of that.

Hi @dkayiwa @ibacher, I am facing the same challenge with the appFramework module. It crashes at startup. ERROR - Listener.contextInitialized(262) |2025-04-26T15:29:12,782| Failed to obt - Pastebin.com Running: <openmrs.version>2.7.4-SNAPSHOT</openmrs.version>

Modules loaded

Hi Ian,

Thanks for your reply. The Form Entry App is not listed as a dependency of the referenceapplication or any of its dependencies. It is included in the 2.13 reference application modules, but it threw an error when I tried to load it, and since it wasn’t in the dependency tree I did not try to install it again.

This time Form Entry App loaded without errors, but I am still getting the same error as in my last post. Upon installing, referenceapplication gives an error: https://pastebin.com/L2HUzsRX.

When I restart the Docker and try to go back to the login page, I get the same error as in my last post:

The page isn’t redirecting properly

Firefox has detected that the server is redirecting the request for this address in a way that will never complete.

    This problem can sometimes be caused by disabling or refusing to accept cookies.

In the Tomcat logs, I can see that there’s about 20 entries that look like this: [28/Apr/2025:09:40:23 +0000] "GET /openmrs/login.htm HTTP/1.1" 302 -

/openmrs/login.htm works with the legacy UI, so I guess what is happening is that the O2 front end is trying to redirect from the standard login.htm to the O2 login screen, and failing. I don’t know why, though.

And, in case you need it, the OpenMRS log file: openmrs.log.

Thanks!

@abertnamanya, I think your problem is different from mine. I was able to load the App Framework module with no problems. I am running the 2.7.3 platform and had the following modules already installed: uiframework-3.23.0.omod, uicommons-2.23.0.omod, uilibrary-2.0.7.omod, webservices.rest-2.47.0.omod, owa-1.15.0.omod. It might be a good idea to make a separate post, so that replies to your question and replies to my question don’t get confused.

1 Like

@ace how does your modules list page look like? Login

Hi Daniel,

When referenceapplication is not installed, it looks like this:

Interestingly, today, when I uploaded the referenceapplication-2.13.0.omod file, the module does start and I’m able to see that all modules are running. I can also get to the O2 login screen. However, when I restart the container and try to log in, I get the ā€œThe page isn’t redirecting properlyā€ error again. What changed between yesterday and today is that I disabled the reverse proxy, so today I am connecting via http: rather than https: with a reverse proxy. Needless to say, I can’t view the modules list, since I can’t log in. /openmrs/ tries to redirect to openmrs/login.htm . Navigating to openmrs/referenceapplication/login.page also redirects to openmrs/login.htm. So, getting rid of the reverse proxy seemed to get rid of this error, but not the redirect error.

Access log looks like this:

127.0.0.1 - - [29/Apr/2025:07:52:02 +0000] "GET /openmrs/ HTTP/1.1" 200 23404
IP - - [29/Apr/2025:07:52:27 +0000] "GET /openmrs/ HTTP/1.1" 302 -
IP - - [29/Apr/2025:07:52:27 +0000] "GET /openmrs/login.htm HTTP/1.1" 302 -

… followed by a bunch more 302s.

OpenMRS log is here.

Do you get the same behaviour when you try using a new Incognito window?

Hi Daniel,

Yes, and I always clear cookies/cache before trying to reload the page. The behavior is the same.

Can you easily come up with the steps to reproduce this locally?

Hi Daniel,

Kindof. I can reproduce the problem:

  • Start a VM with a vanilla Ubuntu24 install.
  • apt update
  • Install MariaDB, nginx, podman; set up DB with an openmrs user
  • podman pull docker.io/openmrs/openmrs-platform:2.7.0
  • create podman-omrs-platform.env file
  • podman volume create openmrs --ignore
  • podman create --name openmrs-platform \ --network=host \ --volume openmrs:/usr/local/tomcat/.OpenMRS \ --env-file podman-omrs-platform.env \ docker.io/openmrs/openmrs-platform:2.7.0
  • podman start openmrs-platform
  • Confirm that OpenMRS has started successfully, then:
  • podman cp openmrs.war openmrs-platform:/usr/local/tomcat/webapps/ (using this war file)
  • ā€˜tar -xvf modules.tar -C /var/lib/containers/storage/volumes/openmrs/_data/modules/’ (using modules.tar)
  • podman stop openmrs-platform
  • podman start openmrs-platform
  • That gives this error
  • podman stop openmrs-platform
  • rm -r /var/lib/containers/storage/volumes/openmrs/_data/.openmrs-lib-cache/
  • I should probably have done this before starting the container, but I did it here: podman cp csrfguard.properties openmrs-platform:/usr/local/tomcat/webapps/openmrs/WEB-INF/csrfguard.properties using this file
  • podman start openmrs-platform
  • At this point I get the LegacyUI login. I can log in, and see that all modules are running except Reference Metadata and Reference Application. I click Start All, which works… I can log in to the O2 UI. However, the situation is not stable… restarting the containers will result in the aforementioned error.
  • podman stop openmrs-platform
  • podman start openmrs-platform

I asked a sysadmin friend for help, and he pointed out that this might be the same issue as this one: https://github.com/openmrs/openmrs-core/pull/4601#issuecomment-2178836164 and it looks like referenceapplication has an open PR related to it: https://github.com/openmrs/openmrs-module-referenceapplication/pull/105

Thanks!