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.
Build: NetBeans IDE Dev (Build 200808281401) VM: Java HotSpot(TM) Client VM, 10.0-b22, Java(TM) SE Runtime Environment, 1.6.0_06-b02 OS: Linux, 2.6.24-19-generic, i386 User Comments: Started Netbeans and got this exception Stacktrace: org.netbeans.api.db.explorer.DatabaseException: connection already exists at org.netbeans.modules.db.explorer.infos.RootNodeInfo.addConnection(RootNodeInfo.java:237) at org.netbeans.api.db.explorer.ConnectionManager.addConnection(ConnectionManager.java:145) at org.netbeans.modules.derby.api.DerbyDatabases.registerDatabase(DerbyDatabases.java:365) at org.netbeans.modules.derby.api.DerbyDatabases.createSampleDatabase(DerbyDatabases.java:282) at org.netbeans.modules.derby.Installer$RegisterJDKDerby.registerSampleDatabase(Installer.java:108) at org.netbeans.modules.derby.Installer$RegisterJDKDerby.run(Installer.java:87)
Created attachment 68585 [details] stacktrace
The Java DB directory must have been removed or the location changed for this exception to occur, is this right? I suppose a check to see if the connection exists before attempting to add it.
I need more information please on how to reproduce. If this is a rare use case then the priority may be lowered.
It was quite odd that this exception occurred. I installed a new copy of Ubuntu on this machine. Installed the sun- java-6, sun-java-5, the other remaining all that had sun and java, which I think also had derby. It may very well be that a derby is already started or installed, and when Netbeans starts its .netbeans-derby it may cause the exception... Completely unsure, but it was right after the first start on new installation that this happened.
Build: NetBeans IDE Dev (Build 200808281401) VM: Java HotSpot(TM) Client VM, 1.6.0_02-b06, Java(TM) SE Runtime Environment, 1.6.0_02-b06 OS: Windows XP, 5.1, x86 User Comments: got this exception when I am about to create Java DB Database Stacktrace: org.netbeans.api.db.explorer.DatabaseException: connection already exists at org.netbeans.modules.db.explorer.infos.RootNodeInfo.addConnection(RootNodeInfo.java:237) at org.netbeans.api.db.explorer.ConnectionManager.addConnection(ConnectionManager.java:145) at org.netbeans.modules.derby.api.DerbyDatabases.registerDatabase(DerbyDatabases.java:365) at org.netbeans.modules.derby.api.DerbyDatabases.createDatabase(DerbyDatabases.java:256) at org.netbeans.modules.derby.RegisterDerby$1.run(RegisterDerby.java:183) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:572)
Created attachment 68703 [details] stacktrace
Build: NetBeans IDE Dev (Build 200809020201) VM: Java HotSpot(TM) Client VM, 11.0-b15, Java(TM) SE Runtime Environment, 1.6.0_10-rc-b28 OS: Windows Vista, 6.0, x86 User Comments: Installed full Nightly IDE and exception thrown when launched IDE from Desktop shortcut on windows vista. Stacktrace: org.netbeans.api.db.explorer.DatabaseException: connection already exists at org.netbeans.modules.db.explorer.infos.RootNodeInfo.addConnection(RootNodeInfo.java:238) at org.netbeans.api.db.explorer.ConnectionManager.addConnection(ConnectionManager.java:145) at org.netbeans.modules.derby.api.DerbyDatabases.registerDatabase(DerbyDatabases.java:365) at org.netbeans.modules.derby.api.DerbyDatabases.createSampleDatabase(DerbyDatabases.java:282) at org.netbeans.modules.derby.Installer$RegisterJDKDerby.registerSampleDatabase(Installer.java:108) at org.netbeans.modules.derby.Installer$RegisterJDKDerby.run(Installer.java:87)
Created attachment 68892 [details] stacktrace
a1657941d534
*** Issue 145674 has been marked as a duplicate of this issue. ***
Integrated into 'main-golden', will be available in build *200809031401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/a1657941d534 User: John Baker <jbaker@netbeans.org> Log: #145505 [65cat] org.netbeans.api.db.explorer.DatabaseException: connection already exists
sunbiz, can you verify this issue, since we had another similar issue #146732 and probably that issue is duplicate of this, but reporter said that it isn't fixed. We need to be sure that both issue are fixed, or they aren't duplicates.
Reopening - reproduced in NetBeans IDE Dev (Build 200810080201) http://statistics.netbeans.org/exceptions/detail.do?id=125251
If the user migrates settings from a previous release then I suppose it's possible that the migration could occur at the same time RegisterDerby checks if the connection exists. I think Installer should check if settings are migrated or not before trying to register Derby
wobster, did you import settings from 6.1 while starting NetBeans for the first time?
I couldn't reproduce using the 10/9 nightly build on Linux, using both JDK 1.5.0_16 and 1.6.0_10. I tested starting a new installation by both importing 6.1 settings and without importing. I need more information from wobster
wobster, can You update this issue? Are You still able to reproduce this issue? We can't work on this issue since we don't have enough information. If this issue isn't updated and still in INCOMPLETE state, then we will think that it isn't valid anymore (probably was fixed with another issue) and this issue will be closed.
We haven't got any new info in a month, so I'm closing this issue as FIXED. Please reopen this issue if it is still valid and add some more information.
Verified.