This content has been marked as final. Show 3 replies
We're going to use SQLRecoverableException(JDBC 4.0 Feature) in our critical java server application with Oracle JDBC Driver 22.214.171.124.0
(on Oracle 11.2 database)
On top of this we want to use a small set of our own ORA-errors as Recoverable too which will compliment the standard SQLRecoverableException.
My questions are:
1. I failed to find all mapped ORA-errors to this subclass. Is there such a list on the net?
2. Wondering is this the right thing to use SQLRecoverableException for connection recovery in Oracle JDBC Driver 126.96.36.199.0, Is the dirver stable in this regard
I can't find any document indicating that Oracle has added support for that feature so I doubt that the Oracle JDBC driver (ojdbc6.jar is latest) supports it.
Here is the official Oracle JDBC page that shows the Oracle DB versions supported for each of the JDBC drivers available and also describes the JDBC jars and what JDK versions they support.
That link has a statement that the JDK 1.6 driver has full support for JDBC 4.0 but it is not clear what that means and I haven't found any additional documentation that indicates your particular feature is supported.
The JDBC Dev Guide is
Is has a section 'Support for JDBC 4.0 Standard' but this section does not mention support for that feature. The only additional Exception support is listed as
Enhanced Exception Hierarchy and SQLException
JDBC 3.0 defines only a single exception, SQLException. However, there are large categories of errors and it is useful to distinguish them. This feature provides subclasses of the SQLException class to identify the different categories of errors. The primary distinction is between permanent errors and transient errors. Permanent errors are a result of the correct operation of the system and will always occur. Transient errors are the result of failures, including timeouts, of some part of the system and may not reoccur.
New exceptions have been added to represent transient and permanent errors and the different categories of these errors.
Also, the SQLException class and its subclasses have been enhanced to provide support for the J2SE chained exception functionality.
The JDBC 4 JSR mentions that the mappings supported are the SQL-2003 docs and these docs are available for sale but not publicly available.
Sorry about resurrecting an old post, but it asks an interesting question.
The original poster asked about a list of all the ORA errors that are mapped to SQLRecoverableException. That may be in the Dev Guide some where, but the definitive list is in the ojdbc*.jar itself. Extract the file oracle/jdbc/driver/errorMap.xml from the ojdbc*.jar file. This simple XML file will tell you exactly which ORA error numbers are mapped to which SQLException subclasses. This is definitive because that file is the source the driver uses to do the mapping. Obviously it varies from release to release as new ORA error numbers are added.
IMPORTANT: This file is copyrighted by Oracle so you can't post it anywhere or reuse or copy it in any way. You can look at it though.