Guest User

Untitled

a guest
Jun 18th, 2018
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. try {
  2. entityManager.persist(object);
  3.  
  4. } catch (InvalidStateException e) {
  5.  
  6. log.info("Caught Hibernate exception: #0", e.getClass().getName());
  7.  
  8. InvalidValue[] invalidValues = e.getInvalidValues();
  9.  
  10. for(InvalidValue invalidValue : invalidValues) {
  11. log.info("Invalid Property #0 has value: #1", invalidValue.getPropertyName(), invalidValue.getPropertyName());
  12. }
  13. }
  14.  
  15. SQLException sqlException = ((JDBCException)ex).getSQLException();
Add Comment
Please, Sign In to add comment