OSGI 解析错误 - 缺失 system.bundle

OSGI resolution error - missing system.bundle

我突然收到以下奇怪的解析错误:

[ERROR] Resolution failed. Capabilities satisfying the following requirements could not be found:
[<<INITIAL>>]
  ? osgi.identity: (osgi.identity=javafx-osgi)
      ? [javafx-osgi version=8.0.2]
          ? osgi.wiring.host: (osgi.wiring.host=system.bundle)

似乎找不到系统包(Apache Felix 框架)...奇怪的是,今天才弹出这个错误。我已经一个星期没有参与这个项目了。但是最后一次commit 运行 没有问题。如果我恢复到程序的早期版本,问题仍然存在...

我们正在使用 Java 1.8.0 161-b12; BND 工具 4.0.0 和 Apache Felix Framework 1.8。

我们的 app.bndrun 看起来像这样:

index: target/index.xml

-standalone: ${index}

-runrequires: osgi.identity;filter:='(osgi.identity=org.ops4j.pax.logging.pax-logging-service)', \
              osgi.identity;filter:='(osgi.identity=javafx-osgi)', \
              osgi.identity;filter:='(osgi.identity=com.foo.bar.command)',\
              osgi.identity;filter:='(osgi.identity=com.foo.bar.testservice)', \
              osgi.identity;filter:='(osgi.identity=com.foo.bar.main-screen)', \
              osgi.identity;filter:='(osgi.identity=com.foo.bar.verify-screen)', \
              osgi.identity;filter:='(osgi.identity=com.foo.bar.testclient)'

-runfw: org.apache.felix.framework;version='5.6.8'
-runee: JavaSE-1.8
-runbundles: \
    com.foo.bar.testservice;version='[0.0.1,0.0.2)',\
    org.apache.felix.scr;version='[2.1.0,2.1.1)',\
    org.osgi.service.log;version='[1.4.0,1.4.1)',\
    org.osgi.util.function;version='[1.1.0,1.1.1)',\
    org.osgi.util.promise;version='[1.1.0,1.1.1)',\
    org.osgi.util.pushstream;version='[1.0.0,1.0.1)',\
    com.foo.bar.testclient;version='[0.0.1,0.0.2)',\
    org.ops4j.pax.logging.pax-logging-api;version='[1.10.1,1.10.2)',\
    org.ops4j.pax.logging.pax-logging-service;version='[1.10.1,1.10.2)',\
    javafx-osgi;version='[8.0.2,8.0.3)',\
    com.foo.bar.launcher;version='[0.0.1,0.0.2)',\
    com.foo.bar.main-screen;version='[0.0.1,0.0.2)',\
    com.foo.bar.ui-main;version='[0.0.1,0.0.2)',\
    com.foo.bar.verify-screen;version='[0.0.1,0.0.2)',\
    org.apache.felix.configadmin;version='[1.9.2,1.9.3)',\
    com.foo.bar.launcher;version='[0.0.1,0.0.2)',\
    com.foo.bar.command;version='[0.0.1,0.0.2)'
-runproperties: felix.cm.dir="${user.home}\Documents\Prog731\config"

这是一个小的demo程序,依赖很少。据我所知,我们的代码和任何外部依赖项都没有改变。但是这个问题在不同的开发机器上是可以重现的...

什么会导致这样的解析错误?

更新: 我们正在使用来自 https://bndtools.ci.cloudbees.com 存储库的 bndtools 4.x 的最新开发快照。可能是这个?

更新#2: 根据要求,javafx-osgi-8.0.2.jar:

的 MANIFEST
Manifest-Version: 1.0
Export-Package: com.sun.javafx, com.sun.glass.ui, com.sun.javafx.anima
 tion, com.sun.javafx.applet, com.sun.javafx.application, com.sun.java
 fx.beans, com.sun.javafx.beans.event, com.sun.javafx.binding, com.sun
 .javafx.charts, com.sun.javafx.collections, com.sun.javafx.css, com.s
 un.javafx.css.converters, com.sun.javafx.css.parser, com.sun.javafx.c
 ursor, com.sun.javafx.effect, com.sun.javafx.embed, com.sun.javafx.ev
 ent, com.sun.javafx.font, com.sun.javafx.font.coretext, com.sun.javaf
 x.font.directwrite, com.sun.javafx.font.freetype, com.sun.javafx.font
 .t2k, com.sun.javafx.fxml, com.sun.javafx.fxml.builder, com.sun.javaf
 x.fxml.expression, com.sun.javafx.geom, com.sun.javafx.geom.transform
 , com.sun.javafx.geometry, com.sun.javafx.iio, com.sun.javafx.iio.bmp
 , com.sun.javafx.iio.common, com.sun.javafx.iio.gif, com.sun.javafx.i
 io.ios, com.sun.javafx.iio.jpeg, com.sun.javafx.iio.png, com.sun.java
 fx.image, com.sun.javafx.image.impl, com.sun.javafx.jmx, com.sun.java
 fx.logging, com.sun.javafx.media, com.sun.javafx.menu, com.sun.javafx
 .perf, com.sun.javafx.print, com.sun.javafx.property, com.sun.javafx.
 property.adapter, com.sun.javafx.robot, com.sun.javafx.robot.impl, co
 m.sun.javafx.runtime, com.sun.javafx.runtime.async, com.sun.javafx.ru
 ntime.eula, com.sun.javafx.scene, com.sun.javafx.scene.control, com.s
 un.javafx.scene.control.behavior, com.sun.javafx.scene.control.skin, 
 com.sun.javafx.scene.control.skin.caspian, com.sun.javafx.scene.contr
 ol.skin.caspian.images, com.sun.javafx.scene.control.skin.modena, com
 .sun.javafx.scene.control.skin.resources, com.sun.javafx.scene.input,
  com.sun.javafx.scene.layout, com.sun.javafx.scene.layout.region, com
 .sun.javafx.scene.paint, com.sun.javafx.scene.shape, com.sun.javafx.s
 cene.text, com.sun.javafx.scene.transform, com.sun.javafx.scene.trave
 rsal, com.sun.javafx.scene.web, com.sun.javafx.scene.web.behavior, co
 m.sun.javafx.scene.web.skin, com.sun.javafx.sg, com.sun.javafx.sg.pri
 sm, com.sun.javafx.sg.prism.web, com.sun.javafx.stage, com.sun.javafx
 .text, com.sun.javafx.tk, com.sun.javafx.tk.quantum, com.sun.javafx.u
 til, com.sun.javafx.webkit, com.sun.javafx.webkit.drt, com.sun.javafx
 .webkit.prism, com.sun.javafx.webkit.prism.resources, com.sun.javafx.
 webkit.prism.theme, com.sun.javafx.webkit.theme, javafx, javafx.anima
 tion, javafx.application, javafx.beans, javafx.beans.binding, javafx.
 beans.property, javafx.beans.property.adapter, javafx.beans.value, ja
 vafx.collections, javafx.collections.transformation, javafx.concurren
 t, javafx.css, javafx.embed, javafx.embed.swing, javafx.event, javafx
 .fxml, javafx.geometry, javafx.print, javafx.scene, javafx.scene.canv
 as, javafx.scene.chart, javafx.scene.control, javafx.scene.control.ce
 ll, javafx.scene.effect, javafx.scene.image, javafx.scene.input, java
 fx.scene.layout, javafx.scene.media, javafx.scene.paint, javafx.scene
 .shape, javafx.scene.text, javafx.scene.transform, javafx.scene.web, 
 javafx.stage, javafx.util, javafx.util.converter, com.sun.deploy.uito
 olkit.impl.fx
Fragment-Host: system.bundle; extension:=framework
Bundle-ManifestVersion: 2
Bundle-Name: JavaFX 8 OSGi extension bundle
Bundle-License: The Apache License, Version 2.0
Bundle-SymbolicName: javafx-osgi
Bundle-Version: 8.0.2

更新#3: 我认为 javafx-osgi 问题不是真正的问题。我扔掉了所有与外汇相关的东西,结果出现了一个错误 "No OSGi framework has been added to the run path"?!

这似乎是 felix 解析器中的错误:

上面的 felix ticket 已经开放一年多了,似乎还没有完全理解根本原因是什么。

对于那些遇到同样障碍的人:我们最终切换到 eclipse equinox。