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 149451 - [65cat] IllegalStateException: This connection is not added to the ConnectionManager.
Summary: [65cat] IllegalStateException: This connection is not added to the Connection...
Status: VERIFIED FIXED
Alias: None
Product: db
Classification: Unclassified
Component: Show Data (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: _ ahimanikya
URL: http://statistics.netbeans.org/except...
Keywords:
Depends on:
Blocks:
 
Reported: 2008-10-08 07:22 UTC by rajivderas
Modified: 2008-10-18 15:51 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 124634


Attachments
stacktrace (3.35 KB, text/plain)
2008-10-08 07:22 UTC, rajivderas
Details

Note You need to log in before you can comment on or make changes to this bug.
Description rajivderas 2008-10-08 07:22:09 UTC
Build: NetBeans IDE Dev (Build 200810071401)
VM: Java HotSpot(TM) Client VM, 11.0-b11, Java(TM) SE Runtime Environment, 1.6.0_10-beta-b21
OS: Windows XP, 5.1, x86

Stacktrace: 
java.lang.IllegalStateException: This connection is not added to the ConnectionManager.
        at org.netbeans.api.db.explorer.ConnectionManager.showConnectionDialog(ConnectionManager.java:353)
        at org.netbeans.modules.db.dataview.meta.DBConnectionFactory$1.run(DBConnectionFactory.java:99)
        at org.netbeans.modules.db.dataview.meta.DBConnectionFactory$1.run(DBConnectionFactory.java:98)
        at org.openide.util.Mutex.doEventAccess(Mutex.java:1355)
        at org.openide.util.Mutex.readAccess(Mutex.java:268)
        at org.netbeans.modules.db.dataview.meta.DBConnectionFactory.showConnectionDialog(DBConnectionFactory.java:96)
Comment 1 rajivderas 2008-10-08 07:22:22 UTC
Created attachment 71333 [details]
stacktrace
Comment 2 John Baker 2008-10-08 21:59:08 UTC

rajivderas does this happen everytime?  Is there a workaround?

Marking TM as future for now.
Comment 3 _ ahimanikya 2008-10-09 04:06:22 UTC
Looks like a DB Explorer issue. 
Comment 4 John Baker 2008-10-09 06:41:09 UTC
what the exception means is that the connection dialog doesn't have the parameters needed to determine the connection to
be added. 

ConnectionManager showConnectionDialog(DC) is correct.
I think dataview should add some logic to make sure the connection parameters are available before posting the
Connection dialog.  in DBConnectionFactory.getConnection(DC), before posting the show connection dialog, dbconn is just
passed in.  dbconn could even be null.  At least
the dbconn name should be valid.  

rajivderas, before getting this exception did you change a connection's parameters ?
Comment 5 _ ahimanikya 2008-10-09 06:46:37 UTC
Dataview get the connection based on the connection selected in the editor. I am not sure what need to be fixed in
dataview. 
Comment 6 rajivderas 2008-10-09 08:38:38 UTC
>>>rajivderas, before getting this exception did you change a connection's parameters ?
Well i deleted the connection from db explorer and right clicked on the sql results grid and clicked insert record
Comment 7 _ ahimanikya 2008-10-09 08:41:57 UTC
Then what is expected? we should sow some message instead of exception?
Comment 8 rajivderas 2008-10-09 08:47:49 UTC
>>>ahimanikya
Yes your right
Comment 9 _ ahimanikya 2008-10-09 13:30:22 UTC
http://hg.netbeans.org/main/rev/91408cd31155
Comment 10 Roman Mostyka 2008-10-09 17:51:11 UTC
rajivderas, can you verify this issue, please?
Comment 11 Quality Engineering 2008-10-10 05:46:53 UTC
Integrated into 'main-golden', will be available in build *200810100201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/91408cd31155
User: ahimanikya@netbeans.org
Log: Issue #149451 IllegalStateException: This connection is not added
         #148338  org.netbeans.modules.db.dataview.meta.DBException...
Comment 12 rajivderas 2008-10-10 10:02:06 UTC
>>>romanmostyka 
Still reproduceble in  Dev (Build 200810091401)

what should i do?
Comment 13 John Baker 2008-10-10 11:00:33 UTC
You need to use the 1010 build

see previous comment:

"Integrated into 'main-golden', will be available in build *200810100201* 
Comment 14 rajivderas 2008-10-10 12:35:18 UTC
>>>You need to use the 1010 build
oh! ok
Comment 15 rajivderas 2008-10-10 18:30:02 UTC
>>>romanmostyka
verified with the following


Product Version: NetBeans IDE Dev (Build 200810100201)
Java: 1.6.0_10-beta; Java HotSpot(TM) Client VM 11.0-b11
System: Windows XP version 5.1 running on x86; Cp1252; en_US (nb)
Userdir: C:\Documents and Settings\Rajiv Perera\.netbeans\dev
Comment 16 Quality Engineering 2008-10-18 15:51:53 UTC
Integrated into 'main-golden', will be available in build *200810181401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/3190b7b55d18
User: ahimanikya@netbeans.org
Log: Issue #149451 Added logging the strack trace as suggested by David.