Java JAXB binding issues : 1 counts of IllegalAnnotationExceptions <p>I m facing some problems with JAXB , I want to deserilize a <strong>config.xml</strong> file : </p> <pre><code>&lt;configuration&gt; &lt;connectors&gt; &lt;connector name = "cust1"&gt; &lt;entity&gt; &lt;prefix&gt;C_JDD&lt;/prefix&gt; &lt;filename&gt;jdd&lt;/filename&gt; &lt;/entity&gt; &lt;/connector&gt; &lt;connector name = "c2"&gt; &lt;entity&gt; &lt;prefix&gt;pref1&lt;/prefix&gt; &lt;filename&gt;cnt&lt;/filename&gt; &lt;/entity&gt; &lt;entity&gt; &lt;prefix&gt;DD&lt;/prefix&gt; &lt;filename&gt;vhl&lt;/filename&gt; &lt;/entity&gt; &lt;/connector&gt; &lt;/connectors&gt; &lt;/configuration&gt; </code></pre> <p>And here is my class ConnectorsXML (which contains list of connectors) : </p> <pre><code>@XmlAccessorType(XmlAccessType.FIELD) public class ConnectorsXML { @XmlElement(name = "connector") private List&lt;ConnectorXML&gt; connectorsXML = new ArrayList&lt;ConnectorXML&gt;(); } </code></pre> <p>the code of ConnectorXML (abstraction of one connector in the xml) : </p> <pre><code>@XmlAccessorType(XmlAccessType.FIELD) public class ConnectorXML { @XmlAttribute private String name; @XmlElement(name = "entity") private List&lt;EntityXML&gt; entities = new ArrayList&lt;EntityXML&gt;(); } </code></pre> <p>And finally , the class EntityXML , a connector may have a list of entities : </p> <pre><code>@XmlAccessorType(XmlAccessType.FIELD) public class EntityXML { private String prefix ; private String filename; } </code></pre> <p>PS : i ve already generated all getters and setters and also constructors , ( i didnt copy theme here ) .</p> <p>I can't understand why my code throw the exception : 1 counts of IllegalAnnotationExceptions</p>