Reputation: 33
After adding to my DTO object, I want to send a list to the server
private ImmutableList<T> elementsToAdd;
from
import com.google.common.collect.ImmutableList;
When sending an object to the controller it throws
2018-06-04 21:41:31.645 WARN 508 --- [nio-8443-exec-6] .c.j.MappingJackson2HttpMessageConverter : Failed to evaluate Jackson deserialization for type [[simple type, class com.jonki.popcorn.common.dto.request.ContributionNewRequest<com.jonki.popcorn.common.dto.movie.Language>]]: com.fasterxml.jackson.databind.JsonMappingException: Cannot find a deserializer for non-concrete Collection type [collection type; class com.google.common.collect.ImmutableList, contains [simple type, class com.jonki.popcorn.common.dto.movie.Language]]
Upvotes: 1
Views: 5219
Reputation: 14035
You need to configure Jackson so it can serialize / deserialize Guava's imutable collections. See https://github.com/FasterXML/jackson-datatypes-collections/tree/master/guava.
Upvotes: 1