Exception when creating patient via REST API

Full stack trace in follow-up reply, below.

Daniel, this seems to be the same exception that I get when searching for a patient. I previously created topic 37212 for that, but perhaps they can be merged.

I guess both the patient create and search end up serializing the patient object as JSON, which triggers this error?

However, if I simply GET the patient by UUID it does work, e.g.: GET http://localhost:8080/openmrs/ws/rest/v1/person/414a69dc-3c6b-4644-ad01-52696a8916d1