This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Here is the code to reproduce : final DatabaseConnection dbConnection = DatabaseConnection.create(drivers[0], driverURL, username, null, password, true); ConnectionManager.getDefault().addConnection(dbConnection); if(dbConnection.getJDBCConnection() == null ) { return Mutex.EVENT.readAccess(new Mutex.Action<DatabaseConnection>() { public DatabaseConnection run() { ConnectionManager.getDefault().showConnectionDialog(dbConnection); return dbConnection; } }); } This problem goes away when the connection is opened from the services tab and told to remember password..
Reproduced.
Hi, Vadiraj. Here's what I'm seeing. Two connections are considered equal if they both have the same driver, url and user. If you try to add a connection to the explorer, and an equal one already exists, the code quietly ignores this attempt to add a duplicate connection. Then, when you try to connect, since the existing connection didn't have the savePassword flag set, you get the dialog. If, however, the connection doesn't already exist, then the new one gets added with the save password flag, and then when you connect no dialog is raised. The problem is, you can't set the properties of an existing connection. So you'll need to * Look for existing connection, and if it exists, remove it * Create the new connection as you see fit I can see a feature request for being able to change the properties of an existing connection, but that's going to require some thought as it has to handle what to do if the connection is currently connected. If this is *not* what you are seeing, if you get this even if there is no existing connection, please re-open -- I was not able to reproduce under that scenario. David