[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
|
[news.eclipse.technology.ercp] showView() NullPointerException
|
I have an ercp app using M8 that has several views. When I test the views
on win32, all is well. When I test on the wm2003 device, one of the views
doesn't work, failing on a NullPointerException in
Perspective.showView(Unknown Source).
I use the following code to show views from navigation:
private void showView( String id ) {
try {
Plugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getActivePage().showView(
id );
}
catch (PartInitException ex) {
log.error( "Failed to show view: " + id, ex );
throw new RuntimeException( "Failed to show view: " + id, ex );
}
}
Resulting in:
java.lang.NullPointerException
at org.eclipse.ui.internal.Perspective.showView(Unknown Source)
at org.eclipse.ui.internal.WorkbenchPage.busyShowView(Unknown Source)
at org.eclipse.ui.internal.WorkbenchPage.showView(Unknown Source)
at org.eclipse.ui.internal.WorkbenchPage.showView(Unknown Source)
at com.jacobsonco.mobile.auditor.Navigation.showView(Unknown Source)
at com.jacobsonco.mobile.auditor.Navigation.widgetSelected(Unknown Source)
at org.eclipse.swt.widgets.TypedListener.handleEvent(Unknown Source)
at org.eclipse.swt.widgets.EventTable.sendEvent(Unknown Source)
at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
at org.eclipse.swt.widgets.Widget.internal_sendEvent(Unknown Source)
at org.eclipse.ercp.swt.mobile.Command.Command_SendEvent(Unknown Source)
at org.eclipse.ercp.swt.mobile.CommandHandle$2.widgetSelected(Unknown
Source)
at org.eclipse.swt.widgets.TypedListener.handleEvent(Unknown Source)
at org.eclipse.swt.widgets.EventTable.sendEvent(Unknown Source)
at org.eclipse.swt.widgets.Widget.notifyListeners(Unknown Source)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Unknown Source)
at org.eclipse.swt.widgets.Display.readAndDispatch(Unknown Source)
at org.eclipse.ui.internal.Workbench.runEventLoop(Unknown Source)
at org.eclipse.ui.internal.Workbench.runUI(Unknown Source)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Unknown Source)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(Unknown Source)
at com.jacobsonco.mobile.auditor.Application.run(Unknown Source)
at org.eclipse.core.internal.runtime.PlatformActivator$1.run(Unknown
Source)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(Unknown Source)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(Unknown Source)
at java.lang.reflect.AccessibleObject.invokeL(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.core.launcher.Main.invokeFramework(Unknown Source)
at org.eclipse.core.launcher.Main.basicRun(Unknown Source)
at org.eclipse.core.launcher.Main.run(Unknown Source)
at org.eclipse.core.launcher.Main.main(Unknown Source)
What am I missing? What should I try?
Thanks in advance,
Kevin