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 145942 - [65cat] IllegalStateException: This connection is not added to the ConnectionManager.
Summary: [65cat] IllegalStateException: This connection is not added to the Connection...
Status: RESOLVED DUPLICATE of bug 144819
Alias: None
Product: db
Classification: Unclassified
Component: Code (show other bugs)
Version: 6.x
Hardware: PC Linux
: P3 blocker (vote)
Assignee: David Vancouvering
URL: http://statistics.netbeans.org/except...
Keywords:
Depends on:
Blocks:
 
Reported: 2008-09-02 16:00 UTC by Michel Graciano
Modified: 2008-09-09 01:33 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 90938


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michel Graciano 2008-09-02 16:00:06 UTC
Build: NetBeans IDE 6.5 Beta (Build 200808111757)
VM: Java HotSpot(TM) Client VM, 11.0-b11, Java(TM) SE Runtime Environment, 1.6.0_10-beta-b14
OS: Linux, 2.6.24-19-generic, i386
User comments: I tried to invoke code completion in SQL Command.
STACKTRACE: (first 10 lines)
java.lang.IllegalStateException: This connection is not added to the ConnectionManager.
        at org.netbeans.api.db.explorer.DatabaseConnection.getJDBCConnection(DatabaseConnection.java:223)
        at org.netbeans.modules.db.metadata.model.DBConnMetadataModel.enterReadAccess(DBConnMetadataModel.java:126)
        at org.netbeans.modules.db.metadata.model.DBConnMetadataModel.runReadAction(DBConnMetadataModel.java:89)
        at org.netbeans.modules.db.metadata.model.api.MetadataModel.runReadAction(MetadataModel.java:63)
        at org.netbeans.modules.db.sql.editor.completion.SQLCompletionQuery.query(SQLCompletionQuery.java:102)
        at org.netbeans.spi.editor.completion.support.AsyncCompletionTask.run(AsyncCompletionTask.java:218)
        at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:572)
        at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:997)
Comment 1 Michel Graciano 2008-09-02 16:04:21 UTC
1-Create a connection
2-Connect to that and open a sql editor
3-Test any script, and it should works
4-Change the connection, for example, the user name on the Service view
5-Back to the original sql editor and try to run the query again... this exception should be thrown

Regards
Comment 2 David Vancouvering 2008-09-02 18:43:41 UTC
I suspect this is related to the fact that we identify a connection by name, where its name is a combination of database
URL, user and schema.  So you change the user name, and our code is (incorrectly) not able to find the connection any
more.  Changing the name on the connection should propagate this change to the node that represents it in the Database
Explorer.
Comment 3 David Vancouvering 2008-09-09 01:31:31 UTC
Further investigation has shown me that these two issues have the same root cause.

*** This issue has been marked as a duplicate of 146442 ***
Comment 4 David Vancouvering 2008-09-09 01:32:40 UTC
Marked it as duplicate of the wrong issue.
Comment 5 David Vancouvering 2008-09-09 01:33:08 UTC

*** This issue has been marked as a duplicate of 144819 ***