首页 > 解决方案 > OSGI Bundles 引用未解析

问题描述

我的团队正在维护一个基于 Eclipse 3.8.2 和 Java 1.7 的软件。由于我们正在尝试添加需要 Java 1.8 的功能,因此我的任务是将整个环境升级到 Java 1.8,并在此过程中升级到更新版本的 Eclipse。所以我所做的是复制工作区,在 Eclipse 4.9.0 中打开它并解决 Eclipse 向我抛出的所有错误。除其他外,我们正在使用 OSGi,我在新环境中启动我们的应用程序时遇到了麻烦。老实说,我对 OSGi 并没有真正的经验。我已经尝试搜索我遇到的错误,但我没有找到关于这个问题的很多有用材料。

无论如何,当我启动应用程序时,我从 OSGi 得到一堆错误,因为捆绑包引用没有解决。我不确定哪个清单需要这些捆绑包,以及我必须如何包含这些捆绑包。我已经三重检查了,运行配置是否包含所有插件,该软件的旧版本和工作版本都有,所以似乎不是这样。

我得到的痕迹是:

!SESSION 2019-03-12 11:13:16.942 -----------------------------------------------
eclipse.buildId=M20120208-0800
java.version=1.8.0_202
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=de_AT
Framework arguments:  -product at.jku.mevss.product.server
Command-line arguments:  -product at.jku.mevss.product.server -data D:\Eclipse Workspace for Java 8/../RCPClients/MCC -dev file:D:/Eclipse Workspace for Java 8/.metadata/.plugins/org.eclipse.pde.core/(S1) - Monitoring Server Console + Services/dev.properties -os win32 -ws win32 -arch x86 -consoleLog

!ENTRY org.eclipse.osgi 2 0 2019-03-12 11:13:17.682
!MESSAGE One or more bundles are not resolved because the following root constraints are not resolved:
!SUBENTRY 1 org.eclipse.osgi 2 0 2019-03-12 11:13:17.682
!MESSAGE Bundle reference:file:/D:/Eclipse Workspace for Java 8/at.jku.ase.ulm/ was not resolved.
!SUBENTRY 2 at.jku.ase.ulm 2 0 2019-03-12 11:13:17.682
!MESSAGE Missing required capability Require-Capability: osgi.ee; filter="(&(osgi.ee=JavaSE)(version=1.8))".
!SUBENTRY 1 org.eclipse.osgi 2 0 2019-03-12 11:13:17.682
!MESSAGE Bundle reference:file:/D:/Eclipse Workspace for Java 8/at.jku.mevss.lib/ was not resolved.
!SUBENTRY 2 at.jku.mevss.lib 2 0 2019-03-12 11:13:17.682
!MESSAGE Missing required capability Require-Capability: osgi.ee; filter="(&(osgi.ee=JavaSE)(version=1.8))".
!SUBENTRY 1 org.eclipse.osgi 2 0 2019-03-12 11:13:17.682
!MESSAGE Bundle reference:file:/D:/Eclipse Workspace for Java 8/at.jku.mevss.product/ was not resolved.
!SUBENTRY 2 at.jku.mevss.product 2 0 2019-03-12 11:13:17.682
!MESSAGE Missing required capability Require-Capability: osgi.ee; filter="(|(&(osgi.ee=JavaSE)(version=1.8))(&(osgi.ee=JavaSE)(version=1.7)))".
!SUBENTRY 1 org.eclipse.osgi 2 0 2019-03-12 11:13:17.682
!MESSAGE Bundle reference:file:/D:/Eclipse Workspace for Java 8/at.jku.mevss.eventdistributor.ui/ was not resolved.
!SUBENTRY 2 at.jku.mevss.eventdistributor.ui 2 0 2019-03-12 11:13:17.682
!MESSAGE Missing required capability Require-Capability: osgi.ee; filter="(&(osgi.ee=JavaSE)(version=1.8))".
!SUBENTRY 1 org.eclipse.osgi 2 0 2019-03-12 11:13:17.682
!MESSAGE Bundle reference:file:/D:/Eclipse Workspace for Java 8/at.jku.mevss.eventdistributor.processor.core/ was not resolved.
!SUBENTRY 2 at.jku.mevss.eventdistributor.processor.core 2 0 2019-03-12 11:13:17.682
!MESSAGE Missing required capability Require-Capability: osgi.ee; filter="(|(&(osgi.ee=JavaSE)(version=1.8))(&(osgi.ee=JavaSE)(version=1.7)))".
!SUBENTRY 1 org.eclipse.osgi 2 0 2019-03-12 11:13:17.682
!MESSAGE Bundle reference:file:/D:/Eclipse Workspace for Java 8/at.jku.mevss.eventdistributor.server.impls/ was not resolved.
!SUBENTRY 2 at.jku.mevss.eventdistributor.server.impls 2 0 2019-03-12 11:13:17.682
!MESSAGE Missing required capability Require-Capability: osgi.ee; filter="(|(&(osgi.ee=JavaSE)(version=1.8))(&(osgi.ee=JavaSE)(version=1.7)))".
!SUBENTRY 1 org.eclipse.osgi 2 0 2019-03-12 11:13:17.682
!MESSAGE Bundle reference:file:/D:/Eclipse Workspace for Java 8/at.jku.mevss.checking.service.core/ was not resolved.
!SUBENTRY 2 at.jku.mevss.checking.service.core 2 0 2019-03-12 11:13:17.682
!MESSAGE Missing required capability Require-Capability: osgi.ee; filter="(&(osgi.ee=JavaSE)(version=1.8))".
!SUBENTRY 1 org.eclipse.osgi 2 0 2019-03-12 11:13:17.682
!MESSAGE Bundle reference:file:/D:/Eclipse Workspace for Java 8/at.jku.mevss.eventpublisher.core/ was not resolved.
!SUBENTRY 2 at.jku.mevss.eventpublisher.core 2 0 2019-03-12 11:13:17.682
!MESSAGE Missing required capability Require-Capability: osgi.ee; filter="(&(osgi.ee=JavaSE)(version=1.8))".
!SUBENTRY 1 org.eclipse.osgi 2 0 2019-03-12 11:13:17.682
!MESSAGE Bundle reference:file:/D:/Eclipse Workspace for Java 8/at.jku.mevss.eventdistributor.server/ was not resolved.
!SUBENTRY 2 at.jku.mevss.eventdistributor.server 2 0 2019-03-12 11:13:17.682
!MESSAGE Missing required capability Require-Capability: osgi.ee; filter="(&(osgi.ee=JavaSE)(version=1.8))".
.
.
.
!SUBENTRY 2 at.jku.mevss.checking.lib 2 0 2019-03-12 11:13:17.714
!MESSAGE Missing required bundle at.jku.mevss.eventdistributor.core_0.1.0.
!SUBENTRY 2 at.jku.mevss.checking.lib 2 0 2019-03-12 11:13:17.714
!MESSAGE Missing required bundle at.jku.mevss.checking.service.core_0.1.0.
!SUBENTRY 2 at.jku.mevss.checking.lib 2 0 2019-03-12 11:13:17.714
!MESSAGE Missing required capability Require-Capability: osgi.ee; filter="(|(&(osgi.ee=JavaSE)(version=1.8))(&(osgi.ee=JavaSE)(version=1.7)))".

!ENTRY org.eclipse.osgi 4 0 2019-03-12 11:13:17.729
!MESSAGE Application error
!STACK 1
java.lang.RuntimeException: Application "at.jku.mevss.server" could not be found in the registry. The applications available are: org.eclipse.ant.core.antRunner, org.eclipse.equinox.app.error.
    at org.eclipse.equinox.internal.app.EclipseAppContainer.startDefaultApp(EclipseAppContainer.java:248)
    at org.eclipse.equinox.internal.app.MainApplicationLauncher.run(MainApplicationLauncher.java:29)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:353)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1438)
    at org.eclipse.equinox.launcher.Main.main(Main.java:1414)
An error has occurred. See the log file
D:\Eclipse Workspace for Java 8\.metadata\.plugins\org.eclipse.pde.core\(S1) - Monitoring Server Console + Services\1552385597136.log.

我删除了一堆行,因为它占用了太多空间。迁移到新的 Eclipse 时我犯了错误吗?我忘记修改一些清单文件了吗?新的 Java/Eclipse 版本是否需要更改一些设置?

提前致谢!

标签: java-8migrationosgiupgradeosgi-bundle

解决方案


推荐阅读