title: 3 counts of IllegalAnnotationExceptions
body: <p>I have never used JAXB before. I am working on a test harnesses project. I have around 20 different testcases. When I run my test, I get this error.</p>
  
  <p>My structure is like:</p>
  
  <p><code>A</code> is the base TestCase class.</p>
  
  <p><code>B</code> extends <code>A</code>.</p>
  
  <p><code>C</code> extends <code>B</code>.</p>
  
  <p>Base Class A:</p>
  
  <pre><code>public class A {
    public A(String t){
       testName = t;
    }
  
    private String aData;
    private String testName;
    public void setAData(String a){
       aData = a;
    }
  
    public void getAData(){
       return aData;
    }
  
    public void setTestName(String t){
       testName = t;
    }
  
    public void getTestName(){
       return testName;
    }
  }
  </code></pre>
  
  <p>Class B:</p>
  
  <pre><code>public class B extends A{ 
     public B(String testName){
        super(testName);
     }
  
     private String bData;
     public void setBData(String b){
        bData = b.trim();
     }
     public String getData(){
        return bData;
     }       
  }
  </code></pre>
  
  <p>Class C:</p>
  
  <pre><code>@XmlRootElement(name="C")
  public class C extends B{
      public C(String testName){
          super(testName);
      }
  
      private String cData;
      public void setCData(String c){
          cData = c;
      }
      public String getCData(){
          return cData;
      }
  }
  </code></pre>
  
  <p>and for unmarshalling my xml files i wrote</p>
  
  <pre><code>public C unmarshall(C test, String dir){
      try {
          JAXBContext jc = JAXBContext.newInstance(c.getClass);
          Unmarshaller u = jc.createUnmarshaller();
  
          test = (C)u.unmarshal(new FileInputStream(dir));
      } catch (Exception e) {
          System.out.println(e.getMessage());
      }
  
      return test;
   }
  </code></pre>
  
  <p>my xml file looks like:</p>
  
  <pre><code>&lt;C&gt;
     &lt;aData&gt; aaaa &lt;/aData&gt;
     &lt;bData&gt; bbbb &lt;/bData&gt;
     &lt;cData&gt; cccc &lt;/cData&gt;
  &lt;/C&gt;
  </code></pre>
  
  <p>when i run my code i get 3 counts of IllegalAnnotationException.</p>