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 145339

Summary: ConnectionManager.connect() assertion failure if you run it just after adding a connection
Product: db Reporter: David Vancouvering <davidvc>
Component: CodeAssignee: David Vancouvering <davidvc>
Status: RESOLVED FIXED    
Severity: blocker    
Priority: P3    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:

Description David Vancouvering 2008-08-27 18:39:12 UTC
If you do the following in code:

- create a new connection
- add the connection using ConnectionManager.getDefault().addConnection()
- connect the connection using ConnectionManager.getDefault().connect(dbconn)

Then more often than not you will get an assertion failure because ConnectionManager.connectSync() can't find the
DatabaseNodeInfo for the newly added connection.

This is a timing error caused by how we refresh the connection list.
Comment 1 David Vancouvering 2008-08-27 18:43:15 UTC
4e7924b81aa0
Comment 2 Quality Engineering 2008-08-28 06:31:12 UTC
Integrated into 'main-golden', available in build *200808280201* on http://bits.netbeans.org/dev/nightly/
Changeset: http://hg.netbeans.org/main/rev/4e7924b81aa0
User: David Van Couvering <davidvc@netbeans.org>
Log: #145339: ConnectionManager.connect() assertion failure if you run it just after adding a connection