How to update the OpenMRS Core version of Bahmni?

Hi everyone,

I cannot figure out how to deploy a new version of OpenMRS Core on an existing installation of Bahmni (installed the standard way, from the documentation). In my case, this is 0.89. Bahmni 0.89 is using OpenMRS Core 2.1.0 (7eadd7). I would like to use ‘2.1.1-SNAPSHOT’

I have tried to simply replace the existing openmrs.war file located in /opt/openmrs/ with my 2.1.1-SNAP WAR artifact (from the build of OpenMRS Core) but nothing happened (after a restart).

I have also tried to replace the contents of the /opt/openmrs/openmrs folder with the new WAR artifact contents (unzipped). Still does not work.

Maybe it has to do with the openmrs.jar file used to start Tomcat? So I have tried to use a more recent openmrs.jar file fetched from the build of Bahmni Package 0.90 (0.90 depends on Core 2.1.1-SNAPSHOT) without success either.

Any idea?




I also don’t know how to do this but this Confluence page at least indicates that what you are trying to do is possible:

Just one idea: Did you check the contents of the config file /opt/openmrs/etc/openmrs.conf?

Well, after reading it completely, the page is just about the Java upgrade.

Is there any error message in the OpenMRS logs?

Hi Romain,

I would like to know why do you want to upgrade only OpenMRS ? I would suggest not to upgrade as you might face compatibility issues(Not sure of it).

If you still want to deploy the 2.1.1-SNAPSHOT, please take the backup of openmrs/modules and install bahmni-OpenMRS RPM (It is packaged rpm of OpenMRS 2.1.1-SNAPSHOT ) and copy back the omods.

Let me know if you face any issues.

Hi @shashikanth, simply because we need to leverage the latest snapshot. We need to obtain at runtime 2.1.1-SNAPSHOT containing this commit.

Thanks. I can install the RPM just fine but I am having trouble to start the server because of a Java JRE 1.8.0_101 that is not found. In the log:

failed to run command `/usr/java/jre1.8.0_101/bin/java': No such file or directory

Indeed it seems that JRE 1.8.0_131 is installed:

[root@bahmni /]# ll /usr/java/
total 4
lrwxrwxrwx 1 root root   16 Jun 22 22:53 default -> /usr/java/latest
drwxr-xr-x 7 root root 4096 Jun 22 22:53 jre1.8.0_131
lrwxrwxrwx 1 root root   22 Jun 22 22:53 latest -> /usr/java/jre1.8.0_131

But before I spend time troubleshooting this, I would like to make sure this is the right solution for me.

What you are describing seems valid for Core 2.1.1-SNAPSHOT only because Bahmni 0.90 depends on Core 2.1.1-SNAPSHOT and therefore this package is made available. But what if I would like to deploy/use any other version of the Core or a custom fork of it for instance?

What would be the steps to manually update the Core, ie what does the RPM do exactly? (I just need to have a very good understanding and control over this OpenMRS Core update since that will likely needed to be used on production servers at some point)

Usually if you want to deploy other version, we compile and unzip the war file in the /opt/openmrs/openmrs as you said. Not sure what is the issue you are facing.

This is ideally not the right solution. As I have already said that it is not recommended to update openmrs-core without upgrading Bahmni. Can you try changing the JAVA_HOME variable in/opt/openmrs/etc/openmrs.conf to point it to right location.

Yes, that works. If just unzipping on top of the current folder (/opt/openmrs/openmrs), this works fine, Core is updated. However, if this folder is made empty and then we unzip the WAR, then the server won’t start: Seems like some files are missing.

Caused by: Missing config file: '/WEB-INF/dwr-modules.xml'

See complete error:

I am wondering which process that runs at installation of Bahmni is creating those missing extra files. Shouldn’t extracting the WAR be enough?