db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kathey Marsden (JIRA)" <derby-...@db.apache.org>
Subject [jira] Created: (DERBY-736) "" does not work as a userid for Derby client (SqlException: userid length, 0, is not allowed.)
Date Wed, 30 Nov 2005 23:51:30 GMT
""  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  
    Reporter: Kathey Marsden
     Fix For:,,

$ 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
        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.<init>(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
	   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
		con = DriverManager.getConnection("jdbc:derby://localhost:1527/" +
										   user, pwd);

       System.out.println("connected with client" );




This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:

View raw message