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.
1. Try to connect to some DB, but with wrong settings (I used wrong port). 2. Click "Cancel" button. Result: Message "Connecting to database..." is still in status bar, I guess that attempt to connect isn't canceled.
I think the progress bar just doesn't get closed, I don't think it's still trying to connect. I don't believe this is a P2 - it's not preventing the user from being productive.
I've been trying this on Mac OS and can't reproduce it. The "Connecting to database" in the progress bar doesn't persist. In fact it doesn't even seem to appear after the 1st try, although that just may be that it goes by too fast. In any case I'm not sure this scenario should be dumping an exception. Although the drivers throw exceptions, maybe we can be smarter about dealing with this and present something a bit more useful to the user. Is it worth the effort?
I think what you need for this is a server that hangs the client. Have you tried with MySQL? How about MySQL on a remote machine? Catch me on IM and I can point you to some servers on the Sun network. In terms of how we should report the exception, we shoud discuss this at i-team. There are a number of discussions about exception reporting going on and it would be good to come to some agreement about this.
I always can reproduce this on Windows XP. I haven't tried with MySQL, but I tried also with valid settings for bundled Java DB. If Java DB is starting too slow, then after 5 second I see dialog and click "Cancel" in it to cancel attempt to connect. But IDE still tries to establish connection. And message in the dialog is quite informative, just after canceling process should be stopped (even if it is only in progress bar).
OK, I can see by inspection how this happens. The Cancel button remains enabled during the connection process. So this isn't an issue only for attempting a connection with bad parameters. This can happen for a good connection attempt as well. If the connection setup is slow enough to give the user a chance to click Cancel we have the same situation. Clearing the progress handle is simple. But I think there's another issue, which is more important. What happens if the user cancels the connection dialog and then the async connection process completes and fires its event? I'm not sure what will happen at the moment, but the correct behavior would not show itself in any way after the user has canceled. So we'll want to keep track of the fact that there's an outstanding request. Anyone have any thoughts on this for the near term? Fixing the progress handle is a 15 minute job from here. The rest requires some actual thought.
1052fe547413
Integrated into 'main-golden', available in build *200808210201* on http://bits.netbeans.org/dev/nightly/ Changeset: http://hg.netbeans.org/main/rev/e8b2a38afa99 User: Rob Englander <mindstream@netbeans.org> Log: #137746 Terminate progress bar if user presses cancel in New Connection dialog.
Verified with build 080821.