title: JAXB IllegalAnnotationException is thrown during parsing XML
body: <p>This is my XML file:</p>
  <pre><code>&lt;fields&gt;
      &lt;field mappedField=&quot;Num&quot;&gt;
      &lt;/field&gt;
      
      &lt;field mappedField=&quot;Type&quot;&gt;      
      &lt;/field&gt;    
  &lt;/fields&gt;
  </code></pre>
  <p>I created 2 classes to parse it (Fields.java and Field.java):</p>
  <pre><code>@XmlRootElement(name = &quot;fields&quot;)
  public class Fields {
  
      @XmlElement(name = &quot;field&quot;)
      List&lt;Field&gt; fields = new ArrayList&lt;Field&gt;();
          //getter, setter
  }
  </code></pre>
  <p>and</p>
  <pre><code>public class Field {
  
      @XmlAttribute(name = &quot;mappedField&quot;)
      String mappedField;
      //getter,setter
  }
  </code></pre>
  <p>But I get this exception:</p>
  <pre><code>[INFO] com.sun.xml.internal.bind.v2.runtime.IllegalAnnotationsException: 1 counts of IllegalAnnotationExceptions
  [INFO]  at com.sun.xml.internal.bind.v2.runtime.IllegalAnnotationsException$Builder.check(IllegalAnnotationsException.java:66) ~[na:1.6.0_07]
  [INFO]  at com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(JAXBContextImpl.java:422) ~[na:1.6.0_07]
  [INFO]  at com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl.&lt;init&gt;(JAXBContextImpl.java:270) ~[na:1.6.0_07]
  </code></pre>
  <p>I can't understand why this exception rises. Exception is here:</p>
  <pre><code>JAXBContext context = JAXBContext.newInstance(Fields.class);
  </code></pre>
  <p>I use JDK 1.6_0.0.7.  Thanks.</p>