title: Failed to evaluate Jackson deserialization for type
body: <p>I'm trying to create a many to many relation between movies and users. When I save a movie I get this error:</p>
  <blockquote>
  <p>2017-12-01 16:12:43.351  WARN 17328 --- [nio-8090-exec-5] .c.j.MappingJackson2HttpMessageConverter : Failed to evaluate Jackson deserialization for type [[simple type, class com.movieseat.models.Movie]]: java.lang.IllegalArgumentException: Can not handle managed/back reference 'defaultReference': back reference type (java.util.List) not compatible with managed type (com.movieseat.model.security.User)</p>
  <p>2017-12-01 16:12:43.354  WARN 17328 --- [nio-8090-exec-5] .c.j.MappingJackson2HttpMessageConverter : Failed to evaluate Jackson deserialization for type [[simple type, class com.movieseat.models.Movie]]: java.lang.IllegalArgumentException: Can not handle managed/back reference 'defaultReference': back reference type (java.util.List) not compatible with managed type (com.movieseat.model.security.User)</p>
  <p>2017-12-01 16:12:43.356  WARN 17328 --- [nio-8090-exec-5] .w.s.m.s.DefaultHandlerExceptionResolver : Resolved exception caused by Handler execution: org.springframework.web.HttpMediaTypeNotSupportedException: Content type 'application/json;charset=UTF-8' not supported</p>
  </blockquote>
  <p>I had an issue:</p>
  <blockquote>
  <p>org.hibernate.collection.internal.PersistentBag[0]-&gt;com.mo‌​vieseat.model.securi‌​ty.User[&quot;authorities‌​&quot;]-&gt;org.hibernate.co‌​llection.internal.Pe‌​rsistentBag[0]-&gt;com.‌​movieseat.model.secu‌​rity.Authority[&quot;user‌​s&quot;]</p>
  </blockquote>
  <p>Which I fixed by: User.java</p>
  <pre><code>@JsonManagedReference                
  @ManyToMany(fetch = FetchType.EAGER)
  @JoinTable(
          name = &quot;USER_AUTHORITY&quot;,
          joinColumns = {@JoinColumn(name = &quot;USER_ID&quot;, referencedColumnName = &quot;ID&quot;)},
          inverseJoinColumns = {@JoinColumn(name = &quot;AUTHORITY_ID&quot;, referencedColumnName = &quot;ID&quot;)})
  private List&lt;Authority&gt; authorities;
  </code></pre>
  <p>And Authority.java:</p>
  <pre><code>@JsonBackReference
  @ManyToMany(mappedBy = &quot;authorities&quot;, fetch = FetchType.LAZY)
  private List&lt;User&gt; users;
  </code></pre>
  <p>But now it seems that my Movie.java model also needs some kind of annotation. The error states:</p>
  <blockquote>
  <p>Can not handle managed/back reference 'defaultReference': back reference type (java.util.List)</p>
  </blockquote>
  <p>So I've tried adding a @JsonBackReference to the relation in my Movie.java model:</p>
  <pre><code>@JsonBackReference
  @ManyToMany(mappedBy = &quot;movies&quot;)
  private Set&lt;User&gt; users = new HashSet&lt;&gt;(); 
  </code></pre>
  <p>But this doesn't help. Is there something else I'm missing?</p>