[FIXED] Sync2 Not Working on Openmrs 1.11.x (Error When Starting)

Tags: #<Tag:0x00007fddfbb1da88>

Intro As the @SolDevelo team might remember FGH Mozambique was on board with Sync2 implementation since its inception. As it was a challenge for most implementation still on OpenMRS 1.x, we could not participate in testing when the initial version was officially out. Fortunately and thanks to everyone involved, the version that finally works on 1.x was released. We have a use case that we think will be best served by Sync2.

The testing I setup two instances Openmrs 1.11.6 using the SDK. I then added the required modules for Sync2 to work. I was forced to build the 1.0.13-SNAPSHOT of the atom feed because the version(1.0.12) that was supposed to work was not working see this thread. The two servers started just fine and I could login in both. However, both of them threw this error during startup.

Even though both logs have that error, as I said both servers run and are accessible. The trouble is when I create a new patient or fill a form for new/existing patient the audit log does not display anything. As if nothing happened. Below are the configurations I have on both servers.

Parent server

Sync Config Json

{
  "general" : {
    "parentFeedLocation" : "http://localhost:8095/openmrs",
    "localFeedLocation" : "http://localhost:8095/openmrs",
    "localInstanceId" : "MainFacility",
    "persistSuccessAudit" : true,
    "persistFailureAudit" : true,
    "clients" : { }
  },
  "push" : {
    "enabled" : false,
    "schedule" : 43200,
    "classes" : [ {
      "classTitle" : "Location",
      "category" : "location",
      "openMrsClass" : "org.openmrs.Location",
      "enabled" : true,
      "preferredClient" : null
    }, {
      "classTitle" : "Concept",
      "category" : "concept",
      "openMrsClass" : "org.openmrs.Concept",
      "enabled" : false,
      "preferredClient" : null
    }, {
      "classTitle" : "Cohort",
      "category" : "cohort",
      "openMrsClass" : "org.openmrs.Cohort",
      "enabled" : true,
      "preferredClient" : null
    }, {
      "classTitle" : "Visit Type",
      "category" : "visittype",
      "openMrsClass" : "org.openmrs.VisitType",
      "enabled" : false,
      "preferredClient" : null
    }, {
      "classTitle" : "Person",
      "category" : "person",
      "openMrsClass" : "org.openmrs.Person",
      "enabled" : true,
      "preferredClient" : null
    }, {
      "classTitle" : "Provider",
      "category" : "provider",
      "openMrsClass" : "org.openmrs.Provider",
      "enabled" : false,
      "preferredClient" : null
    }, {
      "classTitle" : "User",
      "category" : "user",
      "openMrsClass" : "org.openmrs.User",
      "enabled" : false,
      "preferredClient" : null
    }, {
      "classTitle" : "Patient",
      "category" : "patient",
      "openMrsClass" : "org.openmrs.Patient",
      "enabled" : true,
      "preferredClient" : null
    }, {
      "classTitle" : "PersonAddress",
      "category" : "person_address",
      "openMrsClass" : "org.openmrs.PersonAddress",
      "enabled" : true,
      "preferredClient" : null
    }, {
      "classTitle" : "PersonName",
      "category" : "person_name",
      "openMrsClass" : "org.openmrs.PersonName",
      "enabled" : true,
      "preferredClient" : null
    }, {
      "classTitle" : "PatientIdentifier",
      "category" : "patient_identifier",
      "openMrsClass" : "org.openmrs.PatientIdentifier",
      "enabled" : true,
      "preferredClient" : null
    }, {
      "classTitle" : "Relationship",
      "category" : "relationship",
      "openMrsClass" : "org.openmrs.Relationship",
      "enabled" : false,
      "preferredClient" : null
    }, {
      "classTitle" : "Drug",
      "category" : "drug",
      "openMrsClass" : "org.openmrs.Drug",
      "enabled" : false,
      "preferredClient" : null
    }, {
      "classTitle" : "Allergy",
      "category" : "allergy",
      "openMrsClass" : "org.openmrs.Allergy",
      "enabled" : true,
      "preferredClient" : null
    }, {
      "classTitle" : "Form",
      "category" : "form",
      "openMrsClass" : "org.openmrs.Form",
      "enabled" : true,
      "preferredClient" : null
    }, {
      "classTitle" : "Order",
      "category" : "order",
      "openMrsClass" : "org.openmrs.Order",
      "enabled" : false,
      "preferredClient" : null
    }, {
      "classTitle" : "DrugOrder",
      "category" : "drug_order",
      "openMrsClass" : "org.openmrs.DrugOrder",
      "enabled" : false,
      "preferredClient" : null
    }, {
      "classTitle" : "TestOrder",
      "category" : "test_order",
      "openMrsClass" : "org.openmrs.TestOrder",
      "enabled" : false,
      "preferredClient" : null
    }, {
      "classTitle" : "Visit",
      "category" : "visit",
      "openMrsClass" : "org.openmrs.Visit",
      "enabled" : false,
      "preferredClient" : null
    }, {
      "classTitle" : "Encounter",
      "category" : "encounter",
      "openMrsClass" : "org.openmrs.Encounter",
      "enabled" : false,
      "preferredClient" : null
    }, {
      "classTitle" : "Observation",
      "category" : "observation",
      "openMrsClass" : "org.openmrs.Obs",
      "enabled" : false,
      "preferredClient" : null
    }, {
      "classTitle" : "Program",
      "category" : "program",
      "openMrsClass" : "org.openmrs.Program",
      "enabled" : false,
      "preferredClient" : null
    }, {
      "classTitle" : "Program Enrollment",
      "category" : "programenrollment",
      "openMrsClass" : "org.openmrs.PatientProgram",
      "enabled" : false,
      "preferredClient" : null
    }, {
      "classTitle" : "Privilege",
      "category" : "privilege",
      "openMrsClass" : "org.openmrs.Privilege",
      "enabled" : true,
      "preferredClient" : null
    }, {
      "classTitle" : "AuditMessage",
      "category" : "audit_message",
      "openMrsClass" : "org.openmrs.module.sync2.api.model.audit.AuditMessage",
      "enabled" : true,
      "preferredClient" : null
    } ]
  },
  "pull" : {
    "enabled" : false,
    "schedule" : 43200,
    "classes" : [ {
      "classTitle" : "Location",
      "category" : "location",
      "openMrsClass" : "org.openmrs.Location",
      "enabled" : true,
      "preferredClient" : null
    }, {
      "classTitle" : "Concept",
      "category" : "concept",
      "openMrsClass" : "org.openmrs.Concept",
      "enabled" : false,
      "preferredClient" : null
    }, {
      "classTitle" : "Cohort",
      "category" : "cohort",
      "openMrsClass" : "org.openmrs.Cohort",
      "enabled" : true,
      "preferredClient" : null
    }, {
      "classTitle" : "Visit Type",
      "category" : "visittype",
      "openMrsClass" : "org.openmrs.VisitType",
      "enabled" : false,
      "preferredClient" : null
    }, {
      "classTitle" : "Person",
      "category" : "person",
      "openMrsClass" : "org.openmrs.Person",
      "enabled" : true,
      "preferredClient" : null
    }, {
      "classTitle" : "Provider",
      "category" : "provider",
      "openMrsClass" : "org.openmrs.Provider",
      "enabled" : false,
      "preferredClient" : null
    }, {
      "classTitle" : "User",
      "category" : "user",
      "openMrsClass" : "org.openmrs.User",
      "enabled" : false,
      "preferredClient" : null
    }, {
      "classTitle" : "Patient",
      "category" : "patient",
      "openMrsClass" : "org.openmrs.Patient",
      "enabled" : true,
      "preferredClient" : null
    }, {
      "classTitle" : "PersonAddress",
      "category" : "person_address",
      "openMrsClass" : "org.openmrs.PersonAddress",
      "enabled" : true,
      "preferredClient" : null
    }, {
      "classTitle" : "PersonName",
      "category" : "person_name",
      "openMrsClass" : "org.openmrs.PersonName",
      "enabled" : true,
      "preferredClient" : null
    }, {
      "classTitle" : "PatientIdentifier",
      "category" : "patient_identifier",
      "openMrsClass" : "org.openmrs.PatientIdentifier",
      "enabled" : true,
      "preferredClient" : null
    }, {
      "classTitle" : "Relationship",
      "category" : "relationship",
      "openMrsClass" : "org.openmrs.Relationship",
      "enabled" : false,
      "preferredClient" : null
    }, {
      "classTitle" : "Drug",
      "category" : "drug",
      "openMrsClass" : "org.openmrs.Drug",
      "enabled" : false,
      "preferredClient" : null
    }, {
      "classTitle" : "Allergy",
      "category" : "allergy",
      "openMrsClass" : "org.openmrs.Allergy",
      "enabled" : true,
      "preferredClient" : null
    }, {
      "classTitle" : "Form",
      "category" : "form",
      "openMrsClass" : "org.openmrs.Form",
      "enabled" : true,
      "preferredClient" : null
    }, {
      "classTitle" : "Order",
      "category" : "order",
      "openMrsClass" : "org.openmrs.Order",
      "enabled" : false,
      "preferredClient" : null
    }, {
      "classTitle" : "DrugOrder",
      "category" : "drug_order",
      "openMrsClass" : "org.openmrs.DrugOrder",
      "enabled" : true,
      "preferredClient" : null
    }, {
      "classTitle" : "TestOrder",
      "category" : "test_order",
      "openMrsClass" : "org.openmrs.TestOrder",
      "enabled" : true,
      "preferredClient" : null
    }, {
      "classTitle" : "Visit",
      "category" : "visit",
      "openMrsClass" : "org.openmrs.Visit",
      "enabled" : true,
      "preferredClient" : null
    }, {
      "classTitle" : "Encounter",
      "category" : "encounter",
      "openMrsClass" : "org.openmrs.Encounter",
      "enabled" : true,
      "preferredClient" : null
    }, {
      "classTitle" : "Observation",
      "category" : "observation",
      "openMrsClass" : "org.openmrs.Obs",
      "enabled" : true,
      "preferredClient" : null
    }, {
      "classTitle" : "Program",
      "category" : "program",
      "openMrsClass" : "org.openmrs.Program",
      "enabled" : false,
      "preferredClient" : null
    }, {
      "classTitle" : "Program Enrollment",
      "category" : "programenrollment",
      "openMrsClass" : "org.openmrs.PatientProgram",
      "enabled" : false,
      "preferredClient" : null
    }, {
      "classTitle" : "Privilege",
      "category" : "privilege",
      "openMrsClass" : "org.openmrs.Privilege",
      "enabled" : true,
      "preferredClient" : null
    }, {
      "classTitle" : "AuditMessage",
      "category" : "audit_message",
      "openMrsClass" : "org.openmrs.module.sync2.api.model.audit.AuditMessage",
      "enabled" : false,
      "preferredClient" : null
    } ]
  },
  "whitelist" : {
    "enabled" : false,
    "instanceIds" : [ ]
  }
}

Atomfeed Configuration

{
  "feedFilterBeans" : [ ],
  "feedConfigurations" : [ {
    "openMrsClass" : "org.openmrs.Location",
    "enabled" : true,
    "title" : "Location",
    "category" : "location",
    "linkTemplates" : {
      "rest" : "/ws/rest/v1/location/{uuid}?v=full",
      "fhir" : "/ws/fhir/Location/{uuid}"
    },
    "feedWriter" : null
  }, {
    "openMrsClass" : "org.openmrs.Concept",
    "enabled" : false,
    "title" : "Concept",
    "category" : "concept",
    "linkTemplates" : {
      "rest" : "/ws/rest/v1/concept/{uuid}?v=full"
    },
    "feedWriter" : null
  }, {
    "openMrsClass" : "org.openmrs.Cohort",
    "enabled" : true,
    "title" : "Cohort",
    "category" : "cohort",
    "linkTemplates" : {
      "rest" : "/ws/rest/v1/cohort/{uuid}?v=full",
      "fhir" : "/ws/fhir/Group/{uuid}"
    },
    "feedWriter" : null
  }, {
    "openMrsClass" : "org.openmrs.VisitType",
    "enabled" : false,
    "title" : "Visit Type",
    "category" : "visittype",
    "linkTemplates" : {
      "rest" : "/ws/rest/v1/visittype/{uuid}?v=full"
    },
    "feedWriter" : null
  }, {
    "openMrsClass" : "org.openmrs.PersonAddress",
    "enabled" : true,
    "title" : "PersonAddress",
    "category" : "person_address",
    "linkTemplates" : {
      "rest" : "/ws/rest/v1/person/{parent-uuid}/address/{uuid}?v=full"
    },
    "feedWriter" : null
  }, {
    "openMrsClass" : "org.openmrs.PersonName",
    "enabled" : true,
    "title" : "PersonName",
    "category" : "person_name",
    "linkTemplates" : {
      "rest" : "/ws/rest/v1/person/{parent-uuid}/name/{uuid}?v=full"
    },
    "feedWriter" : null
  }, {
    "openMrsClass" : "org.openmrs.PatientIdentifier",
    "enabled" : true,
    "title" : "PatientIdentifier",
    "category" : "patient_identifier",
    "linkTemplates" : {
      "rest" : "/ws/rest/v1/patient/{parent-uuid}/identifier/{uuid}?v=full"
    },
    "feedWriter" : null
  }, {
    "openMrsClass" : "org.openmrs.Person",
    "enabled" : true,
    "title" : "Person",
    "category" : "person",
    "linkTemplates" : {
      "rest" : "/ws/rest/v1/person/{uuid}?v=full",
      "fhir" : "/ws/fhir/Person/{uuid}"
    },
    "feedWriter" : null
  }, {
    "openMrsClass" : "org.openmrs.Provider",
    "enabled" : false,
    "title" : "Provider",
    "category" : "provider",
    "linkTemplates" : {
      "rest" : "/ws/rest/v1/provider/{uuid}?v=full",
      "fhir" : "/ws/fhir/Provider/{uuid}"
    },
    "feedWriter" : null
  }, {
    "openMrsClass" : "org.openmrs.User",
    "enabled" : false,
    "title" : "User",
    "category" : "user",
    "linkTemplates" : {
      "rest" : "/ws/rest/v1/user/{uuid}?v=full"
    },
    "feedWriter" : null
  }, {
    "openMrsClass" : "org.openmrs.Patient",
    "enabled" : true,
    "title" : "Patient",
    "category" : "patient",
    "linkTemplates" : {
      "rest" : "/ws/rest/v1/patient/{uuid}?v=full",
      "fhir" : "/ws/fhir/Patient/{uuid}"
    },
    "feedWriter" : null
  }, {
    "openMrsClass" : "org.openmrs.Relationship",
    "enabled" : true,
    "title" : "Relationship",
    "category" : "relationship",
    "linkTemplates" : {
      "rest" : "/ws/rest/v1/relationship/{uuid}?v=full",
      "fhir" : "/ws/fhir/Relationship/{uuid}"
    },
    "feedWriter" : null
  }, {
    "openMrsClass" : "org.openmrs.Drug",
    "enabled" : false,
    "title" : "Drug",
    "category" : "drug",
    "linkTemplates" : {
      "rest" : "/ws/rest/v1/drug/{uuid}?v=full",
      "fhir" : "/ws/fhir/Drug/{uuid}"
    },
    "feedWriter" : null
  }, {
    "openMrsClass" : "org.openmrs.Allergy",
    "enabled" : true,
    "title" : "Allergy",
    "category" : "allergy",
    "linkTemplates" : {
      "rest" : "/ws/rest/v1/allergy/{uuid}?v=full",
      "fhir" : "/ws/fhir/AllergyIntolerance/{uuid}"
    },
    "feedWriter" : null
  }, {
    "openMrsClass" : "org.openmrs.Form",
    "enabled" : true,
    "title" : "Form",
    "category" : "form",
    "linkTemplates" : {
      "rest" : "/ws/rest/v1/form/{uuid}?v=full"
    },
    "feedWriter" : null
  }, {
    "openMrsClass" : "org.openmrs.Order",
    "enabled" : false,
    "title" : "Order",
    "category" : "order",
    "linkTemplates" : {
      "rest" : "/ws/rest/v1/order/{uuid}?v=full",
      "fhir" : "/ws/fhir/Order/{uuid}"
    },
    "feedWriter" : null
  }, {
    "openMrsClass" : "org.openmrs.DrugOrder",
    "enabled" : true,
    "title" : "DrugOrder",
    "category" : "drug_order",
    "linkTemplates" : {
      "rest" : "/ws/rest/v1/drug_order/{uuid}?v=full",
      "fhir" : "/ws/fhir/MedicationRequest/{uuid}"
    },
    "feedWriter" : null
  }, {
    "openMrsClass" : "org.openmrs.TestOrder",
    "enabled" : true,
    "title" : "TestOrder",
    "category" : "test_order",
    "linkTemplates" : {
      "rest" : "/ws/rest/v1/test_order/{uuid}?v=full",
      "fhir" : "/ws/fhir/ProcedureRequest/{uuid}"
    },
    "feedWriter" : null
  }, {
    "openMrsClass" : "org.openmrs.Obs",
    "enabled" : true,
    "title" : "Observation",
    "category" : "observation",
    "linkTemplates" : {
      "rest" : "/ws/rest/v1/obs/{uuid}?v=full",
      "fhir" : "/ws/fhir/Observation/{uuid}"
    },
    "feedWriter" : null
  }, {
    "openMrsClass" : "org.openmrs.Encounter",
    "enabled" : true,
    "title" : "Encounter",
    "category" : "encounter",
    "linkTemplates" : {
      "rest" : "/ws/rest/v1/encounter/{uuid}?v=full",
      "fhir" : "/ws/fhir/Encounter/{uuid}"
    },
    "feedWriter" : null
  }, {
    "openMrsClass" : "org.openmrs.Visit",
    "enabled" : true,
    "title" : "Visit",
    "category" : "visit",
    "linkTemplates" : {
      "rest" : "/ws/rest/v1/visit/{uuid}?v=full",
      "fhir" : "/ws/fhir/Encounter/{uuid}"
    },
    "feedWriter" : null
  }, {
    "openMrsClass" : "org.openmrs.Program",
    "enabled" : false,
    "title" : "Program",
    "category" : "program",
    "linkTemplates" : {
      "rest" : "/ws/rest/v1/program/{uuid}?v=full",
      "fhir" : "/ws/fhir/Program/{uuid}"
    },
    "feedWriter" : null
  }, {
    "openMrsClass" : "org.openmrs.PatientProgram",
    "enabled" : false,
    "title" : "Program Enrollment",
    "category" : "programenrollment",
    "linkTemplates" : {
      "rest" : "/ws/rest/v1/programenrollment/{uuid}?v=full",
      "fhir" : "/ws/fhir/Programenrollment/{uuid}"
    },
    "feedWriter" : null
  }, {
    "openMrsClass" : "org.openmrs.Privilege",
    "enabled" : true,
    "title" : "Privilege",
    "category" : "privilege",
    "linkTemplates" : {
      "rest" : "/ws/rest/v1/privilege/{uuid}?v=full"
    },
    "feedWriter" : null
  }, {
    "openMrsClass" : "org.openmrs.module.sync2.api.model.audit.AuditMessage",
    "enabled" : true,
    "title" : "AuditMessage",
    "category" : "audit_message",
    "linkTemplates" : {
      "rest" : "/ws/rest/sync2/messages/{uuid}"
    },
    "feedWriter" : null
  } ]
}

Child Server

Sync Config Json

{
  "general" : {
    "parentFeedLocation" : "http://localhost:8095/openmrs",
    "localFeedLocation" : "http://localhost:8096/openmrs",
    "localInstanceId" : "facility1",
    "persistSuccessAudit" : true,
    "persistFailureAudit" : true,
    "clients" : { }
  },
  "push" : {
    "enabled" : false,
    "schedule" : 43200,
    "classes" : [ {
      "classTitle" : "Location",
      "category" : "location",
      "openMrsClass" : "org.openmrs.Location",
      "enabled" : true,
      "preferredClient" : null
    }, {
      "classTitle" : "Concept",
      "category" : "concept",
      "openMrsClass" : "org.openmrs.Concept",
      "enabled" : false,
      "preferredClient" : null
    }, {
      "classTitle" : "Cohort",
      "category" : "cohort",
      "openMrsClass" : "org.openmrs.Cohort",
      "enabled" : true,
      "preferredClient" : null
    }, {
      "classTitle" : "Visit Type",
      "category" : "visittype",
      "openMrsClass" : "org.openmrs.VisitType",
      "enabled" : false,
      "preferredClient" : null
    }, {
      "classTitle" : "Person",
      "category" : "person",
      "openMrsClass" : "org.openmrs.Person",
      "enabled" : true,
      "preferredClient" : null
    }, {
      "classTitle" : "Provider",
      "category" : "provider",
      "openMrsClass" : "org.openmrs.Provider",
      "enabled" : false,
      "preferredClient" : null
    }, {
      "classTitle" : "User",
      "category" : "user",
      "openMrsClass" : "org.openmrs.User",
      "enabled" : false,
      "preferredClient" : null
    }, {
      "classTitle" : "Patient",
      "category" : "patient",
      "openMrsClass" : "org.openmrs.Patient",
      "enabled" : true,
      "preferredClient" : null
    }, {
      "classTitle" : "PersonAddress",
      "category" : "person_address",
      "openMrsClass" : "org.openmrs.PersonAddress",
      "enabled" : true,
      "preferredClient" : null
    }, {
      "classTitle" : "PersonName",
      "category" : "person_name",
      "openMrsClass" : "org.openmrs.PersonName",
      "enabled" : true,
      "preferredClient" : null
    }, {
      "classTitle" : "PatientIdentifier",
      "category" : "patient_identifier",
      "openMrsClass" : "org.openmrs.PatientIdentifier",
      "enabled" : true,
      "preferredClient" : null
    }, {
      "classTitle" : "Relationship",
      "category" : "relationship",
      "openMrsClass" : "org.openmrs.Relationship",
      "enabled" : false,
      "preferredClient" : null
    }, {
      "classTitle" : "Drug",
      "category" : "drug",
      "openMrsClass" : "org.openmrs.Drug",
      "enabled" : false,
      "preferredClient" : null
    }, {
      "classTitle" : "Allergy",
      "category" : "allergy",
      "openMrsClass" : "org.openmrs.Allergy",
      "enabled" : true,
      "preferredClient" : null
    }, {
      "classTitle" : "Form",
      "category" : "form",
      "openMrsClass" : "org.openmrs.Form",
      "enabled" : true,
      "preferredClient" : null
    }, {
      "classTitle" : "Order",
      "category" : "order",
      "openMrsClass" : "org.openmrs.Order",
      "enabled" : false,
      "preferredClient" : null
    }, {
      "classTitle" : "DrugOrder",
      "category" : "drug_order",
      "openMrsClass" : "org.openmrs.DrugOrder",
      "enabled" : true,
      "preferredClient" : null
    }, {
      "classTitle" : "TestOrder",
      "category" : "test_order",
      "openMrsClass" : "org.openmrs.TestOrder",
      "enabled" : true,
      "preferredClient" : null
    }, {
      "classTitle" : "Visit",
      "category" : "visit",
      "openMrsClass" : "org.openmrs.Visit",
      "enabled" : true,
      "preferredClient" : null
    }, {
      "classTitle" : "Encounter",
      "category" : "encounter",
      "openMrsClass" : "org.openmrs.Encounter",
      "enabled" : true,
      "preferredClient" : null
    }, {
      "classTitle" : "Observation",
      "category" : "observation",
      "openMrsClass" : "org.openmrs.Obs",
      "enabled" : true,
      "preferredClient" : null
    }, {
      "classTitle" : "Program",
      "category" : "program",
      "openMrsClass" : "org.openmrs.Program",
      "enabled" : false,
      "preferredClient" : null
    }, {
      "classTitle" : "Program Enrollment",
      "category" : "programenrollment",
      "openMrsClass" : "org.openmrs.PatientProgram",
      "enabled" : false,
      "preferredClient" : null
    }, {
      "classTitle" : "Privilege",
      "category" : "privilege",
      "openMrsClass" : "org.openmrs.Privilege",
      "enabled" : true,
      "preferredClient" : null
    }, {
      "classTitle" : "AuditMessage",
      "category" : "audit_message",
      "openMrsClass" : "org.openmrs.module.sync2.api.model.audit.AuditMessage",
      "enabled" : true,
      "preferredClient" : null
    } ]
  },
  "pull" : {
    "enabled" : false,
    "schedule" : 43200,
    "classes" : [ {
      "classTitle" : "Location",
      "category" : "location",
      "openMrsClass" : "org.openmrs.Location",
      "enabled" : true,
      "preferredClient" : null
    }, {
      "classTitle" : "Concept",
      "category" : "concept",
      "openMrsClass" : "org.openmrs.Concept",
      "enabled" : false,
      "preferredClient" : null
    }, {
      "classTitle" : "Cohort",
      "category" : "cohort",
      "openMrsClass" : "org.openmrs.Cohort",
      "enabled" : true,
      "preferredClient" : null
    }, {
      "classTitle" : "Visit Type",
      "category" : "visittype",
      "openMrsClass" : "org.openmrs.VisitType",
      "enabled" : false,
      "preferredClient" : null
    }, {
      "classTitle" : "Person",
      "category" : "person",
      "openMrsClass" : "org.openmrs.Person",
      "enabled" : true,
      "preferredClient" : null
    }, {
      "classTitle" : "Provider",
      "category" : "provider",
      "openMrsClass" : "org.openmrs.Provider",
      "enabled" : false,
      "preferredClient" : null
    }, {
      "classTitle" : "User",
      "category" : "user",
      "openMrsClass" : "org.openmrs.User",
      "enabled" : false,
      "preferredClient" : null
    }, {
      "classTitle" : "Patient",
      "category" : "patient",
      "openMrsClass" : "org.openmrs.Patient",
      "enabled" : true,
      "preferredClient" : null
    }, {
      "classTitle" : "PersonAddress",
      "category" : "person_address",
      "openMrsClass" : "org.openmrs.PersonAddress",
      "enabled" : true,
      "preferredClient" : null
    }, {
      "classTitle" : "PersonName",
      "category" : "person_name",
      "openMrsClass" : "org.openmrs.PersonName",
      "enabled" : true,
      "preferredClient" : null
    }, {
      "classTitle" : "PatientIdentifier",
      "category" : "patient_identifier",
      "openMrsClass" : "org.openmrs.PatientIdentifier",
      "enabled" : true,
      "preferredClient" : null
    }, {
      "classTitle" : "Relationship",
      "category" : "relationship",
      "openMrsClass" : "org.openmrs.Relationship",
      "enabled" : false,
      "preferredClient" : null
    }, {
      "classTitle" : "Drug",
      "category" : "drug",
      "openMrsClass" : "org.openmrs.Drug",
      "enabled" : false,
      "preferredClient" : null
    }, {
      "classTitle" : "Allergy",
      "category" : "allergy",
      "openMrsClass" : "org.openmrs.Allergy",
      "enabled" : true,
      "preferredClient" : null
    }, {
      "classTitle" : "Form",
      "category" : "form",
      "openMrsClass" : "org.openmrs.Form",
      "enabled" : true,
      "preferredClient" : null
    }, {
      "classTitle" : "Order",
      "category" : "order",
      "openMrsClass" : "org.openmrs.Order",
      "enabled" : false,
      "preferredClient" : null
    }, {
      "classTitle" : "DrugOrder",
      "category" : "drug_order",
      "openMrsClass" : "org.openmrs.DrugOrder",
      "enabled" : false,
      "preferredClient" : null
    }, {
      "classTitle" : "TestOrder",
      "category" : "test_order",
      "openMrsClass" : "org.openmrs.TestOrder",
      "enabled" : false,
      "preferredClient" : null
    }, {
      "classTitle" : "Visit",
      "category" : "visit",
      "openMrsClass" : "org.openmrs.Visit",
      "enabled" : false,
      "preferredClient" : null
    }, {
      "classTitle" : "Encounter",
      "category" : "encounter",
      "openMrsClass" : "org.openmrs.Encounter",
      "enabled" : false,
      "preferredClient" : null
    }, {
      "classTitle" : "Observation",
      "category" : "observation",
      "openMrsClass" : "org.openmrs.Obs",
      "enabled" : false,
      "preferredClient" : null
    }, {
      "classTitle" : "Program",
      "category" : "program",
      "openMrsClass" : "org.openmrs.Program",
      "enabled" : false,
      "preferredClient" : null
    }, {
      "classTitle" : "Program Enrollment",
      "category" : "programenrollment",
      "openMrsClass" : "org.openmrs.PatientProgram",
      "enabled" : false,
      "preferredClient" : null
    }, {
      "classTitle" : "Privilege",
      "category" : "privilege",
      "openMrsClass" : "org.openmrs.Privilege",
      "enabled" : false,
      "preferredClient" : null
    }, {
      "classTitle" : "AuditMessage",
      "category" : "audit_message",
      "openMrsClass" : "org.openmrs.module.sync2.api.model.audit.AuditMessage",
      "enabled" : false,
      "preferredClient" : null
    } ]
  },
  "whitelist" : {
    "enabled" : false,
    "instanceIds" : [ ]
  }
}

Atomfeed Configuration is similar to the parent one above.

I also have the global properties for username/password properly configured.

Below is the list of modules I have on both systems.

Let me know if there is anything else I am missing in this setup.

Thank you everyone.

UPDATE

It turns out fhir module has a transitive dependency on javassist via the thymeleaf. Using a version fo fhir module with these dependencies excluded fixes this problem. I have already created a ticket

@dkayiwa, @wyclif, @mksd any advice on this one? Thanks. I have been scouring the code base + the web but none of the suggested workarounds works for me! For instance in some similar cases there have been suggested to have public default constructor on the affected entity but it is already there. I am kind of stuck at this point.

Which version of Java are you running?

I am doing this on Oracle java 7. However I run a mvn dependency:tree -Dincludes="javassist" -Dverbose=true on sync2 (checked out the tag 1.6.0) and below is what I see:

➜  openmrs-module-sync2 git:(a3f6b09) ✗ mvn dependency:tree -Dincludes="javassist" -Dverbose=true
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO] 
[INFO] Sync2 Module
[INFO] Sync2 Module API
[INFO] Sync2 Module API 1.9
[INFO] Sync2 Module API 1.9
[INFO] Sync2 Module OMOD
[INFO] 
[INFO] ------------------------------------------------------------------------
[INFO] Building Sync2 Module 1.6.0
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @ sync2 ---
[INFO] org.openmrs.module:sync2:pom:1.6.0
[INFO] +- org.openmrs.api:openmrs-api:jar:1.9.10:provided
[INFO] |  \- javassist:javassist:jar:3.12.1.GA:provided
[INFO] \- org.openmrs.api:openmrs-api:jar:tests:1.9.10:test
[INFO]    \- (javassist:javassist:jar:3.12.1.GA:test - omitted for duplicate)
[INFO] 
[INFO] ------------------------------------------------------------------------
[INFO] Building Sync2 Module API 1.6.0
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @ sync2-api ---
[INFO] org.openmrs.module:sync2-api:jar:1.6.0
[INFO] +- org.openmrs.api:openmrs-api:jar:1.9.10:provided
[INFO] |  \- javassist:javassist:jar:3.12.1.GA:provided
[INFO] \- org.openmrs.api:openmrs-api:jar:tests:1.9.10:test
[INFO]    \- (javassist:javassist:jar:3.12.1.GA:test - omitted for duplicate)
[INFO] 
[INFO] ------------------------------------------------------------------------
[INFO] Building Sync2 Module API 1.9 1.6.0
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @ sync2-api-1.9 ---
[INFO] org.openmrs.module:sync2-api-1.9:jar:1.6.0
[INFO] +- org.openmrs.api:openmrs-api:jar:1.9.10:provided
[INFO] |  \- javassist:javassist:jar:3.12.1.GA:provided
[INFO] \- org.openmrs.api:openmrs-api:jar:tests:1.9.10:test
[INFO]    \- (javassist:javassist:jar:3.12.1.GA:test - omitted for duplicate)
[INFO] 
[INFO] ------------------------------------------------------------------------
[INFO] Building Sync2 Module API 1.9 1.6.0
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @ sync2-api-2.0 ---
[INFO] 
[INFO] ------------------------------------------------------------------------
[INFO] Building Sync2 Module OMOD 1.6.0
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @ sync2-omod ---
[INFO] org.openmrs.module:sync2-omod:jar:1.6.0
[INFO] +- org.openmrs.api:openmrs-api:jar:1.9.10:provided
[INFO] |  \- javassist:javassist:jar:3.12.1.GA:provided
[INFO] \- org.openmrs.api:openmrs-api:jar:tests:1.9.10:test
[INFO]    \- (javassist:javassist:jar:3.12.1.GA:test - omitted for duplicate)
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] Sync2 Module ....................................... SUCCESS [  1.297 s]
[INFO] Sync2 Module API ................................... SUCCESS [  0.888 s]
[INFO] Sync2 Module API 1.9 ............................... SUCCESS [  0.055 s]
[INFO] Sync2 Module API 1.9 ............................... SUCCESS [  0.664 s]
[INFO] Sync2 Module OMOD .................................. SUCCESS [  0.736 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.254 s
[INFO] Finished at: 2019-07-01T14:39:36-05:00
[INFO] Final Memory: 23M/87M
[INFO] ------------------------------------------------------------------------

Notice that the dependency on Openmrs 1.9.10 brings in the transitive dependency on javassist 3.12.1.GA which indeed does not have the method that the NoSuchMethodError is reporting in the log I posted above, while on the other hand this method is available on the version declared in 1.11.6 (the one I am using). So I suspect the class loader is loading the wrong class. What baffles me though is the fact that this dependency is provided which means it won’t be shipped with the module! So, now I am looking into all these jar files in my OpenMRS instance and I only see javassist 3.19.0.GA as expected.

I tried to randomly exclude the library in the pom files without much success.

1 Like

Does the ticket that you opened fix the problem? https://issues.openmrs.org/browse/FM-263

1 Like

Yes it does.

1 Like

I just love your resilience! :slight_smile:

1 Like