title: Hibernate Annotations : No default constructor for entity
body: <p>I am trying to persist the objects generated by JAXB. Here is the sample structure:</p>
  
  <pre><code>@Column(name = "reporting_identifier")
  private String reportingIdentifier;
  @Column(name = "apply_quiet_time")
  private boolean applyQuietTime;
  @Embedded
  private RecipientDetailsList recipientDetailsList;
  </code></pre>
  
  <p>Below is the structure of <code>RecipientDetailsList</code> class:</p>
  
  <pre><code>@ElementCollection(targetClass=String.class)
  private List&lt;RecipientDetails&gt; recipientDetails;
  </code></pre>
  
  <p>Now, the <code>RecipientDetails</code> class has one argument constructor, which accepts a String. That String I want to persist in the database as a part of the whole record. I am seeing  </p>
  
  <blockquote>
    <p>org.hibernate.InstantiationException: No default constructor for entity: RecipientDetailsList</p>
  </blockquote>
  
  <p>exception when I try to save an object. I have two questions:</p>
  
  <ol>
  <li><p>Do we have any work around this exception? I can't change the class as it is designed for JAXB marshalling/unmarhsalling. Can I somehow store the objects without altering the structure? Also, I am interested in only storing the first record of the list referenced by 
  recipientDetails as I want only one row for object. I want it to ignore the rest of the records if it has more than 1 record. Is it possible?</p></li>
  <li><p>Is this good design to use the annotation directly into classes which are generated by JAXB? Should I create another classes (and possibly mappers/converters) just to store and retrieve the information?</p></li>
  </ol>