Bahmni Dhis 2 Integration Error.

After following the steps outlined±+DHIS2+Integration I’m getting the following errors in my bahmni 0.92 instance. Any help on this @buvaneswariarun @pratibhasagar

Here is my error log

Hello David,

Sorry I don’t have the solution - I am just glad to see that you managed to install the module in a 0.92 vagrant-based Bahmni instance. Which installation guide are you using? I am following this one and I am not succeding. The installation package is not openable and yum complains that it’s not a valid rpm.

Did you end up finding a solution to the errors?

Best regards

Khobatha Setetemela National University of Lesotho

Hello @khobatha

Yes i was able to set up the module. I also noticed there is an issue with the installation package but you can sort that out by building the package from this link and then follow these steps.


Hello @dmukungi

Thank you much for the response - highly appreciated.

I eventually managed to install the package by building it from scratch.

I then followed the configuration steps on the link you shared.

However, when I attempt to load the module, it fails with a “Down for maintenance” error message. I have restarted the service several times and checked my configuration settings multiple times to no avail. I even removed the package and re-installed and re-configured but it still doesn’t load the module home page as I see it did for you.

I am attaching (please see below) the following screenshot for your information:

  1. Maintenance error screen

  2. dhis-integration.yml

  3. extension.json

May I kindly ask you to show me your similar settings?


Please share the complete error log in “cd /var/log/dhis-integration”. Also, Please check the path to your repors url (In your dhis-intergration.yml) again you might have missed something on that.

Other considerations:

  • Make sure that you have the “dhis-integration.jar” and not “dhis-integration-1.0-SNAPSHOT.jar” in your " /opt/dhis-integration/bin/" folder. For some reasons it doesn’t work with the Snapshot.
  • Make sure that you are using a secure URL to access the dhis2-module. i.e a valid ssl.

Let me know also if you have already created the root folders i.e “/dhis-integration-data” and “/dhis-integration/”


1 Like

Hello @dmukungi :slight_smile:

Thanks again.

I have done as your advised but I am still not succeeding. Infact, I autoremoved the package and started everything from scratch but it still lands at the same problem (maintenance page).

I am sorry to overwhelm you with many screenshots. Please see a picture of my configuration in the attached screenshots:

  1. I have confirmed that I have a “dhis-integration.jar” in the bin folder
  2. I am using secure URLs to access the dhis2-module
  3. I have attempted to make sure my settings in the .yml file are correct
  4. I have checked the httpd server log files and they suggest that the service is not available (please see attached screenshot)

I am not sure what I am missing.

NB: -My instance is in vagrant -I am using Bahmni v0.92 -The host OS is Ubuntu 18.04

Thank you in advance.


I hope you are well.

  1. Did you have to manually deploy the dhis-integration webapp in the root folder (/dhis-integration) or it was automatically deployed during installation? That is, copy the web page files into the folder? I manually copied the web pages from the repo into the root folder and this way, the service’s web UI loads successfully (see screenshot below) but quickly logs out with a “not authenticated” error message.

  2. I am testing the service on a local instance that lacks a valid ssl certificate. However, all the URLs I am using to access the external DHIS2 server are https. Do you think this could be part of the problem?

Kind regards

Hello @amolsatvix @akhilmalhotra1 @ajeenckya

May I kindly request your comment on this?

Thank you in advance.


National University of Lesotho (NUL)

@khobatha if you are using the Possible addon, maybe @sanjayap or @laxman would be better to answer this. I think @amolsatvix has also used the same.


@angshuonline Thank you.

@amolsatvix - please see below as you advised:

I am including the DHIS2 log as well for reference

I think this may be due to lack of privilege, user should have appropriate privilege set. @utsavdeshar can suggest you more on this.

1 Like

Hello @dmukungi - how did you get past this error? I am struggling to resolve it.

Thank you in advance.

I haven’t setup this module myself, but looking at your httpd logs, it seems your use of “localhost.localdomain” aren’t being resolved correctly. Maybe you can change the dhis-integration.yml configs to use “” (your local machine IP) to try.

Please check the urls mentioned in dhis-integration.yml are all actually accessible from the machine running this service (maybe use curl, or telnet, etc to validate).


@khobatha you may need to use a secure domain name to send the data to your dhis2-instance. Please make sure that both the server and your instance are secured.

Also please share the content on the dhis-integration.yml (hide the passwords).

1 Like

@dmukungi @gsluthra Thank you. Highly appreciate your help.


  1. Both the DHIS2 server and my instance are secured. The server uses a standard ssl certificate and my instance uses a self-signed certificate.
  2. The domain resolution issues were addressed. Plugin is now able to make connection to Bahmni services.

I have attached the following for your reference:

  1. screenshot showing nature of the error ( MissingFormatArgumentException: looks exactly like what you once reported here)
  2. dhis-integration.yml
  3. dhis.log

NB: It seems like a formatting issue to me. Makes me think it has something to do with the incompatibility of calendars. My local instance is using the standard Gregorian calendar and the dhis-integration plugin is pre-built to use the Nepali calendar.

Thank you in advance.

In your case there is some DB exception that is occuring, but the code is throwing a String.format( ) %s exception on this line ( 112):

If you see this line, the code on it is incorrect - because the format method bracket has been closed before the exception string was passed, and therefore format() method is throwing an error:

throw new DHISIntegratorException(String.format(Messages.SQL_EXECUTION_EXCEPTION), e);

This exception will get thrown (format error) ANY TIME someone has a DB exception, and the original exception won’t be visible.

I would request you to modify this line of code with this:

throw new DHISIntegratorException ("DB Exception occurred "+ e.getMessage(), e);

Rebuild the jar, and redeploy. Then you should be able to see the DB exception which is actually being caused.

Note: I think Possible team should also fix this minor bug because it will help people in future in debugging the issue when a DB exception arises. This error exists in next line of code also. Wherever String.format has been called with %s without a supporting parameter.

See: Java String format() method - javatpoint

1 Like

@gsluthra - Thank you very much. I tried your fix and it worked like magic! The Missing FormatArgumentException was resolved.

1 Like

May I kindly request help with the following?


  1. I have configured the Bahmni-DHIS2 plugin on a local vagrant based instance on a windows host (Kindly see attached application.yml file)
  2. I have configured the plugin to load the test Bahmni programs reports that I would like to sync to DHIS2


  1. According to this installation link, I expect the Bahmni-DHIS2 UI to display a “Submit to DHIS” button for each of the programs to be mapped
  2. However, this is not the case with my installation (Kindly see attached screenshot)
  3. The logfile shows no noticeable issues, the plugin loads well and waits in the “getQueryLog”

@dmukungi @gsluthra @laxman

Hi, This may be due to privilege issue, can you check with right privilege for reporting?

1 Like

Hi @laxman - Thank you. I just checked: I am using a “superman” account with the following privileges. I still can’t commit anything to DHIS2 and the log file does not show any error messages.

Screenshot (19)