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.

Bug 120862 - Java DB status message is not refreshed after connecting to connection that requires a password
Summary: Java DB status message is not refreshed after connecting to connection that r...
Status: RESOLVED WORKSFORME
Alias: None
Product: db
Classification: Unclassified
Component: Derby (show other bugs)
Version: 6.x
Hardware: All All
: P4 blocker (vote)
Assignee: David Vancouvering
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-11-01 17:58 UTC by John Baker
Modified: 2008-01-09 19:42 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John Baker 2007-11-01 17:58:16 UTC
If JavaDB is not connected, I open a project that tries to establish a Java DB connection, the
message "Could not listen on port 1527" is printed to the
Output window.

However, once the project opens and a connection is established, this
message is not refreshed.

This may be a bug.
Is there an API to refresh the connection to display the correct
"connected" message after a successful connection is made?

My guess is that the ConnectionProgressListener is not firing an event to refresh the Output window
Comment 1 David Vancouvering 2007-11-01 18:56:37 UTC
Can you confirm that a Java DB server is not already running when this happens? 

Are you establishing a Java DB connection using native JDBC or using the DB Explorer API?

Thanks!

David
Comment 2 John Baker 2007-11-01 19:06:18 UTC
There was no instance of Java DB running or attempt to start.
javax.sql.DataSource.getConnection()

doesn't attempt to start Java DB.

In my case, to make a connection to Java DB, I use

ConnectionManager.getDefault().showConnectionDialog(conn);

Maybe it's my logic, a connection is established, but if I check the main menu, Tools->Java DB then Start Server
is enabled which implies the the server is not running, but I can expand the connection.

The Server should be started or running if I can make a connection, right?
Comment 3 John Baker 2007-11-02 00:08:25 UTC
Update:  using ConnectionManager.getDefault().showConnectionDialog(conn);
 to post the Connecting ... dialog

The "Could not listen on port 1527" messages is printed if, for the particular connection, the remember password is enabled.

Otherwise, if Rememeber password is false, then when connecting, the expected message:
"Apache Derby Network Server - 10.2.2.1 - (538595) started and ready to accept connections on port 1527 at 2007-11-01
22:59:57.453 GMT "  appears

The logic for the Progress dialog must not be starting the server or maybe there's some timing issue
Comment 4 John Baker 2007-11-02 00:16:02 UTC
well, the previous observation, now appears to be random and doesn't really matter whether Remember password is true. 
So, seems to be a timing issue
Comment 5 David Vancouvering 2007-11-02 01:04:28 UTC
OK, can you tell me exactly how to reproduce, and I'll take a look.

Thanks!

David
Comment 6 David Vancouvering 2007-11-02 01:05:12 UTC
Marking incomplete, waiting for instructions on how to reproduce
Comment 7 John Baker 2007-11-02 02:19:43 UTC
AFAIK, there are no consistently reproducible steps.

Yes, the server must be running, so the Tools->Java DB menu must be out of sync since the Start Server menuitem
is enabled.

I haven't seen any users complain about this for awhile, so lowering the priority and keep the state at INCOMPLETE for now
Comment 8 David Vancouvering 2008-01-09 19:42:00 UTC
Closing, as I haven't heard complaint about this or seen it myself, and there are no consistent steps for reproducing.