Uploaded image for project: 'OpenMRS Core'
  1. OpenMRS Core
  2. TRUNK-2003

InvalidPropertyException on long patient form when user adds new name or address or identifier

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Could
    • Resolution: Cannot Reproduce
    • Affects Version/s: OpenMRS 1.7.0
    • Fix Version/s: Platform 2.0.0
    • Component/s: None
    • Labels:
    • Complexity:
      Undetermined

      Description

      When a user adds a new patient address or name or identifier and they get sent back to the form after validation errors, if they try to resubmit the form, an 'org.springframework.beans.InvalidPropertyException' is encountered. This bug shows up nearly in all OpenMRS versions prior to 1.9.

      To reproduce:

      1. from the patient dashboard, go to Edit Patient (the long form version)
      2. change the birthdate to something illegal (99/99/9999) and add another name for the patient
      3. click save
      4. (as expected you get an error about the birthdate)
      5. fix the birthdate
      6. click save again
      7. you get an ugly error page like:
        Invalid property 'names[2]' of bean class [org.openmrs.Patient]: Illegal attempt to get property 'names' threw exception; nested exception is org.springframework.beans.InvalidPropertyException: Invalid property 'names[2]' of bean class [org.openmrs.Patient]: Cannot get element with index 2 from Set of size 2, accessed using property path 'names[2]'
        

        Gliffy Diagrams

          Attachments

            Attachments-Category-Modification

              Activity

                People

                • Assignee:
                  Unassigned
                  Reporter:
                  wyclif Wyclif Luyima
                  Watchers:
                  Ben Wolfe, Christoph Weyers, Daniel Kayiwa, Darius Jazayeri, Dumindu Karunathilaka, Lluis Martinez, Rahul Akula, Sara Fatima, Susan Tan, Tristan Knope-Jenkins, Vaibhav Agarwal, Wyclif Luyima, Zakaria Amine
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  13 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: