[OLINGO-448] Improve JPA error handling

Based on a patch submitted by Giacomo Pati which is attached to the olingo
issue 448.