Не удалось разрешить модуль / неразрешенное требование org.eclipse.core.runtime - PullRequest
0 голосов
/ 14 июля 2020

Я обновил целевую платформу eclipse до версии eclipse 2020_06 / JDK 11 (старая версия: Oxygen 4.7. И JDK 8). 'org.eclipse.core.runtime' добавляется как зависимость плагина в MANIFEST.MF ch.myorg.myapp.ide.app. Если я запускаю приложение RCP из среды IDE, я получаю следующую ошибку. В чем может быть проблема? Где отсутствует org.eclipse.core.runtime?

java.version=11.0.7
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
Framework arguments:  -product ch.myorg.myapp.ide.app.product
Command-line arguments:  -product ch.myorg.myapp.ide.app.product -data C:\projects\workspaces\myappWorkspace -dev file:C:/Projects/Workspaces/Eclipse2020-06-workspace_2/.metadata/.plugins/org.eclipse.pde.core/myorg-ide.product/dev.properties -os win32 -ws win32 -arch x86_64 -consoleLog

!ENTRY ch.myorg.myapp.ide.app 2 0
!MESSAGE Could not resolve module: ch.myorg.myapp.ide.app [1]
  Unresolved requirement: Import-Package: ch.myorg.common.util.logging; resolution:="optional"
  Unresolved requirement: Import-Package: ch.myorg.common.util.logging.V2; resolution:="optional"
  Unresolved requirement: Require-Bundle: org.eclipse.core.runtime; bundle-version="3.18.0"


!ENTRY org.eclipse.osgi 4 0 
!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:81)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:401)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:657)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:594)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1447)
    at org.eclipse.equinox.launcher.Main.main(Main.java:1420)
An error has occurred. See the log file

config.ini:

#Product Runtime Configuration File

osgi.splashPath=platform:/base/plugins/ch.myorg.myapp.ide.app
eclipse.product=ch.myorg.myapp.ide.app.product
osgi.bundles=org.eclipse.equinox.common@2:start,org.eclipse.update.configurator@3:start,org.eclipse.core.runtime@start,org.eclipse.equinox.ds@start
osgi.bundles.defaultStartLevel=4
org.eclipse.ui.workbench/SHOW_BUILDID_ON_STARTUP=true
usage_reporting_enabled=false
# Tell the BundleLoader to search the classes in the following packages in the system classloader first (before searching the bundles). 
org.osgi.framework.bootdelegation=com.sun.*,sun.*
# osgi.hook.configurators=ch.myorg.myapp.ide.app.hooks.myappDevelopmentHookConfigurator
osgi.framework.extensions=ch.myorg.myapp.ide.app

Заранее спасибо за ваш ответ

1 Ответ

0 голосов
/ 15 июля 2020

Я попытался раскомментировать osgi.framework.extensions и изменил начальный уровень org.eclipse.core.runtime в config.ini следующим образом:

#Product Runtime Configuration File

osgi.splashPath=platform:/base/plugins/ch.myorg.myapp.ide.app
eclipse.product=ch.myorg.myapp.ide.app.product
# osgi.bundles=org.eclipse.equinox.common@2:start,org.eclipse.update.configurator@3:start,org.eclipse.core.runtime@start,org.eclipse.equinox.ds@start
osgi.bundles=org.eclipse.equinox.common@2:start,org.eclipse.update.configurator@3:start,org.eclipse.core.runtime@4:start
osgi.bundles.defaultStartLevel=4
org.eclipse.ui.workbench/SHOW_BUILDID_ON_STARTUP=true
usage_reporting_enabled=false
# Tell the BundleLoader to search the classes in the following packages in the system classloader first (before searching the bundles). 
org.osgi.framework.bootdelegation=com.sun.*,sun.*
# osgi.hook.configurators=ch.myorg.myapp.ide.app.hooks.myappDevelopmentHookConfigurator
# osgi.framework.extensions=ch.myorg.myapp.ide.app

Теперь я получаю следующую ошибку:

!ENTRY org.eclipse.core.runtime 4 0 2020-07-15 14:27:11.405
!MESSAGE FrameworkEvent ERROR
!STACK 0
org.osgi.framework.BundleException: Could not resolve module: org.eclipse.core.runtime [3]
  Unresolved requirement: Require-Bundle: org.eclipse.core.jobs; bundle-version="[3.10.0,4.0.0)"; visibility:="reexport"

    at org.eclipse.osgi.container.Module.start(Module.java:463)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel$2.run(ModuleContainer.java:1845)
    at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor$1$1.execute(EquinoxContainerAdaptor.java:136)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1838)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1781)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1743)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1665)
    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)

!ENTRY org.eclipse.osgi 4 0 2020-07-15 14:27:11.409
!MESSAGE Bundle initial@reference:file:plugins/org.eclipse.core.runtime_3.18.0.v20200506-2143.jar was not resolved.

!ENTRY org.eclipse.core.runtime 2 0 2020-07-15 14:27:11.414
!MESSAGE Could not resolve module: org.eclipse.core.runtime [3]
  Unresolved requirement: Require-Bundle: org.eclipse.core.jobs; bundle-version="[3.10.0,4.0.0)"; visibility:="reexport"


!ENTRY org.eclipse.osgi 4 0 2020-07-15 14:27:11.436
!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:81)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:401)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:657)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:594)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1447)
    at org.eclipse.equinox.launcher.Main.main(Main.java:1420)
...