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 29866

Summary: Connect, disconnect on Database Connection freezes IDE for several min
Product: db Reporter: Martin Schovanek <mschovanek>
Component: CodeAssignee: Radko Najman <rnajman>
Status: VERIFIED FIXED    
Severity: blocker CC: bht
Priority: P2    
Version: 3.x   
Hardware: PC   
OS: Linux   
Issue Type: DEFECT Exception Reporter:
Bug Depends on: 28199, 30946    
Bug Blocks:    

Description Martin Schovanek 2003-01-08 12:40:35 UTC
[Nb Build 200301080100, jdk 1.4.1-b21]

Step to reproduce:
------------------
- connect, disconnect Database Connection several
times

The CPU usage is 100% and stack trace for the
whole time looks like this:

"AWT-EventQueue-0" prio=1 tid=0x0x853bc40
nid=0x4753 runnable [bdffe000..bdfff880]
        at
java.lang.Throwable.fillInStackTrace(Native Method)
        at
java.lang.Throwable.<init>(Throwable.java:217)
        at
java.lang.Exception.<init>(Exception.java:59)
        at
java.lang.ClassNotFoundException.<init>(ClassNotFoundException.java:65)
        at
java.lang.ClassLoader.findBootstrapClass(Native
Method)
        at
java.lang.ClassLoader.findBootstrapClass0(ClassLoader.java:723)
        at
java.lang.ClassLoader.loadClass(ClassLoader.java:294)
        - locked <0x449bd348> (a
sun.misc.Launcher$ExtClassLoader)
        at
java.lang.ClassLoader.loadClass(ClassLoader.java:292)
        - locked <0x44996b88> (a
sun.misc.Launcher$AppClassLoader)
        at
sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:265)
        - locked <0x44996b88> (a
sun.misc.Launcher$AppClassLoader)
        at
java.lang.ClassLoader.loadClass(ClassLoader.java:255)
        at
java.beans.Introspector.instantiate(Introspector.java:1288)
        at
java.beans.PropertyEditorManager.findEditor(PropertyEditorManager.java:104)
        - locked <0x4a76df00> (a java.lang.Class)
        at
org.openide.nodes.Node$Property.getPropertyEditor(Node.java:1032)
        at
org.openide.explorer.propertysheet.PropertyPanel.updateEditor(PropertyPanel.java:625)
        at
org.openide.explorer.propertysheet.PropertyPanel.<init>(PropertyPanel.java:280)
        at
org.openide.explorer.propertysheet.PropertyPanel.<init>(PropertyPanel.java:286)
        at
org.openide.explorer.propertysheet.PropertySheetTab.fillProperties(PropertySheetTab.java:288)
        at
org.openide.explorer.propertysheet.PropertySheetTab.createPane(PropertySheetTab.java:236)
        at
org.openide.explorer.propertysheet.PropertySheetTab.ensurePaneCreated(PropertySheetTab.java:192)
        at
org.openide.explorer.propertysheet.PropertySheet.setCurrentPage(PropertySheet.java:337)
        at
org.openide.explorer.propertysheet.PropertySheet$1.stateChanged(PropertySheet.java:140)
        at
javax.swing.JTabbedPane.fireStateChanged(JTabbedPane.java:287)
        at
javax.swing.JTabbedPane$ModelListener.stateChanged(JTabbedPane.java:219)
        at
javax.swing.DefaultSingleSelectionModel.fireStateChanged(DefaultSingleSelectionModel.java:116)
        at
javax.swing.DefaultSingleSelectionModel.setSelectedIndex(DefaultSingleSelectionModel.java:50)
        at
javax.swing.JTabbedPane.setSelectedIndexImpl(JTabbedPane.java:468)
        at
javax.swing.JTabbedPane.setSelectedIndex(JTabbedPane.java:461)
        at
javax.swing.JTabbedPane.insertTab(JTabbedPane.java:573)
        at
javax.swing.JTabbedPane.addTab(JTabbedPane.java:607)
        at
org.openide.explorer.propertysheet.PropertySheet.setCurrentNode(PropertySheet.java:515)
        at
org.openide.explorer.propertysheet.PropertySheet.access$700(PropertySheet.java:52)
        at
org.openide.explorer.propertysheet.PropertySheet$2.run(PropertySheet.java:623)
        at
java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:178)
        at
java.awt.EventQueue.dispatchEvent(EventQueue.java:448)
        at
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:197)
        at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
        at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:144)
        at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:136)
        at
java.awt.EventDispatchThread.run(EventDispatchThread.java:99)
Comment 1 bht 2003-01-13 05:20:23 UTC
I get the same problem with the IDE version 4, build 2003 0108 0100
in Win98.
However I do not get any errors in the log.
Connect time is about 3 minutes, disconnect is 10 minutes, both with
100% CPU.

How to reproduce:
Install the embeddable database engine QED from
www.quadcap.com/

This might provide a better testing environment.
Why? Because I have used the database explorer with other databases
but with QED the disconnect time is much slower. 

However QED normally connects and disconnects as fast or faster than
other embeddable databases.

Comment 2 Radko Najman 2003-01-17 14:19:38 UTC
The main problem is that the db connection is created in AWT thread.
When the connection is created, the module starts to get basic
informations about the database (metadata) to display them in
properties window so it communicates with the database. This action
can take some time and in this time the IDE is frozen.
There is a task in Issuezilla (#28199) to reimplement the Database
Explorer module to run these tasks in separate threads.

Partially fixed in trunk - properties are set in a separete thread.
Comment 3 Radko Najman 2003-01-22 08:36:18 UTC
One more performance enhancement implemented - PropertySupport object
is created only once, not everytime when the connection status is changed.

Closing as FIXED, the other progress will be tracked under bug #28199.
Comment 4 Radko Najman 2003-01-24 14:05:35 UTC
*** Issue 30319 has been marked as a duplicate of this issue. ***
Comment 5 Martin Schovanek 2003-03-12 19:39:43 UTC
VERIFIED