Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 348337 - [AskAQuestion] Nullpointer Exception
Summary: [AskAQuestion] Nullpointer Exception
Status: RESOLVED FIXED
Alias: None
Product: ECF
Classification: RT
Component: ecf.newsreader (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Isuru Udana CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-05 13:50 EDT by Wim Jongman CLA
Modified: 2011-06-06 00:16 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Wim Jongman CLA 2011-06-05 13:50:15 EDT
When starting the "Ask a Question" action I got this error. The stacktrace can be copied in the stacktrace console.

!ENTRY org.eclipse.ui 4 0 2011-06-05 19:46:13.192
!MESSAGE Unhandled event loop exception
!STACK 0
java.lang.NullPointerException
	at org.eclipse.ecf.salvo.ui.internal.wizards.SelectNewsgroupWizardPage.getAllNewsgroups(SelectNewsgroupWizardPage.java:80)
	at org.eclipse.ecf.salvo.ui.internal.wizards.SelectNewsgroupWizardPage.<init>(SelectNewsgroupWizardPage.java:26)
	at org.eclipse.ecf.salvo.ui.wizards.AskAQuestionWizard.addPages(AskAQuestionWizard.java:31)
	at org.eclipse.jface.wizard.WizardDialog.createContents(WizardDialog.java:603)
	at org.eclipse.jface.window.Window.create(Window.java:431)
	at org.eclipse.jface.dialogs.Dialog.create(Dialog.java:1089)
	at org.eclipse.jface.window.Window.open(Window.java:790)
	at org.eclipse.ecf.salvo.ui.internal.handlers.AskAquestionHandler.execute(AskAquestionHandler.java:17)
	at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:293)
	at org.eclipse.core.commands.Command.executeWithChecks(Command.java:476)
	at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508)
	at org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:169)
	at org.eclipse.ui.internal.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:241)
	at org.eclipse.ui.menus.CommandContributionItem.handleWidgetSelection(CommandContributionItem.java:820)
	at org.eclipse.ui.menus.CommandContributionItem.access$19(CommandContributionItem.java:806)
	at org.eclipse.ui.menus.CommandContributionItem$5.handleEvent(CommandContributionItem.java:796)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1258)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3540)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3161)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2640)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438)
	at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:664)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115)
	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:369)
	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:619)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1407)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1383)
Comment 1 Wim Jongman CLA 2011-06-05 13:54:53 EDT
The reason is that there were no stores started. Please add some defensive code to the application.
Comment 2 Isuru Udana CLA 2011-06-05 15:33:41 EDT
Defensive code added
Comment 3 Wim Jongman CLA 2011-06-05 17:03:47 EDT
Assigning to Isuru
Comment 4 Isuru Udana CLA 2011-06-06 00:16:26 EDT
fixed.

Now an error message is shown to user if user access this functionality without starting a store.