Bahmni / OpenMRS does not sync with OpenERP

Recently I notice each time I created drugs order in Bahmni the quotation is not created automatically in OpenERP. I tried to check the atomfeed properties and the bahmni-erp-connect but both seems to be working.

However when I go to “Atomfeed-Console” in bahmni > OpenMRS I get the following error in the javascript console (browser)

GET 500 (Internal Server Error)

I have found the log for the error above and its something like this

java.lang.NullPointerException: null
        at org.ict4h.service.AppStatusService.getAppStatus( ~[atomfeed-console.jar!/:1.0-SNAPSHOT]
        at org.ict4h.controllers.AppStatusController.getAppStatus( ~[atomfeed-console.jar!/:1.0-SNAPSHOT]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.7.0_79]
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[na:1.7.0_79]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[na:1.7.0_79]
        at java.lang.reflect.Method.invoke(Unknown Source) ~[na:1.7.0_79]
        at ~[spring-web-4.2.4.RELEASE.jar!/:4.2.4.RELEASE]
        at ~[spring-web-4.2.4.RELEASE.jar!/:4.2.4.RELEASE]

But I am not sure what causes the null pointer. Any clues ?

Please refer Bahmni WIKI to trouble shoot sync issues.

  1. Check if openerp and bahmni-erp-connect service are running < Up and running fine

  2. Check connection credentials < Credentials are correct

  3. Check markers table of openerp database

    • select * from failed_events is empty ( I have removed the old entries and try to add new drugs)
    • Markers showing correct entries for corresponding feed_uri

    last_read_entry_id | feed_uri_for_last_read_entry | feed_uri | http://localhost:8050/openmrs/ws/atomfeed/lab/70 | http://localhost:8050/openmrs/ws/atomfeed/lab/r ecent | http://localhost:8050/openmrs/ws/atomfeed/drug/64 | http://localhost:8050/openmrs/ws/atomfeed/drug/ recent | http://localhost:8050/openmrs/ws/atomfeed/patient/11604 | http://localhost:8050/openmrs/ws/atomfeed/patie nt/recent | http://localhost:8050/openmrs/ws/atomfeed/encounter/2 | http://localhost:8050/openmrs/ws/atomfeed/encou nter/recent

4 Check Shop Mapping in OpenERP < checked 5. Check Units to Be Synced in OpenERP < checked 6. By the way the synching issue only for drugs, because when I added new customer in Bahmni it gets created as well in OpenERP.

Hi @abiieez, Can you see the new drugs in OpenERP->Sales->Products->Products section that you have added from OpenMRS ??

I tried to add new drug from the OpenMRS but its not added in OpenERP.

Hi @abiieez, Can you confirm whether you have added only new drug with existing Drug concept OR added both new drug and new drug concept from OpenMRS. Also share the screenshot of the new drug.

I did the later one. I have created new concept and then added a new drug which uses the concept.

The issue seems someone changed the admin password. Not knowing the same credentials is used by atom feed. Changing the with the new password solved the issue.