This is the problem:
JsonMappingException: No serializer found for class org.mozilla.javascript.Undefined
Sounds like you emitted a JavaScript Undefined
object as a key or value, or as part of one, and the Jackson library can’t serialize that to JSON (since Undefined is not the same as null.)
Since you don’t get this with a SQLite database, I’m guessing that the Java implementation’s SQLite storage code has a workaround for this, probably converting the Undefined to a null, but the ForestDB storage code doesn’t have the same workaround. (@hideki would know for sure.)
The workaround would be to avoid letting Undefined values be passed to emit()
and use null instead.