Hi,
  OpenJPA exceptions tend to carry quite a lot of contextual information in
its error messages. Please note that many OpenJPA internal exceptions have
to be wrapped in PersistenceException for JPA spec compliance. So often th
enested exception within a PersistenceException carries more contextual
information.

  Your suggestion to carry the field/property data in the exception message
is well received. Will see what can be improed in this regard. Please file a
JIRA for improvement if you please. 



Anatol Mayen wrote:
> 
> Hello,
> 
> I'm wondering if it is possible to retrieve the property/column name that
> caused a PersistenceException to happen. I'm working on a validation
> framework and would like to add support for jpa, currently I'm only having
> support for hibernate. I'm currently implementing a proof of concept which
> uses OpenJPA as the JPA provider.
> From the JPA docs, it seems that such information is not available through
> the standard API. I was hoping that implementors like OpenJPA would add
> support for things like that. But from searching the docs I couldn't find
> something that would tell me the exact property/column name that caused a
> PersistenceException.
> 
> My question is if I'm missing something (hopefully in this case) or if
> there is no way of getting this information by the use of OpenJPA.
> 
> 
> Best regards,
> 
> Anatol
> 


-----
Pinaki 
-- 
View this message in context: 
http://n2.nabble.com/How-to-retrieve-the-property-name-that-is-the-cause-of-a-PersistenceException-tp3275779p3313318.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.

Reply via email to