OSGI解析错误-缺少system.bundle

时间:2018-07-03 11:33:53

标签: osgi

我突然收到以下奇怪的解决方法错误:

[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框架)...奇怪的是,此错误今天才弹出。我没有为这个项目工作一个星期。但是最后一次提交没有问题。如果我恢复到该程序的较早版本,则问题仍然存在...

我们正在使用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"

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

是什么原因导致这种分辨率错误?

更新: 我们正在使用https://bndtools.ci.cloudbees.com存储库中bndtools 4.x的最新开发快照。可以吗?

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

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问题不是真正的问题。我扔掉了所有与FX相关的东西,最后出现一个错误,说“没有将OSGi框架添加到运行路径”?!

enter image description here

1 个答案:

答案 0 :(得分:0)

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

上面的felix门票已经开放了一年多,并且似乎还没有根本原因。

对于遇到同样障碍的人们:我们最终改用日蚀。