0

I inherited an Eclipse RCP application (org.eclipse.e4.ui.workbench.swt.E4Application) from my colleague.

When I click on Launch an Eclipse application in the MyApp.product overview panel, I get many warnings when validating my plug-ins like these:

warnings

If I click on Continue I get a launch error:

The application could not start

And this is the log:

!ENTRY org.eclipse.equinox.simpleconfigurator 4 0 2024年04月12日 12:25:03.832
!MESSAGE FrameworkEvent ERROR
!STACK 0
org.osgi.framework.BundleException: Could not resolve module: org.eclipse.equinox.simpleconfigurator [1]
 Unresolved requirement: Require-Capability: osgi.ee; filter:="(&(osgi.ee=JavaSE)(version=17))"
 at org.eclipse.osgi.container.Module.start(Module.java:493)
 at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel2ドル.run(ModuleContainer.java:2073)
 at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor1ドル1ドル.execute(EquinoxContainerAdaptor.java:143)
 at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:2064)
 at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:2006)
 at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1967)
 at org.eclipse.osgi.container.SystemModule.startWorker(SystemModule.java:274)
 at org.eclipse.osgi.container.Module.doStart(Module.java:639)
 at org.eclipse.osgi.container.Module.start(Module.java:498)
 at org.eclipse.osgi.container.SystemModule.start(SystemModule.java:198)
 at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:463)
 at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:482)
 at org.eclipse.osgi.launch.Equinox.start(Equinox.java:139)
 at org.eclipse.core.runtime.adaptor.EclipseStarter.startup(EclipseStarter.java:367)
 at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:267)
 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:651)
 at org.eclipse.equinox.launcher.Main.basicRun(Main.java:588)
 at org.eclipse.equinox.launcher.Main.run(Main.java:1459)
 at org.eclipse.equinox.launcher.Main.main(Main.java:1432)
!ENTRY org.eclipse.osgi 4 0 2024年04月12日 12:25:03.832
!MESSAGE Bundle initial@reference:file:plugins/org.eclipse.equinox.simpleconfigurator_1.5.200.v20240209-1053.jar was not resolved.
!ENTRY org.eclipse.equinox.simpleconfigurator 2 0 2024年04月12日 12:25:03.847
!MESSAGE Could not resolve module: org.eclipse.equinox.simpleconfigurator [1]
 Unresolved requirement: Require-Capability: osgi.ee; filter:="(&(osgi.ee=JavaSE)(version=17))"
!ENTRY org.eclipse.osgi 4 0 2024年04月12日 12:25:03.847
!MESSAGE Application error
!STACK 1
java.lang.IllegalStateException: Unable to acquire application service. Ensure that the org.eclipse.core.runtime bundle is resolved and started (see config.ini).
 at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:86)
 at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:439)
 at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:271)
 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:651)
 at org.eclipse.equinox.launcher.Main.basicRun(Main.java:588)
 at org.eclipse.equinox.launcher.Main.run(Main.java:1459)
 at org.eclipse.equinox.launcher.Main.main(Main.java:1432)

I googled and found a possible solution but clicking on Run configurations > Plug-ins > Add required plug-ins won't fix the issue. Another solution, which won't work, is here.

This is the META-INF/MANIFEST.MF file, if you need it:

Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: MyBundle
Bundle-SymbolicName: com.mycompany.myapp;singleton:=true
Bundle-Version: 1.0.0
Bundle-ClassPath: .,
 swing2swt.jar
Bundle-Activator: com.mycompany.myapp.managers.Activator
Bundle-Vendor: mycompany
Export-Package: com.mycompany.mybundle.log.log4j,
 com.mycompany.myapp.data,
 com.mycompany.myapp.dialogs,
 com.mycompany.myapp.handlers,
 com.mycompany.myapp.listeners,
 com.mycompany.myapp.managers,
 com.mycompany.myapp.parts,
 com.mycompany.myapp.providers,
 com.mycompany.myapp.table,
 com.mycompany.myapp.utils,
 com.mycompany.myapp.utils.filesystem,
 com.mycompany.myapp.views
Require-Bundle: org.eclipse.e4.ui.model.workbench;bundle-version="1.0.1",
 org.eclipse.e4.ui.services;bundle-version="1.0.1",
 org.eclipse.e4.ui.workbench;bundle-version="1.0.2",
 org.eclipse.e4.core.di;bundle-version="1.3.0",
 org.eclipse.e4.ui.di;bundle-version="1.0.0",
 org.eclipse.e4.core.contexts;bundle-version="1.3.1",
 org.eclipse.nebula.visualization.xygraph;bundle-version="3.1.0",
 org.eclipse.nebula.widgets.nattable.extension.glazedlists;bundle-version="2.0.0",
 ca.odell.glazedlists;bundle-version="1.9.0",
 org.eclipse.osgi.services,
 org.eclipse.emf.common.ui;bundle-version="2.13.0",
 org.eclipse.emf.ecore.xmi;bundle-version="2.14.0",
 com.mycompany.tmlibrary,
 com.mycompany.applicationManager;bundle-version="1.0.0",
 org.eclipse.draw2d,
 org.eclipse.nebula.widgets.nattable.core;bundle-version="2.0.0",
 org.apache.poi,
 org.eclipse.osgi;bundle-version="3.12.0",
 org.apache.servicemix.bundles.jaxen;bundle-version="1.1.6"
Bundle-ActivationPolicy: lazy
Import-Package: com.mycompany.application.configurations,
 com.mycompany.tmlibrary.configuration,
 com.mycompany.tmlibrary.files,
 com.mycompany.tmlibrary.files.zte,
 com.mycompany.tmlibrary.utils,
 com.mycompany.tool.utils,
 com.mycompany.myapp.managers,
 javax.annotation;version="1.0.0",
 javax.inject;version="1.0.0",
 org.apache.commons.compress.archivers.tar;version="1.6.0",
 org.apache.commons.compress.compressors.gzip;version="1.6.0",
 org.eclipse.core.runtime;version="3.5.0",
 org.eclipse.core.runtime.jobs,
 org.eclipse.e4.core.services.events,
 org.eclipse.equinox.app;version="1.1.0"
Bundle-RequiredExecutionEnvironment: JavaSE-1.8

How can I solve?

asked Apr 12, 2024 at 10:32
5
  • 2
    Require-Capability: osgi.ee; filter:="(&(osgi.ee=JavaSE)(version=17)) means you must use at least Java 17. Current Eclipse releases require a minimum of Java 17. Commented Apr 12, 2024 at 10:54
  • @greg-449 If I browse to com.mycompany.myapp > JRE System Library in Eclipse explorer, it says "JavaSE-1.8", which means I am using Java 8. Upgrading to Java 17 will fix, right? Commented Apr 12, 2024 at 11:54
  • You will also need to change the Run Configuration to use Java 17 (or later) Commented Apr 12, 2024 at 12:00
  • @greg-449 What about the other warnings such as: "Missing constraint Import Package"? Commented Apr 15, 2024 at 7:10
  • That means a plugin has asked to import a java package but the system cannot find any plugin that exports that package or it found the package but the version was not in the required range. So your target platform is probably missing things. Commented Apr 15, 2024 at 7:48

0

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.