Tag Archives: ektorp

CouchDB: Unrecognized field “digest” when fetching documents with attachments

Today, while trying to fetch a document (having a .wav file as an attachment) from CouchDB, came across this exception:

org.ektorp.DbAccessException: org.codehaus.jackson.map.exc.UnrecognizedPropertyException: Unrecognized field “digest” (Class org.ektorp.Attachment), not marked as ignorable

After doing a bit of research, figured out that this happened because the version (v1.1.1) of ektorp that I am using  seems to be incompatible with v1.1.0 of CouchDB. This version of CouchDB expects a new “digest” attribute containing the MD5 checksum (for the attachment) in the document that contains the attachment. However, ektorp v1.1.1 does not find a corresponding Java property while deserializing, which results into this exception. Looks like this change was introduced in CouchDB v1.1.0 to address this issue – https://issues.apache.org/jira/browse/COUCHDB-687.

For now, downgrading CouchDB to v1.0.2 resolved this issue for me.

Advertisements