wyjątek podczas używania adnotacji jackson i ormlite w jednym obiekcie

ja używamJackson biblioteka do analizowania jsona w obiekt i używaniaormlite aby przechowywać te same obiekty w db sqlite. Oto moje klasy modeli:

public class Site {
    private String uniqueId;
    private String name;
    private ForeignCollection<ContactDetails> items;

    @JsonProperty("contact_details")
    public void setContactDetails(ForeignCollection<ContactDetails> contact_details) {
        this.items = contact_details;
    }

    public List<ContactDetails> getContactDetails() {
        return new ArrayList<ContactDetails>(items);
    }

    public String getUniqueId() {
        return uniqueId;
    }
    @JsonProperty("unique_id")
    public void setUniqueId(String uniqueId) {
        this.uniqueId = uniqueId;
    }
    public String getName() {
        return name;
    }
    @JsonProperty("name")
    public void setName(String name) {
        this.name = name;
    }
}

a klasa ContactDetails to:

public class ContactDetails {

    @JsonProperty("contact_detail_id")
    int getContactDetailId;
    @JsonProperty("cellphone_number")
    String getCellphoneNumber;
    @JsonProperty("email")
    String getEmail;
    @JsonProperty("name")
    String getName;
}

a mój syn to:

{
    "unique_id": "WDV000282",
    "name": "2XL - Diverse werken - Zeebrugge",

    "contact_details": [
        {
            "contact_detail_id": 20647,
            "cellphone_number": "123456",
            "email": "[email protected]",
            "name": "plabon",

        },
        {
            "contact_detail_id": 20648,
            "cellphone_number": "",
            "email": "[email protected]",
            "name": "test",

        }
    ]
}

Ale kiedy wykonam wartość odczytu:

Site test= objectMapper.readValue(json, Site.class); 

otrzymuję następujący wyjątek

org.codehaus.jackson.map.JsonMappingException: Can not find a deserializer for non-concrete Collection type [collection type; class com.j256.ormlite.dao.ForeignCollection, contains [simple type, class com.example.jacksonparsingtest.ContactDetails]]

Nie dostaję tego, co się dzieje? Pomóż Plz ...

questionAnswers(2)

yourAnswerToTheQuestion