From open-jpa-dev-return-3514-apmail-incubator-open-jpa-dev-archive=incubator.apache.org@incubator.apache.org Mon Apr 16 21:23:39 2007 Return-Path: Delivered-To: apmail-incubator-open-jpa-dev-archive@locus.apache.org Received: (qmail 92106 invoked from network); 16 Apr 2007 21:23:36 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 16 Apr 2007 21:23:36 -0000 Received: (qmail 89953 invoked by uid 500); 16 Apr 2007 21:23:42 -0000 Delivered-To: apmail-incubator-open-jpa-dev-archive@incubator.apache.org Received: (qmail 89928 invoked by uid 500); 16 Apr 2007 21:23:42 -0000 Mailing-List: contact open-jpa-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: open-jpa-dev@incubator.apache.org Delivered-To: mailing list open-jpa-dev@incubator.apache.org Received: (qmail 89919 invoked by uid 99); 16 Apr 2007 21:23:42 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 16 Apr 2007 14:23:42 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 16 Apr 2007 14:23:35 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 4BC41714046 for ; Mon, 16 Apr 2007 14:23:15 -0700 (PDT) Message-ID: <9623590.1176758595290.JavaMail.jira@brutus> Date: Mon, 16 Apr 2007 14:23:15 -0700 (PDT) From: "Kevin Sutter (JIRA)" To: open-jpa-dev@incubator.apache.org Subject: [jira] Reopened: (OPENJPA-184) use DB2 Diagnostic interface to report extended error diagnostics on SQL Exception In-Reply-To: <297722.1175047112565.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/OPENJPA-184?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Kevin Sutter reopened OPENJPA-184: ---------------------------------- Assignee: David Wisneski Sorry, I'm going to re-open this Issue. I don't see any mention of this added functionality in our OpenJPA documentation. Without documentation, the feature is not of much use. So, I think we should leave it open until it is properly documented. > 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 > Assigned To: David Wisneski > > 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. - You can reply to this email to add a comment to the issue online.