Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 29502 invoked from network); 5 Jan 2005 15:35:23 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 5 Jan 2005 15:35:23 -0000 Received: (qmail 48752 invoked by uid 500); 5 Jan 2005 15:34:57 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 48655 invoked by uid 500); 5 Jan 2005 15:34:54 -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 48499 invoked by uid 99); 5 Jan 2005 15:34:51 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from ajax-1.apache.org (HELO ajax.apache.org) (192.87.106.226) by apache.org (qpsmtpd/0.28) with ESMTP; Wed, 05 Jan 2005 07:34:22 -0800 Received: from ajax.apache.org (ajax.apache.org [127.0.0.1]) by ajax.apache.org (8.12.11/8.12.11) with ESMTP id j05FYDq8016643 for ; Wed, 5 Jan 2005 16:34:13 +0100 Message-ID: <2081754121.1104939253171.JavaMail.jira@ajax.apache.org> Date: Wed, 5 Jan 2005 16:34:13 +0100 (CET) From: "Daniel John Debrunner (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Commented: (DERBY-95) NPE when passing in url instead of database name to EmbeddedXADataSource In-Reply-To: <1296411667.1102461428914.JavaMail.apache@nagoya> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/DERBY-95?page=comments#action_57308 ] Daniel John Debrunner commented on DERBY-95: -------------------------------------------- EmbeddedXADataSource.getConnection() should not be returning null, as it implements the XADataSource.getConnection() contract. As Shreyas says it is returning null because the formed JDBC URL is not handled by Derby. My guess is that EmbeddedDriver.getConnection() method is (correctly) returning null as it does not handle that URL. Thus somehow that null is making EmbeddedXADataSource.getConnection() return null, which is strange as the two methods have different return types. So I think the DataSource implementations probably don't handle a null from EmbeddedDriver.getConnection() correctly. > NPE when passing in url instead of database name to EmbeddedXADataSource > ------------------------------------------------------------------------ > > Key: DERBY-95 > URL: http://issues.apache.org/jira/browse/DERBY-95 > Project: Derby > Type: Bug > Components: JDBC > Reporter: Myrna van Lunteren > Priority: Minor > Fix For: 10.0.2.1 > > When passing in a url (e.g. jdbc:derby:mydb) instead of just the database name (e.g. mydb) the XADataSource gives a NullPointerException. > It should either handle this a little more gracefully & give an error, or accept the url (like EmbeddedDataSource does). -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira