ModelMapper failed to convert java.util.List to java.util.List

Viewed 7904

I tried to convert a @Entity into a DTO using ModelMapper, so i got this error:

org.modelmapper.MappingException: ModelMapper mapping errors:

1) Converter org.modelmapper.internal.converter.CollectionConverter@f3e6876 failed to convert java.util.List to java.util.List.

1 error

Someone can help me?

1 Answers

the real problem was:

Caused by: org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: com.example.backapi.aviso.domain.Aviso.links, could not initialize proxy - no Session

Resolved with: @ElementCollection(fetch = FetchType.LAZY)

Related