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

Error creating a complex Obs

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: TBD
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Complexity:
      Medium

      Description

      Picking up on something that I discovered a while back.

      This issue is created based on the conversations we had on this matter, plus my subsequent investigations.

      The elaborate (and ancient) mail regarding this issue can be found here-

      http://openmrs-mailing-list-archives.1560443.n2.nabble.com/Getting-an-error-while-trying-to-create-a-complex-observation-td6337087.html

      Basically, I was unable to store an image as a complex Obs using our trunk, as the image I was uploading was not getting detected.

      I was able to recreate this in my local machine using tomcat and jetty, plus got Daniel Kaiyawa to also have a go, and he also reported that it will not work.

      However, strangely, it does work on demo.openmrs.org.

      I realized that this is most possibly because of a performance issue. Apparently the newly created complex obs is being validated before the image (or file) had finished uploading. I believe that this issue does not come up in the demo server or other actual implementations possibly because they live in their own dedicated machines, and are more powerful than mine.

      However I think it's best if we fix this so that it will work on everyone's machines regardless of their performance

      It is possible to fix this by changing the way validation is being done (instead of checking for obs.getValueComplex == null in the validator, we check the Multipart request in the controller class)

      May I change it to that?
      And also, another issue I discovered - (this exists in both the trunk and the demo server)-
      Apparently you cannot edit a complex obs containing an image - it throws a terrible null pointer, even if you're not really changing any data.

      Should I go ahead and fix both these issues ?

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              surangak Suranga Kasthurirathne
              Reporter:
              surangak Suranga Kasthurirathne
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: