title: JsonMappingException: Already had POJO for id
body: <p>I have an error when trying to work with @JsonIdentityInfo jackson annotation.  When I try to deserialize the object I get the following exception:</p>
  <blockquote>
  <p>Could not read JSON: Already had POJO for id (java.lang.Integer) [1] (through reference chain: eu.cobiz.web.domain.Site[&quot;operators&quot;]-&gt;eu.yavix.web.domain.Account[&quot;image&quot;]-&gt;eu.cobiz.web.domain.Image[&quot;@Image&quot;]);nested exception is <strong>com.fasterxml.jackson.databind.JsonMappingException</strong>: <em><strong>Already had POJO for id</strong></em> (java.lang.Integer) [1] (through reference chain: eu.yavix.web.domain.Site[&quot;operators&quot;]-&gt;eu.cobiz.web.domain.Account[&quot;image&quot;]-&gt;eu.cobiz.web.domain.Image[&quot;@Image&quot;])</p>
  </blockquote>
  <p>The JSON I am trying to deserialize looks like:</p>
  <pre><code>{
  &quot;@Site&quot;: 1,
  &quot;siteId&quot;: 1,
  &quot;name&quot;: &quot;0&quot;,
  &quot;address&quot;: {
      &quot;@Address&quot;: 2,
      &quot;addressId&quot;: 4,
      &quot;number&quot;: &quot;22&quot;
  },
  &quot;operators&quot;: [
      {
          &quot;accountId&quot;: 1,
          &quot;email&quot;: &quot;user982701361@yavix.eu&quot;,
          &quot;image&quot;: {
              &quot;@Image&quot;: 1,
              &quot;imageId&quot;: 1,
              &quot;uri&quot;: &quot;http://icons.iconarchive.com/icons/deleket/purple-monsters/128/Alien-awake-icon.png&quot;
          }
      },
      {
          &quot;accountId&quot;: 2,
          &quot;email&quot;: &quot;user174967957@yavix.eu&quot;,
          &quot;image&quot;: {
              &quot;@Image&quot;: 2,
              &quot;imageId&quot;: 2,
              &quot;uri&quot;: &quot;http://icons.iconarchive.com/icons/deleket/purple-monsters/128/Alien-awake-icon.png&quot;
          }
      }
  ]
  }
  </code></pre>
  <p>My domain object is annotated with</p>
  <pre><code>@JsonIdentityInfo(generator = ObjectIdGenerators.IntSequenceGenerator.class, property = &quot;@Image&quot;)
  </code></pre>
  <p>The problem arises on @Id annotation since if I remove the annotation the problem disappears (as I did for account) but on my understanding the new feature is useful for cyclic dependencies which is useful for me in other scenarios. There shouldn't be a conflict between the 2 images since they are different objects.</p>
  <p>How can I solve this or what is the problem?</p>