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 152048

Summary: DatabaseNodeInfo.refreshChildren() can not be called on the event thread
Product: db Reporter: David Vancouvering <davidvc>
Component: CodeAssignee: David Vancouvering <davidvc>
Status: VERIFIED FIXED    
Severity: blocker CC: sustaining
Priority: P2    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:

Description David Vancouvering 2008-10-31 22:55:33 UTC
It was never a good idea to call refreshChildren() on the event thread as it goes to the database.  But recent changes
to the refresh logic can cause exceptions to be thrown when this is done.  In particular, initChildren() for many
subclasses of DatabaseNodeInfo now call DatabaseConnection.getJDBCConnection(test), which throws an exception if it's
called on the event thread.

To fix this, we need to check and see if refreshChildren() is being called on the event thread, and if so, run it on a
background thread.
Comment 1 David Vancouvering 2008-10-31 22:59:32 UTC
455ccd51237a
Comment 2 Quality Engineering 2008-11-01 05:09:08 UTC
Integrated into 'main-golden', will be available in build *200811010201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/455ccd51237a
User: David Van Couvering <davidvc@netbeans.org>
Log: #152048: DatabaseNodeInfo.refreshChildren() can not be called on the event thread
Comment 3 Roman Mostyka 2008-11-05 19:28:03 UTC
Verified.
Comment 4 rbalada 2008-11-14 13:00:45 UTC
I've transplanted the changeset http://hg.netbeans.org/main/rev/455ccd51237a into release65_fixes repository as
http://hg.netbeans.org/release65_fixes/rev/040b48f2dabb