title: Bean Validation constraint(s) violated while executing Automatic Bean Validation on callback event: 'prePersist'
body: <p>I created an EJB Session facade in my Netbeans 7 for saving my entity.
  I have a manytoone mapping between my  Insurance and RatePlan Class.</p>
  
  <pre><code>public class Insurance{
      @ManyToOne(optional=false) 
      @JoinColumn(name="PLAN_ID")
      private RatePlan plan;
  }
  public class RatePlan{
      @OneToMany(mappedBy="plan")
      private Set&lt;Insurance&gt; insuranceItems;
  }
  </code></pre>
  
  <p>When I tried saving in my database using my EJB Session Bean, I am encountering below error.</p>
  
  <blockquote>
    <p>Caused by: javax.validation.ConstraintViolationException: Bean Validation constraint(s) violated while executing Automatic Bean Validation on callback event:'prePersist'. Please refer to embedded ConstraintViolations for details. </p>
  </blockquote>
  
  <p>What I did was to turn off my Bean validation in my Persistence.xml file.
  I would like to know what Bean validation error has occurred but I dont know how or where to find it or how to configure and catch it.</p>
  
  <p>My EJB facade is a simple class like tis.</p>
  
  <pre><code>public class InsuranceFacade{
      public void saveInsurance(Insurance insurance){
          em.persist(insurance);
      }
  }
  </code></pre>
  
  <p>Any hints?</p>