Details
-
Bug
-
Status: Closed
-
TBD
-
Resolution: Fixed
-
None
-
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.