title: org.apache.avro.SchemaParseException: Undefined name:
body: <p>For converting generics to avro schema i use the below annotation , but I get the exception after that </p>
  
  <pre><code>    public class Test2&lt;T&gt;
      {
  @AvroSchema("{\"type\":\"array\",\"items\":[\"null\",\"Test4\"]}")
      private Set&lt;T&gt; test4;
  }
  
  public class Test4 {
  
      public Integer getX() {
          return x;
      }
  
      public void setX(Integer x) {
          this.x = x;
      }
  
      public Test4(Integer x) {
  
          this.x = x;
      }
  
      public Test4() {
  
      }
  
      private Integer x;
  }
  </code></pre>
  
  <p>The error I get here is 
  org.apache.avro.SchemaParseException: Undefined name:Test4</p>