openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From SomuReddy <>
Subject How to know the error code from org.apache.openjpa.persistence.PersistenceException
Date Mon, 14 Jan 2008 18:47:55 GMT

Hi ,

I am getting the following exception when my database is down.. but I wanna
handle it in my code using the  error code which is "Error Code = 17,002".
but PersistenceException is not provoding any method to get that error code,
the way SQLException provide "SQLException.getErrorCode()". 

Is there anyway to know this errorcdoe in JPA???? or
Should I catch the SQLException apart from  PersistenceException ?, if I do
, will it be poossible to catch the below exception in SQLException catch
block, when it occur????

<1.0.0-SNAPSHOT-SNAPSHOT nonfatal general error>
org.apache.openjpa.persistence.PersistenceException: Io exception: Got minus
one from a read callDSRA0010E: SQL State = null, Error Code = 17,002

View this message in context:
Sent from the OpenJPA Users mailing list archive at

View raw message