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 137811 - IllegalStateException: Error in org.openide.nodes.EntrySupport$Default with entry Children.Keys.KE[extendedSQLGrammar: false proceduresAreCallable: false readOnly: false maxCharLi,0] from among null i
Summary: IllegalStateException: Error in org.openide.nodes.EntrySupport$Default with e...
Status: VERIFIED FIXED
Alias: None
Product: db
Classification: Unclassified
Component: Code (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Andrei Badea
URL: http://statistics.netbeans.org/except...
Keywords:
: 137804 137812 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-06-20 10:39 UTC by Jan Horvath
Modified: 2008-09-04 13:22 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 67517


Attachments
stacktrace (1.82 KB, text/plain)
2008-06-20 10:39 UTC, Jan Horvath
Details
stacktrace (1.82 KB, text/plain)
2008-07-21 08:52 UTC, marcelheijmans
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Horvath 2008-06-20 10:39:51 UTC
Build: NetBeans IDE Dev (Build 080620)
VM: Java HotSpot(TM) Client VM, 1.5.0_13-119, Java(TM) 2 Runtime Environment, Standard Edition, 1.5.0_13-b05-237
OS: Mac OS X, 10.5.3, i386

User Comments: 
changing database URL in the db connection properties
Comment 1 Jan Horvath 2008-06-20 10:39:55 UTC
Created attachment 63153 [details]
stacktrace
Comment 2 t_h 2008-06-20 11:01:55 UTC
*** Issue 137812 has been marked as a duplicate of this issue. ***
Comment 3 David Vancouvering 2008-06-20 17:08:16 UTC
This seems to be arising fairly frequently - increasing priority.
Comment 4 David Vancouvering 2008-06-20 23:09:07 UTC
It looks like this happens when we try to remove a connection from the list and it isn't found in the list.  I suspect a
timing issue.
Comment 5 David Vancouvering 2008-06-20 23:55:04 UTC
I think I know the cause.  It's difficult because I can't reproduce.  I think the problem is I recently changed the
equals() and hashCode() method of DatabaseNodeInfo to make use of the display name. 

The problem is that when you change the URL for a connection, you are changing the display name.  Then later on when you
try to remove the connection, it can't be found in the node list because equals() is returning false when it should be
returning true.

So for a connection we need another way to determine if two ConnectionNodeInfo objects are the same (ConnectionNodeInfo
inherits from DatabaseNodeInfo).

I need to see what other nodes can have their display name changed, or better yet find a hashcode/equals for
DatabaseNodeInfo that relies solely on immutable values.
Comment 6 David Vancouvering 2008-06-20 23:56:25 UTC
Yes, I was able to reproduce.

- Create a connection
- Disconnect
- Go to properties and change the value for the URL (or username)
- Try to remove the connection

In this way you are guaranteed to get the IllegalStateException
Comment 7 David Vancouvering 2008-06-21 00:12:15 UTC
I have a fix.  Will mark this issue as fixed once I push.
Comment 8 David Vancouvering 2008-06-21 04:32:31 UTC
http://hg.netbeans.org/main?cmd=changeset;node=cf2bac824687
Comment 9 David Vancouvering 2008-06-21 04:33:28 UTC
*** Issue 137804 has been marked as a duplicate of this issue. ***
Comment 10 Quality Engineering 2008-06-21 15:49:12 UTC
Integrated into 'main-golden', available in NB_Trunk_Production #273 build
Changeset: http://hg.netbeans.org/main/rev/cf2bac824687
User: David Van Couvering <davidvc@netbeans.org>
Log: #137811 - IllegalStateException when deleting a connection whose properties have been modified
Comment 11 rbalada 2008-07-17 12:11:18 UTC
David/Honzo,

can you please verify the bugfix in trunk builds? Only verified bugfixes can be ported to NB 6.1 Patch (3) release.

Thanks,
-R
Comment 12 giorgio42 2008-07-18 14:15:18 UTC
Just got this with 6.5 daily 200807170007.
Comment 13 marcelheijmans 2008-07-21 08:52:00 UTC
Build: NetBeans IDE Dev (Build 200807170007)
VM: Java HotSpot(TM) 64-Bit Server VM, 11.0-b11-fastdebug, Java(TM) SE Runtime Environment, 1.6.0_10-beta-fastdebug-b22
OS: Linux, 2.6.22-14-generic, amd64

User Comments: 
Deleting a database connection in the Services view results in a exception
Comment 14 marcelheijmans 2008-07-21 08:52:04 UTC
Created attachment 65087 [details]
stacktrace
Comment 15 Andrei Badea 2008-07-28 15:12:05 UTC
Looking at it.
Comment 16 Andrei Badea 2008-07-28 15:47:48 UTC
37040e6772c5
Comment 17 Quality Engineering 2008-07-29 03:58:09 UTC
Integrated into 'main-golden', available in NB_Trunk_Production #352 build
Changeset: http://hg.netbeans.org/main/rev/37040e6772c5
User: Andrei Badea <abadea@netbeans.org>
Log: #137811: IllegalStateException: Error in org.openide.nodes.EntrySupport$Default
Comment 18 Roman Mostyka 2008-07-29 16:47:28 UTC
Verified with build 080729.
Comment 19 rbalada 2008-07-30 09:42:49 UTC
The changeset http://hg.netbeans.org/main/rev/37040e6772c5 is not applicable in release61_fixes repository, because it
is effectively a backout of changeset http://hg.netbeans.org/main/rev/18eec35a8c7e made in trunk(6.5) on July 9, 2008
(long after 6.1 branching&release).

I've ported the changeset http://hg.netbeans.org/main/rev/cf2bac824687 into release61_fixes repository as
http://hg.netbeans.org/release61_fixes/rev/52d0c9d1f933