我有一个独立的quinox容器正在运行,我安装并启动了以下这些软件包:

enter image description here

我可以在控制台中看到这些日志消息:

  • org.ops4j.pax.logging.pax-logging-api [org.apache.aries.blueprint.container.BlueprintExtender]: Starting blueprint extender...

org.ops4j.pax.logging.pax-logging-api [org.apache.aries.blueprint.container.BlueprintEventDispatcher]:EventAdmin包不可用,只是不要使用它

org.ops4j.pax.logging.pax-logging-api [org.apache.aries.blueprint.container.BlueprintExtender]:没有静默支持,因此蓝图组件不会参与静默操作

或者.g4-rax.log .

com.test.osgi.blueprint-service-api_1.0.0.1 bundle有我的服务接口 . com.test.osgi.blueprint-service-impl_1.0.0.1 bundle有我的服务实现 .

我的com.test.osgi.blueprint-service-impl_1.0.0.1包的META-INF标头是:

Bundle headers:Bnd-LastModified = 1460382580049 Build-Jdk = 1.8.0_74 Built-By = schinnadurai Bundle-Activator = com.test.osgi.blueprint.service.impl.BluePrintServiceImplBundleActivator Bundle-Blueprint = OSGI-INF / blueprint.xml Bundle -ManifestVersion = 2 Bundle-Name = blueprint-service-impl Bundle-SymbolicName = com.test.osgi.blueprint-service-impl Bundle-Version = 1.0.0.1 Created-By = Apache Maven Bundle Plugin Embed-Dependency = *; scope = compile | runtime Embed-Transitive = true Export-Service = com.test.osgi.blueprint.service.api.GreetingService import-Package = org.osgi.framework; version =“[1.5,2)”,com.test . osgi.blueprint.service.api; version =“[1.0,2)”Manifest-Version = 1.0 Tool = Bnd-2.1.0.20130426-122213

此服务impl包中的blueprint.xml文件是:

<?xml version="1.0" encoding="UTF-8"?>
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0">
   
  <bean id="bluePrintServiceImpl" activation="eager"
    class="com.test.osgi.blueprint.service.impl.ServiceImpl"/>
    
  <service id="myGreetingService" ref="bluePrintServiceImpl" activation="eager"
    interface="com.test.osgi.blueprint.service.api.GreetingService"/>
   
</blueprint>

当我启动服务impl包时,没有注册服务 . 请看下面:

Id = 158,Status = ACTIVE Data Root = C:\ tools \ org.eclipse.osgi_3.6.1.R36x_v20100806 \ configuration \ org.eclipse.osgi \ bundles \ 158 \ data没有注册的服务 . 没有使用的服务 . 没有导出的包导入的包org.osgi.framework; version =“1.5.0”com.test.osgi.blueprint.service.api; version =“1.0.0.1”No fragment bundle命名类空间com.test.osgi.blueprint-service-impl; bundle-version =“1.0.0.1”[提供]没有必需的包

我安装了一个使用此服务的服务客户端 . 但它无法找到注册服务 . 我在这里遗漏了什么 . 我是否错过了任何所需的蓝图扩展程序包?

提前致谢 .

更新:

我已经在 WAS Liberty 中测试了我的捆绑包,并且我的所有蓝图服务都已注册并被引用 successfully . 所以在这个独立的equinox设置中,我似乎缺少一些蓝图服务所需的捆绑包