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 https://192.168.33.10/atomfeed-console/apps/OpenMRS/feedStatus 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(AppStatusService.java:42) ~[atomfeed-console.jar!/:1.0-SNAPSHOT]
        at org.ict4h.controllers.AppStatusController.getAppStatus(AppStatusController.java:29) ~[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 org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:222) ~[spring-web-4.2.4.RELEASE.jar!/:4.2.4.RELEASE]
        at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:137) ~[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

    tag:atomfeed.ict4h.org:b7981f26-0de9-4872-8afd-b2e1e0cc3188 | http://localhost:8050/openmrs/ws/atomfeed/lab/70 | http://localhost:8050/openmrs/ws/atomfeed/lab/r ecent tag:atomfeed.ict4h.org:d0e0f782-9026-45aa-953a-8b01d0954434 | http://localhost:8050/openmrs/ws/atomfeed/drug/64 | http://localhost:8050/openmrs/ws/atomfeed/drug/ recent tag:atomfeed.ict4h.org:40310bfa-ae7c-428b-9455-f63a911f6700 | http://localhost:8050/openmrs/ws/atomfeed/patient/11604 | http://localhost:8050/openmrs/ws/atomfeed/patie nt/recent tag:atomfeed.ict4h.org:080811d1-6155-4927-b3b4-2eddfb4f900d | 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 atomfeed.properties with the new password solved the issue.