Uploaded image for project: 'HTML Form Entry Module'
  1. HTML Form Entry Module
  2. HTML-818

encounter.json controller throws an error

    XMLWordPrintable

Details

    • Bug
    • Status: Code Review (Post-Commit)
    • TBD
    • Resolution: Unresolved
    • None
    • HTML Form Entry 5.1.0
    • None

    Description

      Recently, when trying to use the encounter.json endpoint in htmlformentry, an error is throw in the server-side and client-side logs that looks like this:

      SEVERE: Servlet.service() for servlet [openmrs] in context with path [/openmrs] threw exception
      org.codehaus.jackson.JsonParseException: Illegal white space character (code 0x20) as character #3 of 4-char base64 unit: can only used between units
       at [Source: N/A; line: -1, column: -1]
      	at org.codehaus.jackson.node.TextNode._reportInvalidBase64(TextNode.java:291)
      	at org.codehaus.jackson.node.TextNode._reportInvalidBase64(TextNode.java:267)
      	at org.codehaus.jackson.node.TextNode.getBinaryValue(TextNode.java:113)
      	at org.codehaus.jackson.node.TextNode.getBinaryValue(TextNode.java:160)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      

      Not sure what is causing this controller to fail, but it appears to be something internal to how Spring is returning the serialized jackson-json data through the ResponseBody annotation.

      Gliffy Diagrams

        Attachments

          Activity

            People

              mseaton Mike Seaton
              mseaton Mike Seaton
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: