Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 59315 invoked from network); 1 Dec 2005 03:16:57 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 1 Dec 2005 03:16:57 -0000 Received: (qmail 99817 invoked by uid 500); 1 Dec 2005 03:16:54 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 99638 invoked by uid 500); 1 Dec 2005 03:16:53 -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: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 99600 invoked by uid 99); 1 Dec 2005 03:16:53 -0000 X-ASF-Spam-Status: No, hits=1.3 required=10.0 tests=SPF_FAIL X-Spam-Check-By: apache.org Received: from [192.87.106.226] (HELO ajax.apache.org) (192.87.106.226) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Nov 2005 19:16:53 -0800 Received: from ajax.apache.org (ajax.apache.org [127.0.0.1]) by ajax.apache.org (Postfix) with ESMTP id F2EA8CB for ; Thu, 1 Dec 2005 04:16:31 +0100 (CET) Message-ID: <1660268080.1133406991992.JavaMail.jira@ajax.apache.org> Date: Thu, 1 Dec 2005 04:16:31 +0100 (CET) From: "Kathey Marsden (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Commented: (DERBY-736) "" does not work as a userid for Derby client (SqlException: userid length, 0, is not allowed.) In-Reply-To: <1879123225.1133394690105.JavaMail.jira@ajax.apache.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/DERBY-736?page=comments#action_12358993 ] Kathey Marsden commented on DERBY-736: -------------------------------------- This was an issue from a user who said that this was working on embedded but not for client. If enabled for client, the userid would be passed as is to the embedded driver and be handled like it is in the embedded driver. I am not sure how embedded handles the default schema and authentication for the user "". > "" does not work as a userid for Derby client (SqlException: userid length, 0, is not allowed.) > ------------------------------------------------------------------------------------------------ > > Key: DERBY-736 > URL: http://issues.apache.org/jira/browse/DERBY-736 > Project: Derby > Type: Bug > Components: Network Client > Versions: 10.1.2.1, 10.2.0.0, 10.1.3.0, 10.1.2.2 > Reporter: Kathey Marsden > Fix For: 10.2.0.0, 10.1.3.0, 10.1.2.2 > > $ java TestConnect > Derby embedded allows "" as a user id. DerbyClient however, > throws the following exception: > connected with embedded > Exception in thread "main" org.apache.derby.client.am.SqlException: userid length, 0, is not allowed. > at org.apache.derby.client.net.NetConnection.checkUserLength(NetConnection.java:993) > at org.apache.derby.client.net.NetConnection.checkUser(NetConnection.java:1008) > at org.apache.derby.client.net.NetConnection.checkUserPassword(NetConnection.java:1012) > at org.apache.derby.client.net.NetConnection.flowConnect(NetConnection.java:384) > at org.apache.derby.client.net.NetConnection.(NetConnection.java:195) > at org.apache.derby.jdbc.ClientDriver.connect(ClientDriver.java:125) > at java.sql.DriverManager.getConnection(DriverManager.java:512) > at java.sql.DriverManager.getConnection(DriverManager.java:171) > at TestConnect.main(TestConnect.java:23) > $ > Below is the program to reproduce > import java.sql.DriverManager; > import java.sql.Connection; > import java.sql.*; > public class TestConnect > { > public static void main(String argv[]) > throws Exception > { > Connection con = null; > String user = ""; > String pwd = ""; > // Embedded is ok > Class.forName("org.apache.derby.jdbc.EmbeddedDriver"); > con = DriverManager.getConnection("jdbc:derby:" + "dbemb;create=true", user, pwd); > System.out.println("connected with embedded" ); > // Will not connect with zero length user id with client > Class.forName("org.apache.derby.jdbc.ClientDriver"); > con = DriverManager.getConnection("jdbc:derby://localhost:1527/" + > "dbnet;create=true", > user, pwd); > System.out.println("connected with client" ); > con.close(); > System.out.println("closed"); > } > } > -- 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 - For more information on JIRA, see: http://www.atlassian.com/software/jira