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.
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)
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
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.
Further investigation has shown me that these two issues have the same root cause. *** This issue has been marked as a duplicate of 146442 ***
Marked it as duplicate of the wrong issue.
*** This issue has been marked as a duplicate of 144819 ***