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 211614

Summary: [NetBeansInOSGi] ISE "This connection is not added to the ConnectionManager." from ConnectionManager.showConnectionDialog
Product: db Reporter: Jesse Glick <jglick>
Component: CodeAssignee: Libor Fischmeistr <lfischmeistr>
Status: NEW ---    
Severity: normal    
Priority: P4    
Version: 7.2   
Hardware: PC   
OS: Linux   
URL: http://wiki.netbeans.org/NetBeansInOSGi#Demo
Issue Type: DEFECT Exception Reporter:
Bug Depends on:    
Bug Blocks: 210325    

Description Jesse Glick 2012-04-24 02:55:59 UTC
Running the IDE inside an OSGi container, I expanded Databases > Java DB > sample and selected Connect, but I just got


java.lang.IllegalStateException: This connection is not added to the ConnectionManager.
	at org.netbeans.api.db.explorer.ConnectionManager.showConnectionDialog(ConnectionManager.java:352)
	at org.netbeans.modules.derby.ConnectDatabaseAction$1.connectionsChanged(ConnectDatabaseAction.java:119)
	at org.netbeans.modules.db.explorer.ConnectionList.fireListeners(ConnectionList.java:166)
	at org.netbeans.modules.db.explorer.ConnectionList.access$000(ConnectionList.java:71)
	at org.netbeans.modules.db.explorer.ConnectionList$1.resultChanged(ConnectionList.java:102)
	at org.openide.util.lookup.ProxyLookup$1Notify.run(ProxyLookup.java:181)
	at org.openide.util.lookup.ProxyLookup.setLookups(ProxyLookup.java:190)
	at org.openide.util.lookup.ProxyLookup.setLookups(ProxyLookup.java:126)
	at org.netbeans.modules.settings.RecognizeInstanceObjects$OverObjects.ch(RecognizeInstanceObjects.java:175)
	at org.netbeans.modules.settings.RecognizeInstanceObjects$OverObjects.fileChanged(RecognizeInstanceObjects.java:159)
	at sun.reflect.GeneratedMethodAccessor8.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	at org.openide.util.WeakListenerImpl$ProxyListener.invoke(WeakListenerImpl.java:457)
	at $Proxy1.fileChanged(Unknown Source)
	at org.openide.filesystems.FCLSupport$DispatchEventWrapper.dispatchEventImpl(FCLSupport.java:145)
	at org.openide.filesystems.FCLSupport$DispatchEventWrapper.dispatchEvent(FCLSupport.java:128)
	at org.openide.filesystems.FCLSupport.dispatchEvent(FCLSupport.java:105)
	at org.openide.filesystems.FileObject$ED.dispatch(FileObject.java:1280)
	at org.openide.filesystems.EventControl.invokeDispatchers(EventControl.java:213)
	at org.openide.filesystems.EventControl.exitAtomicAction(EventControl.java:188)
	at org.openide.filesystems.EventControl.runAtomicAction(EventControl.java:129)
	at org.openide.filesystems.FileSystem.runAtomicAction(FileSystem.java:607)
	at org.netbeans.modules.db.explorer.DatabaseConnectionConvertor$PCL.run(DatabaseConnectionConvertor.java:520)

Not sure what the root problem was here, but showConnectionDialog should at least behave more gracefully.