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.
|Summary:||Provide an option to not start the Java DB server when connecting|
|Component:||Derby||Assignee:||Libor Fischmeistr <lfischmeistr>|
|Issue Type:||ENHANCEMENT||Exception Reporter:|
Description aldobrucale 2008-09-17 15:49:59 UTC
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
Comment 1 David Vancouvering 2008-09-17 17:54:42 UTC
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
Comment 2 aldobrucale 2008-09-17 18:40:23 UTC
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.
Comment 3 David Vancouvering 2008-09-17 18:54:12 UTC
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.
Comment 4 Jiri Rechtacek 2009-10-16 14:13:36 UTC
Reassigned to new owner.