You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Albert Lee (Closed) (JIRA)" <ji...@apache.org> on 2012/02/02 17:22:51 UTC

[jira] [Closed] (OPENJPA-184) use DB2 Diagnostic interface to report extended error diagnostics on SQL Exception

     [ https://issues.apache.org/jira/browse/OPENJPA-184?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Albert Lee closed OPENJPA-184.
------------------------------


Close issue in preparation for 2.2.0 release.
                
> use DB2 Diagnostic interface to report extended error diagnostics on SQL Exception
> ----------------------------------------------------------------------------------
>
>                 Key: OPENJPA-184
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-184
>             Project: OpenJPA
>          Issue Type: New Feature
>         Environment: DB2 database
>            Reporter: David Wisneski
>            Assignee: David Wisneski
>             Fix For: 2.2.0
>
>
> When using DB2 database and the SQLException occurs 
> if the SQLException instance supports the DB2Diagnosable interface, 
> extended error information from the SQLCA will be written to the SQL channel. 
> The message format produced by DB2Diagnosable writer is
>  
> 	 SQLCA OUTPUT[Errp=SQLDMISR, Errd=[-2146893819, 5, 0, 0, -957, 0]]
> Errp is the name of the DB2 module that detected the error and Errd are 6 integers of diagnostic information, SQLWARN are 6 characters 
> of warning flags..  Often this additional information can be used by an administrator in doing problem determination.
> This message will be appended to the persistence exception error message already created by OpenJPA
> and it will be written to SQL logging channel (if active).
> DB2Dictionary class is modified to use java reflection on the SQLException instance to determine 
> if it supports DB2Diagnosble methods "getErrp" and if so 
> it invokes the methods to retrieve Errp and Errd fields, formats and logs the error message.
> Reflection is used so that the DB2Dictionary does not contain any compile time or runtime 
> dependency on the DB2 jdbc driver.  If the DB2Diagnosable methods do not exist on the SQLException
> instance,  no extended error information is logged.  
> org.apache.openjpa.jdbc.sql.SQLException class is modified so in the event of an exception 
> if the Dictionary is DB2, to call the Dictionary routines above.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira