Uploaded image for project: 'Webservices REST Module'
  1. Webservices REST Module
  2. RESTWS-155

Retrieving Concept Through uuid GET throws JsonMappingException

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Must
    • Resolution: Fixed
    • Affects Version/s: Followup to Sprint 1
    • Fix Version/s: Sprint 2
    • Labels:
    • Complexity:
      Medium
    • Development:

      Description

      When retrieving a Concept by the uuid in a GET call like this:

      curl -i -u admin:test http://localhost:8080/openmrs/ws/rest/concept/085f195a-a026-11e0-b06a-020054746872 

      throws org.codehaus.jackson.map.JsonMappingException: Conflicting getter definitions for property \"set\": org.openmrs.Concept#isSet(0 params) vs org.openmrs.Concept#getSet(0 params)

      This is because Jackson tries to deserialize the object to a JSON and then finds two methods for the set property (viz. getSet and isSet). Thus, the concept cannot be retrieved.

      One suggested way to solve this is to disable auto-detection of is getters. http://wiki.fasterxml.com/JacksonFeaturesSerialization

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                wyclif Wyclif Luyima
                Reporter:
                sunbiz Saptarshi Purkayastha
                Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: