maven Eclipse RCP导出-应用程序错误/FrameworkEvent错误

jfgube3f  于 2022-11-28  发布在  Maven
关注(0)|答案(1)|浏览(116)

我是Eclipse RCP的新手,一直在遵循Vogella教程之一。
教程链接:
https://www.vogella.com/tutorials/EclipseRCP/article.html#exercise-creating-an-eclipse-rcp-application
(看起来每个部分都是一个新的项目或一组项目。我关注了6。)
我使用Eclipse 2022-09进行RCP和RAP,然后按照教程进行操作。我遇到的问题是导出/部署的产品。当尝试启动程序时,我得到两个错误日志之一。一个日志包含应用程序错误,而另一个包含FrameworkEvent错误。这取决于我在导出过程中是否生成p2仓库。
我看过其他类似的帖子,我试着应用提供的解决方案,但他们似乎没有解决这个问题。我一直得到同样的错误。
选中p2:(我觉得其他日志太长,无法发布。)

!SESSION 2022-10-26 16:53:38.490 -----------------------------------------------
eclipse.buildId=unknown
java.version=17.0.4.1
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
Framework arguments:  -clearPersistedState
Command-line arguments:  -os win32 -ws win32 -arch x86_64 -clearPersistedState

!ENTRY org.eclipse.osgi 4 0 2022-10-26 16:53:39.729
!MESSAGE Application error
!STACK 1
java.lang.RuntimeException: Application "org.eclipse.e4.ui.workbench.swt.E4Application" could not be found in the registry. The applications available are: org.eclipse.equinox.app.error.
    at org.eclipse.equinox.internal.app.EclipseAppContainer.startDefaultApp(EclipseAppContainer.java:252)
    at org.eclipse.equinox.internal.app.MainApplicationLauncher.run(MainApplicationLauncher.java:33)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:136)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:402)
    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:77)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:568)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:659)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:596)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1467)
    at org.eclipse.equinox.launcher.Main.main(Main.java:1440)

(编辑)
未选中p2:(部分日志内容)

!SESSION 2022-10-26 16:56:02.009 -----------------------------------------------
eclipse.buildId=unknown
java.version=17.0.4.1
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
Framework arguments:  -clearPersistedState
Command-line arguments:  -os win32 -ws win32 -arch x86_64 -clearPersistedState

!ENTRY org.eclipse.e4.ui.css.swt 4 0 2022-10-26 16:56:03.958
!MESSAGE FrameworkEvent ERROR
!STACK 0
org.osgi.framework.BundleException: Could not resolve module: org.eclipse.e4.ui.css.swt [38]
  Unresolved requirement: Require-Bundle: org.eclipse.e4.ui.css.core; bundle-version="0.12.200"
    -> Bundle-SymbolicName: org.eclipse.e4.ui.css.core; bundle-version="0.13.300.v20220809-1237"; singleton:="true"
       org.eclipse.e4.ui.css.core [37]
         Unresolved requirement: Require-Bundle: org.apache.batik.css; bundle-version="[1.9.1,2.0.0)"
           -> Bundle-SymbolicName: org.apache.batik.css; bundle-version="1.14.0.v20210324-0332"
              org.apache.batik.css [9]
                Unresolved requirement: Import-Package: org.apache.batik.util; resolution:="optional"
                Unresolved requirement: Import-Package: org.apache.batik.util.io; resolution:="optional"
                Unresolved requirement: Import-Package: org.apache.xmlgraphics.java2d.color; version="2.2.0"
                  -> Export-Package: org.apache.xmlgraphics.java2d.color; bundle-symbolic-name="org.apache.xmlgraphics"; bundle-version="2.6.0.v20210409-0748"; version="2.6.0"
                     org.apache.xmlgraphics [18]
                       Unresolved requirement: Import-Package: org.apache.commons.io; version="1.3.1"

    at org.eclipse.osgi.container.Module.start(Module.java:463)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel$2.run(ModuleContainer.java:1852)
    at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor$1$1.execute(EquinoxContainerAdaptor.java:136)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1845)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1786)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1750)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1672)
    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.e4.ui.css.swt.theme 4 0 2022-10-26 16:56:03.966
!MESSAGE FrameworkEvent ERROR
!STACK 0
org.osgi.framework.BundleException: Could not resolve module: org.eclipse.e4.ui.css.swt.theme [39]
  Unresolved requirement: Require-Bundle: org.eclipse.e4.ui.css.core; bundle-version="0.12.200"
    -> Bundle-SymbolicName: org.eclipse.e4.ui.css.core; bundle-version="0.13.300.v20220809-1237"; singleton:="true"
       org.eclipse.e4.ui.css.core [37]
         Unresolved requirement: Require-Bundle: org.apache.batik.css; bundle-version="[1.9.1,2.0.0)"
           -> Bundle-SymbolicName: org.apache.batik.css; bundle-version="1.14.0.v20210324-0332"
              org.apache.batik.css [9]
                Unresolved requirement: Import-Package: org.apache.batik.util; resolution:="optional"
                Unresolved requirement: Import-Package: org.apache.batik.util.io; resolution:="optional"
                Unresolved requirement: Import-Package: org.apache.xmlgraphics.java2d.color; version="2.2.0"
                  -> Export-Package: org.apache.xmlgraphics.java2d.color; bundle-symbolic-name="org.apache.xmlgraphics"; bundle-version="2.6.0.v20210409-0748"; version="2.6.0"
                     org.apache.xmlgraphics [18]
                       Unresolved requirement: Import-Package: org.apache.commons.io; version="1.3.1"
  Unresolved requirement: Require-Bundle: org.eclipse.e4.ui.css.swt; bundle-version="0.13.100"
    -> Bundle-SymbolicName: org.eclipse.e4.ui.css.swt; bundle-version="0.14.600.v20220621-1327"; singleton:="true"
       org.eclipse.e4.ui.css.swt [38]
         Unresolved requirement: Require-Bundle: org.eclipse.e4.ui.css.core; bundle-version="0.12.200"
           -> Bundle-SymbolicName: org.eclipse.e4.ui.css.core; bundle-version="0.13.300.v20220809-1237"; singleton:="true"

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

dtcbnfnu1#

使用 neon 导出是可能的。我现在使用Neon 3。感谢@greg-449的支持通知。按照教程有点混乱,但通过尝试和错误来获得成功。由于Neon能够导出,已经不需要maven/tycho了。缺点是JavaSE-1.8和更低版本的限制(我不知道最低要求)。完成教程后,在产品的Overview选项卡中单击“Eclipse Product export wizard”,检查您的选项,然后单击Finish。这个GitHub是一个能够使用 neon 导出的项目示例。

相关问题