The simplest plug-in and RCP projects won't launch. #852

CLOSED
Submitted 8 months ago

All of the following has been done on committers-2022-03 (4.23.0). First, I created the Hello World plug-in example described in “Eclipse RCP” 3rd Edition. It fails to launch, apparently due to some missing bundle dependency. The error message on launching the inner eclipse instance is: !MESSAGE FrameworkEvent ERROR !STACK 0 org.osgi.framework.BundleException: Could not resolve module: org.eclipse.equinox.simpleconfigurator, Unresolved requirement: Require-Capability: osgi.ee; filter:="(&(osgi.ee=JavaSE)(version=11))" The Execution Environment settings make no difference, tried JavaSE-8, JavaSE-11, and both, all fail the same way. Similarly, selecting JavaSE-11 in Overview and launching fails the same way. This is fully repeatable, just following the basic steps, on (I haven’t yet tried on earlier releases, but even if it works, that leaves my 2022-03 in an unusable state.) I then tried building the com.example.e4.rcp example, it fails in a different way, many complaints, all seem to stem from the Root exception: java.lang.IllegalStateException: Workbench has not been created yet. at org.eclipse.ui.PlatformUI.getWorkbench(PlatformUI.java:102) at org.eclipse.tm.terminal.view.ui.activator.UIPlugin.start(UIPlugin.java:174) at org.eclipse.osgi.internal.framework.BundleContextImpl$2.run(BundleContextImpl.java:813) at org.eclipse.osgi.internal.framework.BundleContextImpl$2.run(BundleContextImpl.java:1) at java.base/java.security.AccessController.doPrivileged(Native Method) at org.eclipse.osgi.internal.framework.BundleContextImpl.startActivator(BundleContextImpl.java:805) at org.eclipse.osgi.internal.framework.BundleContextImpl.start(BundleContextImpl.java:762) at org.eclipse.osgi.internal.framework.EquinoxBundle.startWorker0(EquinoxBundle.java:1032) at org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.startWorker(EquinoxBundle.java:371) at org.eclipse.osgi.container.Module.doStart(Module.java:605) at org.eclipse.osgi.container.Module.start(Module.java:468) at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel$2.run(ModuleContainer.java:1847) at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor$1$1.execute(EquinoxContainerAdaptor.java:136) at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1840) at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1783) at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1745) at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1667) at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1) at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:234) at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:345)

It may be worth saying that I’m a totally green plug-in and RCP developer (with 5 decades of background, 25+ years of Java dev, etc.). I can’t think of any way I’ve curdled the distro, and standard JDT functionality (on large codebases) works perfectly. I hope you can understand my level of frustration being stuck in my starter blocks, so to speak. Moving a product under development to RCP is a strategic priority for my tiny firm, and failure isn’t an option, I must get over this hump and move ahead with building a new product line on RCP. I’ll say the obvious: attracting first-time RCP devs to use the platform is a win-win for everyone, so why has my getting started experience been so broken? Should I file an eclipse bug? Thanks for reading.

Comments

  8 months ago

Hi Ralf,

the most uptodate and complete information is available under https://learn.vogella.com/. You can also start with the https://www.vogella.com/tutorials/EclipseRCP/article.html tutorial which is a getting starter version. The book is currenlt y in work as it captures an much older release and we plan to release the next edition in a few months.

To your problem, I recommend using Java 11 as runtime or Java 17 to start your IDE and to configure the same JRE in your IDE. If you afterwards follow the starter guide in learn.vogella.com or vogella.com everything should work out of the box. Also I recommend to use the Eclipse SDK as a minimal installation, as described in both guides.

Best regards, Lars

  6 months ago

As I did not hear anymore more, I assume this can be closed

Please login to write a comment.