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.
Connecting to a database embedded in my application (running on port 1621) I get the following message in the "Java DB Database Process" window Security manager installed using the Basic server security policy. Could not listen on port 1527 on host localhost: java.net.BindException: Address already in use
This is probably because you already have something running at that port - most likely an existing Java DB server. If a port is in use on your machine then the Java DB server can not start. There's not much we can do about it in NetBeans. If you need to change the port number, there is no way in NB today to change the port number used by Java DB. But if you start Java DB outside of NB you can change the port number - see the docs at http://db.apache.org/derby
I have an instance of derby embedded in my own application, and listening on port 4444. Whenever I connect to my application via the Database Explorer, Netbeans starts its own instance of the db server (I can even stop it from the Databases/JavaDB node). Probably I was getting the BindException because of a dangling instance of the db still running on my machine. Anyway, Netbeans should not start its db when connecting to mine. I forgot to mention that I'm using the dev build 200809161401.
OK, now I see that as a valid scenario. We do have it hardcoded to start the Java DB network server, and that should be an option. At a minimum, if the URL doesn't use the default port, we shouldn't start it, or at least we should ask the user and then start it *on that port* I see this as an enhancement, as it is currently operating as designed (even if it's an annoying design). Please let me know if you disagree.
Reassigned to new owner.
*** This bug has been marked as a duplicate of bug 178598 ***