Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 56124 invoked from network); 11 Oct 2005 22:39:16 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 11 Oct 2005 22:39:16 -0000 Received: (qmail 66551 invoked by uid 500); 11 Oct 2005 22:39:15 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 66531 invoked by uid 500); 11 Oct 2005 22:39:15 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Reply-To: "Derby Development" Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 66520 invoked by uid 99); 11 Oct 2005 22:39:15 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 11 Oct 2005 15:39:15 -0700 Received-SPF: pass (asf.osuosl.org: local policy) Received: from [192.18.98.36] (HELO brmea-mail-4.sun.com) (192.18.98.36) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 11 Oct 2005 15:39:17 -0700 Received: from phys-mpk-1 ([129.146.11.81]) by brmea-mail-4.sun.com (8.12.10/8.12.9) with ESMTP id j9BMcrvD014332 for ; Tue, 11 Oct 2005 16:38:53 -0600 (MDT) Received: from conversion-daemon.mpk-mail1.sfbay.sun.com by mpk-mail1.sfbay.sun.com (iPlanet Messaging Server 5.2 HotFix 1.24 (built Dec 19 2003)) id <0IO700001W50GU@mpk-mail1.sfbay.sun.com> (original mail from David.Vancouvering@Sun.COM) for derby-dev@db.apache.org; Tue, 11 Oct 2005 15:38:53 -0700 (PDT) Received: from [129.150.29.43] (vpn-129-150-29-43.SFBay.Sun.COM [129.150.29.43]) by mpk-mail1.sfbay.sun.com (iPlanet Messaging Server 5.2 HotFix 1.24 (built Dec 19 2003)) with ESMTP id <0IO700DPVW8N1X@mpk-mail1.sfbay.sun.com> for derby-dev@db.apache.org; Tue, 11 Oct 2005 15:38:48 -0700 (PDT) Date: Tue, 11 Oct 2005 15:38:51 -0700 From: "David W. Van Couvering" Subject: Re: Question about error messages (Re: Discussions on Wiki ...) In-reply-to: <000801c5ceb2$3c247550$0800a8c0@Arkat> To: Derby Development Message-id: <434C3EFB.1090804@sun.com> MIME-version: 1.0 Content-type: multipart/mixed; boundary="Boundary_(ID_IYs1VAKP7WLKWcr2CvpHeQ)" X-Accept-Language: en-us, en User-Agent: Mozilla Thunderbird 1.0.6 (Windows/20050716) References: <43448C37.4040909@debrunners.com> <434524CB.1030801@sun.com> <4345484D.5080702@debrunners.com> <4345EE12.3010306@sun.com> <002601c5cb27$91f012c0$0800a8c0@Arkat> <4346DE1B.3040207@sun.com> <002f01c5cbce$673bc900$0800a8c0@Arkat> <434BFBEF.8020208@sun.com> <000801c5ceb2$3c247550$0800a8c0@Arkat> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N This is a multi-part message in MIME format. --Boundary_(ID_IYs1VAKP7WLKWcr2CvpHeQ) Content-type: text/plain; charset=ISO-8859-1; format=flowed Content-transfer-encoding: 7BIT Hm, I'm not sure what article you're referring to, but I think there are two important ways we want to make a distinction. First of all, when running in client/server mode, there are a class of exceptions that the network client gets from the server and a class of exceptions that it throws by itself. How these are handled and thrown in the network client are slightly different. But so far that discussion doesn't seem to have come up much. Then, from the viewpoint of code sharing, there are two JDBC drivers, embedded and network client. Each of them have their own exceptions they throw. *some* of these exceptions (actually, a large class of them) are exactly the same error (e.g. "invalid max value passed as a paramter" and "this routine is not implemented." ) The exceptions that are common between client driver and embedded driver should have the same SQL State and severity. I also plan on sharing the messages so that the translations can also be shared, saving us some significant duplication of effort. I have a feeling I'm still missing it, but we're getting there. Are you still on for 4:30 today for a Skype chat? David TomohitoNakayama wrote: > Hello. > >> If I understand you correctly, you are asking how the user >> >> (a) can tell if they're using the network driver or embedded driver and >> >> The DatabaseMetadata of a connection gives you the driver name, >> product name, version, etc. Would this give the information you're >> looking for? >> >> (b) can tell if the exception came from the client or the server >> >> I don't think it's reasonable to want the SQLState to be different; I >> think that many users very much want them to be the *same* across the >> drivers, for the same error. Kathey and Dan have made it pretty clear >> they should be the same. > > > No no. > I ask you what "you" want to distinguish in this issue. > > There seems to be concept of "error of embedded" and "error of network" > in your article. > However, it is ambigous what is the difference between them. > > At least , I couldn't read what they exactly are. > > Best regards. > > /* > > Tomohito Nakayama > tomonaka@basil.ocn.ne.jp > tomohito@rose.zero.ad.jp > tmnk@apache.org > > Naka > http://www5.ocn.ne.jp/~tomohito/TopPage.html > > */ > ----- Original Message ----- From: "David W. Van Couvering" > > To: "Derby Development" > Sent: Wednesday, October 12, 2005 2:52 AM > Subject: Re: Question about error messages (Re: Discussions on Wiki ...) > > >> If I understand you correctly, you are asking how the user >> >> (a) can tell if they're using the network driver or embedded driver and >> >> The DatabaseMetadata of a connection gives you the driver name, >> product name, version, etc. Would this give the information you're >> looking for? >> >> (b) can tell if the exception came from the client or the server >> >> I don't think it's reasonable to want the SQLState to be different; I >> think that many users very much want them to be the *same* across the >> drivers, for the same error. Kathey and Dan have made it pretty clear >> they should be the same. >> >> And we have also agreed that using the error code or the implementing >> class of SQLException is not valid because neither of these are public >> (and therefore stable) interfaces. >> >> In the network client, when you construct a SQLException, the full >> diagnostics of the exception are written to the configured log: >> >> if (logWriter != null) { >> logWriter.traceDiagnosable(this); >> >> if the exception is from the server, then the trace diagnostics >> contain information that makes it clear the exception is from the server: >> >> if ( sqlca != null ) >> printWriter.println(header + " DERBY SQLCA from server"); >> printWriter.println(header + " SqlCode = " + >> sqlca.getSqlCode()); >> printWriter.println(header + " SqlErrd = " + >> Utils.getStringFromInts(sqlca.getSqlErrd())); >> printWriter.println(header + " SqlErrmc = " + >> sqlca.getSqlErrmc()); >> printWriter.println(header + " SqlErrmcTokens = " + >> Utils.getStringFromStrings(sqlca.getSqlErrmcTokens())); >> printWriter.println(header + " SqlErrp = " + >> sqlca.getSqlErrp()); >> printWriter.println(header + " SqlState = " + >> sqlca.getSqlState()); >> printWriter.println(header + " SqlWarn = " + new >> String(sqlca.getSqlWarn())); >> >> It seems to me this should give the user the information they need, >> right? >> >> Thanks, >> >> David >> >> TomohitoNakayama wrote: >> >>> Hello. >>> >>> This is question around next . >>> http://wiki.apache.org/db-derby/JDBC_error_messages_and_SQL_States >>> >>> And it seems have something a lot to do with DERBY-254 . >>> http://issues.apache.org/jira/browse/DERBY-254 >>> >>> As in DERBY-254, there seems to be concept of "error of embedded" and >>> "error of network" . >>> However, it is not clear what does distinguish one from another . >>> * Whether user uses network or embedded driver distinguishes ? * >>> Whether exception happens in network or embedded implementation >>> distinguishes ? >>> Best regards . >>> >>> /* >>> >>> Tomohito Nakayama >>> tomonaka@basil.ocn.ne.jp >>> tomohito@rose.zero.ad.jp >>> tmnk@apache.org >>> >>> Naka >>> http://www5.ocn.ne.jp/~tomohito/TopPage.html >>> >>> */ >>> ----- Original Message ----- From: "David W. Van Couvering" >>> >>> To: "Derby Development" >>> Sent: Saturday, October 08, 2005 5:44 AM >>> Subject: Re: Discussions on Wiki - WAS Re: SQL functions, procedures >>> and PSM - a possible approach >>> >>> >>>> Hi, Tomohito. It would be great if you could summarize your >>>> concerns in email and we can continue our discussion on the list. >>>> >>>> If it would help, I'm also more than open for you and I to have an >>>> IRC conversation, log it, and send the log out to the list. We do >>>> seem to be a bit stuck :) >>>> >>>> David >>>> >>>> TomohitoNakayama wrote: >>>> >>>>> Hello. >>>>> >>>>> I understand. Sorry for disturbing . >>>>> I had come to feel difficulties in discussing at Wiki. >>>>> >>>>> Should I ask David my question in mailing list once more ? >>>>> >>>>> Best regards. >>>>> >>>>> /* >>>>> >>>>> Tomohito Nakayama >>>>> tomonaka@basil.ocn.ne.jp >>>>> tomohito@rose.zero.ad.jp >>>>> tmnk@apache.org >>>>> >>>>> Naka >>>>> http://www5.ocn.ne.jp/~tomohito/TopPage.html >>>>> >>>>> */ >>>>> ----- Original Message ----- From: "David W. Van Couvering" >>>>> >>>>> To: "Derby Development" >>>>> Sent: Friday, October 07, 2005 12:40 PM >>>>> Subject: Re: Discussions on Wiki - WAS Re: SQL functions, >>>>> procedures and PSM - a possible approach >>>>> >>>>> >>>>>> I'm getting a little concerned, it feels a little quiet over there >>>>>> in the corner with Tomohito and I, and I was about to propose with >>>>>> Tomohito that we move it back to the list. >>>>>> >>>>>> David >>>>>> >>>>>> Daniel John Debrunner wrote: >>>>>> >>>>>>> David W. Van Couvering wrote: >>>>>>> >>>>>>> >>>>>>>> This sounds great, Dan! Is this a good candidate for putting up >>>>>>>> on the >>>>>>>> Wiki site as a proposal? >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> Is anyone else concerned by the movement of discussion to the >>>>>>> wiki for >>>>>>> the common code stuff? The Apache way is for discussions to occur >>>>>>> on the >>>>>>> mailing lists. It seems to me that the wiki is a great way to >>>>>>> summarize >>>>>>> such discussions, but not to hold them. A wiki page related to a >>>>>>> discussion can provide a very useful single overview, something that >>>>>>> does get lost in mailings as the discussion spreads out. >>>>>>> >>>>>>> Dan. >>>>>>> >>>>>>> >>>>>> >>>>> >>>>> >>>>> -------------------------------------------------------------------------------- >>>>> >>>>> >>>>> >>>>> No virus found in this incoming message. >>>>> Checked by AVG Anti-Virus. >>>>> Version: 7.0.344 / Virus Database: 267.11.13/123 - Release Date: >>>>> 2005/10/06 >>>>> >>>>> >>>>> >>>> >>> >>> >>> -------------------------------------------------------------------------------- >>> >>> >>> >>> No virus found in this incoming message. >>> Checked by AVG Anti-Virus. >>> Version: 7.0.344 / Virus Database: 267.11.13/124 - Release Date: >>> 2005/10/07 >>> >>> >>> >> --Boundary_(ID_IYs1VAKP7WLKWcr2CvpHeQ) Content-type: text/x-vcard; charset=utf-8; name=david.vancouvering.vcf Content-transfer-encoding: 7BIT Content-disposition: attachment; filename=david.vancouvering.vcf begin:vcard fn:David W Van Couvering n:Van Couvering;David W org:Sun Microsystems, Inc.;Database Technology Group email;internet:david.vancouvering@sun.com title:Senior Staff Software Engineer tel;work:510-550-6819 tel;cell:510-684-7281 x-mozilla-html:TRUE version:2.1 end:vcard --Boundary_(ID_IYs1VAKP7WLKWcr2CvpHeQ)--