title: Jackson 3.1.1 Missing Type ID of Subtype Exception for Polymorphic Type of List?
body: <p>I have a concrete object of an abstract class that I've made.</p>
  
  <p>I'm using annotations on the abstract class and the daughter class, but the JSON output doesn't look right and I keep getting an exception on deserialiation.</p>
  
  <p>I'm still learning Jackson, and unfortunatly a lot of the tutorials on the subject are outdated.</p>
  
  <p>Here are the classes with my object mapper at the bottom:</p>
  
  <p><strong>Abstract Class:</strong></p>
  
  <pre><code>@JsonTypeInfo(use = JsonTypeInfo.Id.CLASS, property = "BTRFSPhysicalLocationItem")
  @JsonSubTypes({
      @Type(name = "Snapshot", value = Snapshot.class),
      @Type(name = "Backup", value = Backup.class),
      @Type(name = "Subvolume", value = Subvolume.class)})
  public abstract class BTRFSPhysicalLocationItem {
  
      private final String name;
      @JsonProperty
      private final Path location;
  
      /**
       * Makes a new subvolume instance with the specified location. May or may
       * not actually exist.
       *
       * @param location The location of the subvolume
       */
      @JsonCreator
      protected BTRFSPhysicalLocationItem(@JsonProperty(value = "location") Path location) {
          this.location = location;
          this.name = location.getFileName().toString();
      }
  </code></pre>
  
  <p><strong>Concrete Class:</strong></p>
  
  <pre><code>public class Subvolume extends BTRFSPhysicalLocationItem {
  
      /**
       * Creates a new subvolume with the specified path.The subvolume may or may
       * not exist at this point.
       *
       * @param location
       */
      @JsonCreator
      public Subvolume(@JsonProperty Path location) {
          super(location);
      }
  </code></pre>
  
  <p><strong>Objectmapper block:</strong></p>
  
  <pre><code>ObjectMapper MAPPER = new ObjectMapper();
  List&lt;Subvolume&gt; SUBVOLUME_LIST = new ArrayList&lt;&gt;();
  //Subvolume is populated by other methods it's not worth showing them here
  System.out.println("\n\n");
                  MAPPER.writeValue(System.out, SUBVOLUME_LIST);
                  System.out.println("\n\n\n");
                  var s = MAPPER.writeValueAsString(SUBVOLUME_LIST);
                  List&lt;Subvolume&gt; list = MAPPER.readValue(s, new TypeReference&lt;List&lt;Subvolume&gt;&gt;() {
                  });
  </code></pre>
  
  <p><strong>Output JSON:</strong> <code>[{"name":"WanderingEcho","location":"file:///home/sarah/NetBeansProjects/WanderingEcho/"}]</code></p>
  
  <p>Exception:</p>
  
  <pre><code>Aug 05, 2019 4:55:14 PM com.protonmail.sarahszabo.wanderingecho.btrfs.BTRFS &lt;clinit&gt;
  SEVERE: null
  com.fasterxml.jackson.databind.exc.InvalidTypeIdException: Missing type id when trying to resolve subtype of [simple type, class com.protonmail.sarahszabo.wanderingecho.btrfs.subvolume.Subvolume]: missing type id property 'BTRFSPhysicalLocationItem'
   at [Source: (String)"[{"name":"WanderingEcho","location":"file:///home/sarah/NetBeansProjects/WanderingEcho/"}]"; line: 1, column: 89] (through reference chain: java.util.ArrayList[0])
  </code></pre>
  
  <p>Other answers such as <a href="https://stackoverflow.com/questions/22609032/jackson-deserialization-of-polymorphic-types">Jackson deserialization of polymorphic types</a> suggest using the <code>ObjectMapper</code> methods, but according to the tutorials I've read, this shouldn't be necessary.</p>
  
  <p>Not sure what I'm doing wrong with the annotations.</p>