title: Exception while parsing json string with jackson library
body: <p>This is the <code>json</code> I'm trying to parse using <code>Jackson</code> <code>Java</code> library.<br/>
  Its a <code>Vector</code> of <code>BackgroundShape</code>s.<br/>
  <code>BackgroundShape</code> subclasses include:</p>
  
  <ul>
  <li><code>BGRectangle</code></li>
  <li><code>BGCircle</code></li>
  </ul>
  
  <p>In this <code>json</code> snippet there is 2 <code>BGRectangle</code>s, but it may contain <code>BGCircle</code>s also, which have some different attributes to <code>BGRectangle</code>s.<br/>
  So I want to parsing to be able to handle various class types within the <code>json</code></p>
  
  <pre><code>{
      "bgShapes": [
          {
              "@class" : "com.code.test.BGRectangle",
              "position": {
                  "x": -110.0,
                  "y": -28.0,
                  "z": -6.0
              },
              "angle": 0.0,
              "width": 10.0,
              "height": 10.0,
              "textureSelection": "NUKE"
          },
          {
              "@class" : "com.code.test.BGRectangle",
              "position": {
                  "x": 10.0,
                  "y": 8.0,
                  "z": -6.0
              },
              "angle": 0.0,
              "width": 1.0,
              "height": 1.0,
              "textureSelection": "NUKE"
          }
      ]
  }
  </code></pre>
  
  <p><code>Main.java</code></p>
  
  <pre><code>ObjectMapper mapper = new ObjectMapper();
  mapper.addMixInAnnotations(org.jbox2d.common.Vec3.class.class, Vec3Mixin.class); 
  Level zoo = mapper.readValue(new File("levels/level1.json"), Level.class);
  </code></pre>
  
  <p>Getting this exception at the moment:</p>
  
  <pre><code>Exception in thread "main" com.fasterxml.jackson.databind.JsonMappingException: Could not find creator property with name 'position' (in class com.code.test.BackgroundShape)
   at [Source: levels/level1.json; line: 1, column: 1]
      at com.fasterxml.jackson.databind.JsonMappingException.from(JsonMappingException.java:164)
      at com.fasterxml.jackson.databind.DeserializationContext.mappingException(DeserializationContext.java:584)
      at com.fasterxml.jackson.databind.deser.BeanDeserializerFactory.addBeanProps(BeanDeserializerFactory.java:551)
      at com.fasterxml.jackson.databind.deser.BeanDeserializerFactory.buildBeanDeserializer(BeanDeserializerFactory.java:267)
      at com.fasterxml.jackson.databind.deser.BeanDeserializerFactory.createBeanDeserializer(BeanDeserializerFactory.java:168)
      at com.fasterxml.jackson.databind.deser.DeserializerCache._createDeserializer2(DeserializerCache.java:405)
      at com.fasterxml.jackson.databind.deser.DeserializerCache._createDeserializer(DeserializerCache.java:354)
      at com.fasterxml.jackson.databind.deser.DeserializerCache._createAndCache2(DeserializerCache.java:267)
      at com.fasterxml.jackson.databind.deser.DeserializerCache._createAndCacheValueDeserializer(DeserializerCache.java:247)
      at com.fasterxml.jackson.databind.deser.DeserializerCache.findValueDeserializer(DeserializerCache.java:146)
      at com.fasterxml.jackson.databind.DeserializationContext.findContextualValueDeserializer(DeserializationContext.java:305)
      at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.createContextual(CollectionDeserializer.java:151)
      at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.createContextual(CollectionDeserializer.java:23)
      at com.fasterxml.jackson.databind.DeserializationContext.findContextualValueDeserializer(DeserializationContext.java:309)
      at com.fasterxml.jackson.databind.deser.impl.PropertyBasedCreator.construct(PropertyBasedCreator.java:96)
      at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.resolve(BeanDeserializerBase.java:414)
      at com.fasterxml.jackson.databind.deser.DeserializerCache._createAndCache2(DeserializerCache.java:298)
      at com.fasterxml.jackson.databind.deser.DeserializerCache._createAndCacheValueDeserializer(DeserializerCache.java:247)
      at com.fasterxml.jackson.databind.deser.DeserializerCache.findValueDeserializer(DeserializerCache.java:146)
      at com.fasterxml.jackson.databind.DeserializationContext.findRootValueDeserializer(DeserializationContext.java:322)
      at com.fasterxml.jackson.databind.ObjectMapper._findRootDeserializer(ObjectMapper.java:2990)
      at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:2884)
      at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:1988)
      at com.code.test.Main.main(Main.java:16)
  </code></pre>
  
  <p><code>Level.java</code></p>
  
  <pre><code>@JsonTypeInfo(use = JsonTypeInfo.Id.MINIMAL_CLASS, include = As.PROPERTY, property = "@class")
  public class Level {
  
      private Vector&lt;BackgroundShape&gt; bgShapes = new Vector&lt;BackgroundShape&gt;();
  
      @JsonCreator
      public Level(@JsonProperty("bgShapes") Vector&lt;BackgroundShape&gt; bgShapes) throws GLException, IOException {
  
          this.bgShapes = bgShapes;
          System.out.println("Level created");
      }
  }
  </code></pre>
  
  <p><code>Shape.java</code></p>
  
  <pre><code>public abstract class Shape{
  
      @JsonProperty("textureSelection") protected String textureSelection;
  
      @JsonCreator
      public Shape(@JsonProperty("textureSelection") String textureSelection) {
          this.textureSelection = textureSelection;
      }
  }
  </code></pre>
  
  <p><code>BackgroundShape.java</code></p>
  
  <pre><code>@JsonTypeInfo(use = JsonTypeInfo.Id.CLASS, include = As.PROPERTY, property = "@class")
  @JsonSubTypes({ 
      @JsonSubTypes.Type(value = BGRectangle.class, name = "BGRectangle"), 
      @JsonSubTypes.Type(value = BGCircle.class, name = "BGCircle") })
  public abstract class BackgroundShape extends Shape {
  
      @JsonProperty("position") private Vec3 position;
      @JsonProperty("angle") private float angle;
  
      @JsonCreator
      public BackgroundShape(
              @JsonProperty("position") Vec3 position, 
              @JsonProperty("angle") float angle, 
              @JsonProperty("textureSelection") String textureSelection) {
          super(textureSelection);
  
          this.position = position;
          this.angle = angle;     
      }
  }
  </code></pre>
  
  <p><code>BGRectangle.java</code></p>
  
  <pre><code>public class BGRectangle extends BackgroundShape{
  
      @JsonProperty("width") private float width;
      @JsonProperty("height") private float height;
  
      @JsonCreator
      public BGRectangle (
              @JsonProperty("position") Vec3 position, 
              @JsonProperty("angle") float angle, 
              @JsonProperty("width") float width, 
              @JsonProperty("height") float height, 
              @JsonProperty("textureSelection")String textureSelection) { 
          super(position, angle, textureSelection);
  
          this.width = width;
          this.height = height;
      };
  }
  </code></pre>
  
  <p>EDIT: Added <code>mixin</code> abstract class to <code>ObjectMapper</code> ..</p>
  
  <pre><code>public abstract class Vec3Mixin {
  
      public Vec3Mixin(
              @JsonProperty("x") float x,
              @JsonProperty("y") float y, 
              @JsonProperty("z") float z) {
      }
  }
  </code></pre>