如何在 java 11 中解决 org.eclipse.emf.ecp.cdo.provider

How to resolve org.eclipse.emf.ecp.cdo.provider in java 11

提问人:user21415561 提问时间:8/1/2023 最后编辑:user21415561 更新时间:8/1/2023 访问量:18

问:

我使用的是 Apple 芯片。

当我在 Eclipse 中使用 Java 11 构建并运行插件时,发生以下错误。

java.lang.Error: Unable to resolve org.eclipse.emf.ecp.cdo.provider
    at org.eclipse.emf.ecp.internal.core.util.ElementDescriptor.getResolvedElement(ElementDescriptor.java:113)
    at org.eclipse.emf.ecp.core.util.ECPUtil.getResolvedElement(ECPUtil.java:125)
    at org.eclipse.emf.ecp.internal.core.ECPProjectManagerImpl.getInternalProject(ECPProjectManagerImpl.java:167)
    at org.eclipse.emf.ecp.internal.core.ECPProjectManagerImpl.getProject(ECPProjectManagerImpl.java:158)
    at org.eclipse.emf.ecp.internal.core.ECPProjectManagerImpl.getProject(ECPProjectManagerImpl.java:1)
    at org.eclipse.emf.ecp.validation.connector.ValidationFailedDecorator.decorate(ValidationFailedDecorator.java:44)
    at org.eclipse.ui.internal.decorators.LightweightDecoratorDefinition.decorate(LightweightDecoratorDefinition.java:267)
    at org.eclipse.ui.internal.decorators.LightweightDecoratorManager$LightweightRunnable.run(LightweightDecoratorManager.java:83)
    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
    at org.eclipse.ui.internal.decorators.LightweightDecoratorManager.decorate(LightweightDecoratorManager.java:367)
    at org.eclipse.ui.internal.decorators.LightweightDecoratorManager.getDecorations(LightweightDecoratorManager.java:349)
    at org.eclipse.ui.internal.decorators.DecorationScheduler$1.ensureResultCached(DecorationScheduler.java:372)
    at org.eclipse.ui.internal.decorators.DecorationScheduler$1.run(DecorationScheduler.java:332)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Caused by: org.eclipse.core.runtime.CoreException: Plug-in org.eclipse.emf.ecp.cdo.core was unable to load class org.eclipse.emf.ecp.cdo.internal.core.CDOProvider.
    at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.throwException(RegistryStrategyOSGI.java:194)
    at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:176)
    at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:905)
    at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243)
    at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:55)
    at org.eclipse.emf.ecp.internal.core.util.ExtensionParser$ExtensionDescriptor.resolve(ExtensionParser.java:178)
    at org.eclipse.emf.ecp.internal.core.util.ExtensionParser$ExtensionDescriptor.resolve(ExtensionParser.java:1)
    at org.eclipse.emf.ecp.internal.core.util.ElementDescriptor.getResolvedElement(ElementDescriptor.java:99)
    ... 13 more
Caused by: java.lang.ClassNotFoundException: An error occurred while automatically activating bundle org.eclipse.emf.ecp.cdo.core (410).
    at org.eclipse.osgi.internal.hooks.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:116)
    at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClass(ClasspathManager.java:531)
    at org.eclipse.osgi.internal.loader.ModuleClassLoader.findLocalClass(ModuleClassLoader.java:324)
    at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:327)
    at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:402)
    at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:352)
    at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:344)
    at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:160)
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:1074)
    at org.eclipse.osgi.internal.framework.EquinoxBundle.loadClass(EquinoxBundle.java:573)
    at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:174)
    ... 19 more
Caused by: org.osgi.framework.BundleException: Exception in org.eclipse.emf.ecp.cdo.internal.core.Activator.start() of bundle org.eclipse.emf.ecp.cdo.core.
    at org.eclipse.osgi.internal.framework.BundleContextImpl.startActivator(BundleContextImpl.java:792)
    at org.eclipse.osgi.internal.framework.BundleContextImpl.start(BundleContextImpl.java:721)
    at org.eclipse.osgi.internal.framework.EquinoxBundle.startWorker0(EquinoxBundle.java:941)
    at org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.startWorker(EquinoxBundle.java:318)
    at org.eclipse.osgi.container.Module.doStart(Module.java:571)
    at org.eclipse.osgi.container.Module.start(Module.java:439)
    at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:454)
    at org.eclipse.osgi.internal.hooks.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:107)
    ... 29 more
Caused by: java.lang.NoClassDefFoundError: java.sql.SQLException
    at org.eclipse.emf.cdo.server.internal.db.DBBrowserPage$Factory.create(DBBrowserPage.java:205)
    at org.eclipse.emf.cdo.server.internal.db.DBBrowserPage$Factory.create(DBBrowserPage.java:1)
    at org.eclipse.net4j.util.container.ManagedContainer.createElement(ManagedContainer.java:573)
    at org.eclipse.net4j.util.container.ManagedContainer.getElement(ManagedContainer.java:320)
    at org.eclipse.net4j.util.container.ManagedContainer.getElement(ManagedContainer.java:301)
    at org.eclipse.emf.cdo.server.CDOServerBrowser.initPages(CDOServerBrowser.java:378)
    at org.eclipse.emf.cdo.server.CDOServerBrowser.doActivate(CDOServerBrowser.java:399)
    at org.eclipse.net4j.util.lifecycle.Lifecycle.internalActivate(Lifecycle.java:76)
    at org.eclipse.net4j.util.lifecycle.Lifecycle.activate(Lifecycle.java:162)
    at org.eclipse.emf.ecp.cdo.internal.core.Activator.start(Activator.java:103)
    at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:771)
    at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:1)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:747)
    at org.eclipse.osgi.internal.framework.BundleContextImpl.startActivator(BundleContextImpl.java:764)
    ... 36 more
Caused by: java.lang.ClassNotFoundException
    at java.base/java.lang.ClassLoader.findClass(ClassLoader.java:616)
    at java.base/java.lang.ClassLoader.loadClassHelper(ClassLoader.java:1176)
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:1091)
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:1074)
    at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:351)
    at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:344)
    at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:160)
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:1074)
    ... 50 more

使用 Java 8 而不是 Java 11 运行时,不会发生上述错误,但运行插件所需的时间要长几倍(大约 1 分 30 秒)。 (使用 Java 11 大约需要 15 秒)

由于需要很长时间的原因,我认为 Jetta 2 将 JRE 更改为 Apple Silicon 需要很长时间。

您不能每次运行插件时等待 1 分 30 秒。

Java 17 也是如此。

请告知该怎么做。

Eclipse Java-11 noclassdeffounderror 苹果硅 eclipse-emf

评论


答: 暂无答案