title: XStream: UnknownFieldException - No such field
body: <p>I am getting following exception, when I try to de-serialize xml to java object.</p>
  
  <p>com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter$UnknownFieldException: No such field xmlserializer.EntityFields.EntityFields.</p>
  
  <p>I saw your solution at the following link, but it doesn't work for me:
  <a href="https://stackoverflow.com/questions/21378941/unknownfieldexception-no-such-field">UnknownFieldException - No such field</a></p>
  
  <hr>
  
  <pre><code>package xmlserializer;
  
  public class EntityFields {
  
      private List&lt;EntityField&gt; entityFields = new ArrayList&lt;EntityField&gt;();
      public List&lt;EntityField&gt; getEntityFields() {
          return entityFields;
      }
      public void setEntityFields(List&lt;EntityField&gt; entityFields) {
          this.entityFields = entityFields;
      }
  }
  </code></pre>
  
  <hr>
  
  <pre><code>package xmlserializer;
  
  public class EntityField {
  
      private String FieldName;
      private String FieldDisplayName;
      private String FieldType;
      private boolean IsMultivalued = false;
  
      public String getFieldName() {
          return FieldName;
      }
      public void setFieldName(String fieldName) {
          FieldName = fieldName;
      }
      public String getFieldDisplayName() {
          return FieldDisplayName;
      }
      public void setFieldDisplayName(String fieldDisplayName) {
          FieldDisplayName = fieldDisplayName;
      }
      public String getFieldType() {
          return FieldType;
      }
      public void setFieldType(String fieldType) {
          FieldType = fieldType;
      }
      public boolean getIsMultivalued() {
          return IsMultivalued;
      }
      public void setIsMultivalued(boolean isMultivalued) {
          IsMultivalued = isMultivalued;
      }       
  }
  </code></pre>
  
  <hr>
  
  <p>main class:  </p>
  
  <pre><code>    xstream.alias("EntityField", EntityField.class);        
  xstream.alias("EntityFields", EntityFields.class);      
  EntityFields entityFields = (EntityFields)xstream.fromXML(buff.toString());
  </code></pre>
  
  <hr>
  
  <p>xml contents:   </p>
  
  <pre><code>                             &lt;EntityFields&gt; 
                      &lt;EntityField&gt;
                          &lt;FieldName&gt;Question 1&lt;/FieldName&gt;
                          &lt;FieldDisplayName&gt;some question 1&lt;/FieldDisplayName&gt;
                          &lt;FieldType&gt;character varying&lt;/FieldType&gt;
                          &lt;IsMultivalued&gt;false&lt;/IsMultivalued&gt;
                      &lt;/EntityField&gt;              
                      &lt;EntityField&gt;
                          &lt;FieldName&gt;Question 2&lt;/FieldName&gt;
                          &lt;FieldDisplayName&gt;some question 2&lt;/FieldDisplayName&gt;
                          &lt;FieldType&gt;boolean&lt;/FieldType&gt;
                          &lt;IsMultivalued&gt;false&lt;/IsMultivalued&gt;
                      &lt;/EntityField&gt;              
                      &lt;EntityField&gt;
                          &lt;FieldName&gt;Question 3&lt;/FieldName&gt;
                          &lt;FieldDisplayName&gt;some question 3&lt;/FieldDisplayName&gt;
                          &lt;FieldType&gt;character varying[]&lt;/FieldType&gt;
                          &lt;IsMultivalued&gt;true&lt;/IsMultivalued&gt;
                      &lt;/EntityField&gt;          
                      &lt;/EntityFields&gt;
  </code></pre>
  
  <p>Please help.</p>
  
  <p>Thanks</p>