Jackson 2.5 – JsonMappingException: Missing external type id property

I have this class with an External Property “contentType”:

public class ContentEvent implements AbstractMessagingEvent{
    @JsonTypeInfo(include = JsonTypeInfo.As.EXTERNAL_PROPERTY, use = NAME, property = "contentType")
    public final ContentValue message;

    public ContentEvent(ContentValue message) {
        this.message = message;

    public ContentEvent() {

    public static ContentEvent example () {
        return new ContentEvent(HostedFile.example());

“contentType” can be one of the following:

public interface ContentValue{

When I try to deserialize a JSON which is missing the “contentType” field, I get the following error:

com.fasterxml.jackson.databind.JsonMappingException: Missing external type id property ‘contentType’

I tried adding a ‘defaultImpl=NoClass.class’ and also a defaultImpl=MyOwnCustomClass’ and it clears the error, but the result is an object without any ‘contentType’.

What I want is in case the ‘contentType’ field is missing, to use a default.

Thanks in advance.

You can annotate the class with @JsonIgnoreProperties(ignoreUnknown=true).