[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
| [ecf-dev] ECF 0.8.2 and Eclipse 3.1.2 | 
Hi Folks,
With recent versions (0.8.2) folks have been finding NPEs occuring in 
ECF when running on Eclipse 3.1.2.  See below for a recently an example 
reported to this newsgroup, or bug 
https://bugs.eclipse.org/bugs/show_bug.cgi?id=143681
I've reproduced this NPE on 3.1.2.  As I suspected, this *is* due to the 
fact that it's running on 3.1.2 and the problem does not occur on 3.2 
stream.  Just for background, the problem is that Eclipse 3.1.2 has a 
header in the bundle manifest.mf that looks like this:
Eclipse-AutoStart: true
and this header determines whether the enclosing plugin is automatically
started  when a class that it contains is accessed.  This auto starting 
is required, otherwise perfectly legitimate calls like this:
ClientPlugin.getDefault().getDialogSettings()
throw a NPE because the ClientPlugin.getDefault() returns null (without 
the AutoStart header).  And getDefault() should *never* return null.
The Eclipse-AutoStart header was deprecated in 3.2 (in favor of 
Eclipse-LazyStart), and so we removed/changed the header in the ECF 
codebase in order to keep the codebase clean.
So, if you can use 3.2 for building your app then that will fix the 
problem.  I'll see about the work involved in retrofitting the existing 
ECF codebase with these headers and doing additional API 
back-porting...but I'm not sure if it is worth it at this point.  But 
that's what I need feedback on.  Please let me know if those of you 
using 3.1.2 *cannot* use 3.2 but still want to use the most recent 
versions of ECF (i.e. 0.8.X).
Thanks,
Scott
I use update manager to get ECF, but when I restart the workbench and 
click the "Connect Workspace" button, java.lang.NullPointerException is 
reported:
java.lang.NullPointerException
    at 
org.eclipse.ecf.example.collab.ui.ConnectionDialog.getDialogSettings(ConnectionDialog.java:330)
    at 
org.eclipse.ecf.example.collab.ui.ConnectionDialog.restoreDialogSettings(ConnectionDialog.java:262)
    at 
org.eclipse.ecf.example.collab.ui.ConnectionDialog.createContents(ConnectionDialog.java:191)
    at org.eclipse.jface.window.Window.create(Window.java:418)
    at org.eclipse.jface.dialogs.Dialog.create(Dialog.java:996)
    at org.eclipse.jface.window.Window.open(Window.java:776)
    at 
org.eclipse.ecf.example.collab.actions.NewWorkbenchAction.run(NewWorkbenchAction.java:67)
    at 
org.eclipse.ui.actions.ActionDelegate.runWithEvent(ActionDelegate.java:70)
    at 
org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:236)
    at 
org.eclipse.ui.internal.WWinPluginAction.runWithEvent(WWinPluginAction.java:223)
    at 
org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:538)
    at 
org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:488)
    at 
org.eclipse.jface.action.ActionContributionItem$6.handleEvent(ActionContributionItem.java:441)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:843)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3125)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2758)
    at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1699)
    at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1663)
    at 
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:367)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:143)
    at 
org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:103)
    at 
org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:226)
    at 
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:376)
    at 
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:163)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.eclipse.core.launcher.Main.invokeFramework(Main.java:334)
    at org.eclipse.core.launcher.Main.basicRun(Main.java:278)
    at org.eclipse.core.launcher.Main.run(Main.java:973)
    at org.eclipse.core.launcher.Main.main(Main.java:948)
I have checked the ecf packages (include the example packages) have been 
installed in the plugins directory. My Eclipse version is 3.1.2.
What's the problem?
Thanks in advance.