Effective October 27, 2012, online and email support for FuseSource products will move to Red Hat support channels. For more information, please see the JIRA Migration to Red Hat FAQ.
As of October 27th, please open all new issues in the Red Hat Customer Portal .
Issue Details (XML | Word | Printable)

Key: ECLIPSE-545
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Minor Minor
Assignee: Lars Heinemann
Reporter: Claus Ibsen
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Fuse IDE

NPE in Fabric Explorer Tree when selecting Refresh when you are disconnected

Created: 24/Feb/12 10:48 AM   Updated: 24/Feb/12 08:49 PM
Component/s: None
Affects Version/s: None
Fix Version/s: 2.1.0

File Attachments: None
Image Attachments:

1. NPE.png
(17 kB)


 Description  « Hide
To reproduce

1. Connect to a local fabric
2. Expand the tree, so you can see containers etc
3. Disconnect from local fabric
4. Select the Containers node (see screenshot)
5. Right click -> Refresh

You get the NPE below.

java.lang.NullPointerException
	at com.fusesource.ide.fabric.navigator.VersionsNode.loadChildren(VersionsNode.java:40)
	at com.fusesource.rider.commons.tree.RefreshableNode.checkLoaded(RefreshableNode.java:79)
	at com.fusesource.ide.fabric.navigator.VersionsNode.getDefaultVersionNode(VersionsNode.java:55)
	at com.fusesource.ide.fabric.navigator.Fabric.getDefaultVersionNode(Fabric.java:163)
	at com.fusesource.ide.fabric.actions.CreateSshAgentAction.<init>(CreateSshAgentAction.java:31)
	at com.fusesource.ide.fabric.navigator.Fabric.provideContextMenu(Fabric.java:159)
	at com.fusesource.ide.jmx.ui.internal.views.navigator.ActionProvider.fillContextMenu(ActionProvider.java:74)
	at org.eclipse.ui.navigator.NavigatorActionService$2.run(NavigatorActionService.java:221)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.ui.navigator.NavigatorActionService.addCommonActionProviderMenu(NavigatorActionService.java:216)
	at org.eclipse.ui.navigator.NavigatorActionService.fillContextMenu(NavigatorActionService.java:173)
	at org.eclipse.ui.navigator.CommonNavigatorManager.fillContextMenu(CommonNavigatorManager.java:260)
	at org.eclipse.ui.navigator.CommonNavigatorManager$4.menuAboutToShow(CommonNavigatorManager.java:275)
	at org.eclipse.jface.action.MenuManager.fireAboutToShow(MenuManager.java:342)
	at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:473)
	at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:469)
	at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:495)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:247)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4128)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1457)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1480)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1461)
	at org.eclipse.swt.widgets.Menu.menuWillOpen(Menu.java:805)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:5525)
	at org.eclipse.swt.internal.cocoa.OS.objc_msgSend(Native Method)
	at org.eclipse.swt.internal.cocoa.NSMenu.popUpContextMenu(NSMenu.java:73)
	at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:277)
	at org.eclipse.swt.widgets.Display.runPopups(Display.java:4051)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3606)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2696)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2660)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2494)
	at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:674)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:667)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:123)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1410)


 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Claus Ibsen added a comment - 24/Feb/12 10:50 AM
It appears that if you are disconnected, then the "Refresh" menu item is still active. I guess it should be non-active. As you would need to Connect first, before it can work.

The same NPE appears if you do the same on the "Local Fabric" node, and chose Refresh.


Lars Heinemann added a comment - 24/Feb/12 08:49 PM
I was unable to reproduce that issue here but I added appropriate null checks to prevent this in future.