Return-Path: Delivered-To: apmail-db-derby-user-archive@www.apache.org Received: (qmail 99188 invoked from network); 24 Aug 2007 11:40:17 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 24 Aug 2007 11:40:17 -0000 Received: (qmail 88489 invoked by uid 500); 24 Aug 2007 11:40:12 -0000 Delivered-To: apmail-db-derby-user-archive@db.apache.org Received: (qmail 88459 invoked by uid 500); 24 Aug 2007 11:40:12 -0000 Mailing-List: contact derby-user-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Reply-To: "Derby Discussion" Delivered-To: mailing list derby-user@db.apache.org Received: (qmail 88448 invoked by uid 99); 24 Aug 2007 11:40:12 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Aug 2007 04:40:12 -0700 X-ASF-Spam-Status: No, hits=-1.0 required=10.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [192.18.98.31] (HELO brmea-mail-1.sun.com) (192.18.98.31) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Aug 2007 11:40:48 +0000 Received: from dm-uk-01.uk.sun.com ([129.156.101.115]) by brmea-mail-1.sun.com (8.13.6+Sun/8.12.9) with ESMTP id l7OBdhZi021140 for ; Fri, 24 Aug 2007 11:39:44 GMT Received: from barman.uk.sun.com (barman.UK.Sun.COM [129.156.132.12]) by dm-uk-01.uk.sun.com (8.13.7+Sun/8.13.6/ENSMAIL,v2.2) with ESMTP id l7OBdhqY006568 for ; Fri, 24 Aug 2007 12:39:43 +0100 (BST) Received: from vpn-129-150-121-224.uk.sun.com ([129.150.121.224]) by barman.uk.sun.com with esmtp (Exim 4.42) id 1IOXXh-0007AS-2M for derby-user@db.apache.org; Fri, 24 Aug 2007 12:41:33 +0100 Message-ID: <46CEC38A.8050406@sun.com> Date: Fri, 24 Aug 2007 12:39:54 +0100 From: Alan Burlison User-Agent: Thunderbird 2.0.0.0 (X11/20070423) MIME-Version: 1.0 To: Derby Discussion Subject: Re: NPE when connecting to database with securityMechanism=8 References: <46CCA045.50406@sun.com> <46CD5845.7010000@sun.com> <46CD633A.10203@sun.com> <46CD888A.3030506@sun.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Knut Anders Hatlen wrote: > You shouldn't load the client driver unless your application uses > jdbc:derby://localhost/mydb. The reason why the client driver seems to > work in your case, is that the server already has loaded the embedded > driver. So the code that runs inside the same JVM as the server should > use jdbc:derby:mydb and not load the client driver, whereas the external > scripts should load the client driver and use > jdbc:derby://localhost/mydb. Unfortunately it's not that simple. If you use the embedded driver with STRONG_PASSWORD_SUBSTITUTE_SECURITY & securityMechanism=8, you get a NPE is you open, close and then reopen the database - which is necessary if you want to be sure that the static database properties you set are used. This all seems as fragile as hell, to be honest... -- Alan Burlison --