David Poxon
David Poxon

Reputation: 2503

Error Running RCP Project in Eclipse

I have inherited an existing RCP project, and I am totally new to how this type of project works.

I am running Eclipse IDE for Java Developers (Version: Oxygen.3 Release (4.7.3)).

When I try to run the project as an Eclipse application, I get the following error:

java.lang.NullPointerException
    at org.eclipse.e4.ui.internal.workbench.ModelServiceImpl.<init>(ModelServiceImpl.java:122)
    at org.eclipse.e4.ui.internal.workbench.swt.E4Application.createDefaultContext(E4Application.java:511)
    at org.eclipse.e4.ui.internal.workbench.swt.E4Application.createE4Workbench(E4Application.java:204)
    at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:614)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148)
    at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)
    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.equinox.launcher.Main.invokeFramework(Main.java:653)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1499)
    at org.eclipse.equinox.launcher.Main.main(Main.java:1472)

I have seen some solutions for this issue saying org.eclipse.equinox.ds and org.eclipse.equinox.event are required to be included in the plugin dependencies, but this has not solved my problem.

Upvotes: 0

Views: 514

Answers (1)

David Poxon
David Poxon

Reputation: 2503

To solve this issue, I did the following:

  1. Delete my Run configuration: Run > Run Configuration, then select the configuration, press big red x button, close
  2. Created product configuration: File > New > Other, then Plugin Development > Product Configuration, next, select project, provide product configuration filename, finish
  3. Product configuration file should be opened automatically (if not, open it), then, select Contents tab, and add the org.eclipse.equinox.event plugin
  4. Select Configuration tab, add org.eclipse.equinox.event to Start Levels and set Auto-Start to true

Upvotes: 1

Related Questions