- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我有一个不满意的 OSGI 组件,它似乎告诉我它是满意的......
如果我输入ls
,结果如下:
26 Active org.eclipse.kura.watchdog.WatchdogService org.eclipse.kura.linux.watchdog(bid=63)
82 Active com.company.product.dependencybucketimpl.DependencyBucketImpl com.company.product.dependencybucketimpl(bid=122)
83 Unsatisfied com.company.product.statemachineXXXXimpl.StateMachineXXXXImpl com.company.product.statemachineXXXXimpl(bid=123)
还有其他几个 bundle ,但这些是相关的。
当我尝试具体查看Unsatisfied
bundle 时,似乎引用的两个 bundle 已成功激活。
osgi> ls -c 123
Components in bundle com.company.product.statemachineXXXXimpl:
ID Component details
83 Component[
name = com.company.product.statemachineXXXXimpl.StateMachineXXXXImpl
activate = activate
deactivate = deactivate
modified = modified
configuration-policy = optional
factory = null
autoenable = true
immediate = true
implementation = com.company.product.statemachineXXXXimpl.StateMachineXXXXImpl
state = Unsatisfied
properties = {service.pid=com.company.product.statemachineXXXXimpl.StateMachineXXXXImpl}
serviceFactory = false
serviceInterface = [com.company.product.common.PayloadReadyNotifier, com.company.product.common.StateMachineXXXX]
references = {
Reference[name = WatchdogService, interface = org.eclipse.kura.watchdog.WatchdogService, policy = static, cardinality = 1..1, target = null, bind = setWatchdogService, unbind = unsetWatchdogService]
Reference[name = DependencyBucket, interface = com.company.product.common.DependencyBucket, policy = static, cardinality = 1..1, target = null, bind = setDependencyBucket, unbind = unsetDependencyBucket]
}
located in bundle = com.company.product.statemachineXXXXimpl_1.0.0.dev [123]
]
Dynamic information :
The component is satisfied
All component references are satisfied
Component configurations :
Configuration properties:
logStateMachineTransitions = true
objectClass = String[com.company.product.common.PayloadReadyNotifier,com.company.product.common.StateMachineXXXX]
kura.service.pid = com.company.product.statemachineXXXXimpl.StateMachineXXXXImpl
service.pid = com.company.product.statemachineXXXXimpl.StateMachineXXXXImpl
systemIdleTimeout = 600
ChargerDischargeTimeout = 300
component.name = com.company.product.statemachineXXXXimpl.StateMachineXXXXImpl
component.id = 178
Instances:
以下是相关 bundle 定义中的 .xml:
<?xml version="1.0" encoding="UTF-8"?>
<component xmlns="http://www.osgi.org/xmlns/scr/v1.1.0"
name="com.company.product.statemachineXXXXimpl.StateMachineXXXXImpl"
activate="activate"
configuration-policy="optional"
deactivate="deactivate"
enabled="true"
immediate="true"
modified="modified">
<implementation class="com.company.product.statemachineXXXXimpl.StateMachineXXXXImpl"/>
<property name="service.pid"
type="String"
value="com.company.product.statemachineXXXXimpl.StateMachineXXXXImpl"/>
<reference name="WatchdogService"
bind="setWatchdogService"
unbind="unsetWatchdogService"
interface="org.eclipse.kura.watchdog.WatchdogService"
cardinality="1..1"
policy="static"/>
<reference name="DependencyBucket"
bind="setDependencyBucket"
unbind="unsetDependencyBucket"
interface="com.company.product.common.DependencyBucket"
cardinality="1..1"
policy="static"/>
<service>
<provide interface="com.company.product.common.PayloadReadyNotifier"/>
<provide interface="com.company.product.common.StateMachineXXXX"/>
<!--<provide interface="com.company.product.common.ComponentStatusProvider"/>-->
</service>
</component>
在其他成功激活的 bundle 中,“实例:”下列出了一个对象,但这里不是这种情况。
我很困惑为什么如果“组件满足”和“所有组件引用都满足”,为什么 ls 命令显示组件“不满意”。想知道我该如何解决这个问题!任何帮助将不胜感激!
编辑:查看/var/log/kura-console.log 并看到以下内容:
ENTRY org.eclipse.equinox.metatype 4 0 2018-05-02 21:03:45.009
!MESSAGE DataParser.finished() Missing element AD (Reference ID = com.company.product.dependencybucketimpl.DependencyBucketImpl.
!ENTRY org.eclipse.equinox.metatype 4 0 2018-05-02 21:03:45.018
!MESSAGE DataParser.finished() Object Class Definition ID not found com.company.product.dependencybucketimpl.DependencyBucketImpl.
!ENTRY com.company.product.dependencybucketimpl 4 0 2018-05-02 21:03:47.230
!MESSAGE FrameworkEvent ERROR
!STACK 0
org.osgi.framework.ServiceException: org.eclipse.equinox.internal.ds.ServiceReg.getService() returned a service object that is not an instance of the service class com.company.product.common.PayloadReadyNotifier
at org.eclipse.osgi.internal.serviceregistry.ServiceUse.getService(ServiceUse.java:174)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.getService(ServiceRegistrationImpl.java:468)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.getService(ServiceRegistry.java:467)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.getService(BundleContextImpl.java:594)
at org.eclipse.equinox.internal.ds.InstanceProcess.getService(InstanceProcess.java:730)
at org.eclipse.equinox.internal.ds.model.ComponentReference.bind(ComponentReference.java:347)
at org.eclipse.equinox.internal.ds.model.ServiceComponentProp.bindReference(ServiceComponentProp.java:446)
at org.eclipse.equinox.internal.ds.InstanceProcess.dynamicBind(InstanceProcess.java:416)
at org.eclipse.equinox.internal.ds.Resolver.getEligible(Resolver.java:334)
at org.eclipse.equinox.internal.ds.SCRManager.serviceChanged(SCRManager.java:222)
at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:107)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:861)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:819)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry$1.run(ServiceRegistry.java:775)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:773)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:130)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:214)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.registerService(BundleContextImpl.java:433)
at org.eclipse.equinox.internal.ds.InstanceProcess.registerService(InstanceProcess.java:536)
at org.eclipse.equinox.internal.ds.InstanceProcess.buildComponents(InstanceProcess.java:213)
at org.eclipse.equinox.internal.ds.Resolver.getEligible(Resolver.java:343)
at org.eclipse.equinox.internal.ds.SCRManager.serviceChanged(SCRManager.java:222)
at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:107)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:861)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:819)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry$1.run(ServiceRegistry.java:775)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:773)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:130)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:214)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.registerService(BundleContextImpl.java:433)
at org.eclipse.equinox.internal.ds.InstanceProcess.registerService(InstanceProcess.java:536)
at org.eclipse.equinox.internal.ds.InstanceProcess.buildComponents(InstanceProcess.java:213)
at org.eclipse.equinox.internal.ds.Resolver.buildNewlySatisfied(Resolver.java:473)
at org.eclipse.equinox.internal.ds.Resolver.enableComponents(Resolver.java:217)
at org.eclipse.equinox.internal.ds.SCRManager.performWork(SCRManager.java:816)
at org.eclipse.equinox.internal.ds.SCRManager$QueuedJob.dispatch(SCRManager.java:783)
at org.eclipse.equinox.internal.ds.WorkThread.run(WorkThread.java:89)
at org.eclipse.equinox.internal.util.impl.tpt.threadpool.Executor.run(Executor.java:70)
这里的“未找到对象类定义 ID”位看起来很有希望...我对包名称进行了双重和三次检查。
随后:
!ENTRY com.company.product.statemachineXXXXimpl 2 0 2018-05-02 21:03:47.284
!MESSAGE [SCR] Could not get the service object relevant to the reference. One possible reason is a circularity problem. Another possible reason is that BundleContext.getService() returns null.
Details:
Problematic reference = Reference[name = DependencyBucket, interface = com.company.product.common.DependencyBucket, policy = static, cardinality = 1..1, target = null, bind = setDependencyBucket, unbind = unsetDependencyBucket]
of service component = com.company.product.statemachineXXXXimpl.StateMachineXXXXImpl
component implementation class = com.company.product.statemachineXXXXimpl.StateMachineXXXXImpl
located in bundle with symbolic name = com.company.product.statemachineXXXXimpl
bundle location = osgi-dp:com.company.product.statemachineXXXXimpl
!ENTRY com.company.product.statemachineXXXXimpl 2 0 2018-05-02 21:03:47.286
!MESSAGE [SCR] ComponentReference.bind(): bind method 'setDependencyBucket' is not found or it is not accessible!
Details:
Problematic reference = Reference[name = DependencyBucket, interface = com.company.product.common.DependencyBucket, policy = static, cardinality = 1..1, target = null, bind = setDependencyBucket, unbind = unsetDependencyBucket]
of service component = com.company.product.statemachineXXXXimpl.StateMachineXXXXImpl
component implementation class = com.company.product.statemachineXXXXimpl.StateMachineXXXXImpl
located in bundle with symbolic name = com.company.product.statemachineXXXXimpl
bundle location = osgi-dp:com.company.product.statemachineXXXXimpl
!ENTRY org.eclipse.equinox.ds 2 0 2018-05-02 21:03:47.291
!MESSAGE Could not bind a reference of component com.company.product.statemachineXXXXimpl.StateMachineXXXXImpl. The reference is: Reference[name = DependencyBucket, interface = com.company.product.common.DependencyBucket, policy = static, cardinality = 1..1, target = null, bind = setDependencyBucket, unbind = unsetDependencyBucket]
!ENTRY org.eclipse.equinox.ds 4 0 2018-05-02 21:03:47.352
!MESSAGE The component was not built because some of its references could not be bound. The component is Component[
name = com.company.product.statemachineXXXXimpl.StateMachineXXXXImpl
activate = activate
deactivate = deactivate
modified = modified
configuration-policy = optional
factory = null
autoenable = true
immediate = true
implementation = com.company.product.statemachineXXXXimpl.StateMachineXXXXImpl
state = Unsatisfied
properties = {service.pid=com.company.product.statemachineXXXXimpl.StateMachineXXXXImpl}
serviceFactory = false
serviceInterface = [com.company.product.common.StateMachineXXXX]
references = {
Reference[name = WatchdogService, interface = org.eclipse.kura.watchdog.WatchdogService, policy = static, cardinality = 1..1, target = null, bind = setWatchdogService, unbind = unsetWatchdogService]
Reference[name = DependencyBucket, interface = com.company.product.common.DependencyBucket, policy = static, cardinality = 1..1, target = null, bind = setDependencyBucket, unbind = unsetDependencyBucket]
}
located in bundle = com.company.product.statemachineXXXXimpl_1.0.0.dev [92]
]
我非常确定 setDependencyBucket
是在状态机实现文件中实现的,所以我认为真正的障碍可能不在这个 block 中。
删除对 PayloadReadyNotifier 的依赖后,一些错误似乎得到了解决。剩下的还有:
!ENTRY org.eclipse.equinox.metatype 4 0 2018-05-02 21:19:12.360
!MESSAGE DataParser.finished() Missing element AD (Reference ID = com.freewire.mobi.dependencybucketimpl.DependencyBucketImpl.
!ENTRY org.eclipse.equinox.metatype 4 0 2018-05-02 21:19:12.364
!MESSAGE DataParser.finished() Object Class Definition ID not found com.freewire.mobi.dependencybucketimpl.DependencyBucketImpl.
感觉很接近! .xml 可能有问题吗?
编辑#2:添加组件 xml:
<?xml version="1.0" encoding="UTF-8"?>
<component xmlns="http://www.osgi.org/xmlns/scr/v1.1.0"
name="com.company.product.dependencybucketimpl.DependencyBucketImpl"
activate="activate"
configuration-policy="optional"
deactivate="deactivate"
enabled="true"
immediate="true"
modified="modified">
<implementation class="com.company.product.dependencybucketimpl.DependencyBucketImpl"/>
<property name="service.pid"
type="String"
value="com.company.product.dependencybucketimpl.DependencyBucketImpl"/>
<reference name="InverterManager"
bind="setInverterManager"
unbind="unsetInverterManager"
interface="com.company.product.common.InverterManager"
cardinality="1..1"
policy="static"/>
<reference name="BmsManager"
bind="setBmsManager"
unbind="unsetBmsManager"
interface="com.company.product.common.BmsManager"
cardinality="1..1"
policy="static"/>
<reference name="CanConnector"
bind="setCanConnector"
unbind="unsetCanConnector"
interface="com.company.product.common.CanConnector"
cardinality="1..1"
policy="static"/>
<reference name="ModbusManagerV1P2"
bind="setModbusManagerV1P2"
unbind="unsetModbusManagerV1P2"
interface="com.company.product.common.ModbusManagerV1P2"
cardinality="1..1"
policy="static"/>
<reference name="ModbusConnector"
bind="setModbusConnector"
unbind="unsetModbusConnector"
interface="com.company.product.common.ModbusConnector"
cardinality="1..1"
policy="static"/>
<reference name="GpioManagerL2Gen"
bind="setGpioManagerL2Gen"
unbind="unsetGpioManagerL2Gen"
interface="com.company.product.common.GpioManagerL2Gen"
cardinality="1..1"
policy="static"/>
<reference name="UnitConfiguration"
bind="setUnitConfiguration"
unbind="unsetUnitConfiguration"
interface="com.company.product.common.UnitConfiguration"
cardinality="1..1"
policy="static"/>
<service>
<!--<provide interface="com.company.product.common.PayloadReadyNotifier"/>-->
<provide interface="com.company.product.common.DependencyBucket"/>
<!--<provide interface="com.company.product.common.ComponentStatusProvider"/>-->
</service>
</component>
和元类型:
<?xml version="1.0" encoding="UTF-8"?>
<MetaData xmlns="http://www.osgi.org/xmlns/metatype/v1.2.0"
localization="en_us">
<OCD id="com.company.product.dependencybucketimpl.DependencyBucketImpl"
name="DependencyBucketImpl"
description="">
</OCD>
<Designate pid="com.company.product.dependencybucketimpl.DependencyBucketImpl">
<Object ocdref="com.company.product.dependencybucketimpl.DependencyBucketImpl"/>
</Designate>
</MetaData>
最佳答案
此错误消息可能是所有其他错误消息的根本原因:
org.osgi.framework.ServiceException: org.eclipse.equinox.internal.ds.ServiceReg.getService() returned a service object that is not an instance of the service class com.company.product.common.PayloadReadyNotifier
您尚未显示实现类com.company.product.statemachineXXXXimpl.StateMachineXXXXImpl
的代码。但错误表明它没有实现或扩展类型 com.company.product.common.PayloadReadyNotifier
,您已将其声明为组件的服务接口(interface)。
当您发布 OSGi 服务时,实现类必须可转换为您尝试在其下发布的所有服务接口(interface)。
关于java - OSGI 组件已满足,但仍未激活,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50142257/
我想检索具有多个条件的数据,其中每个条件将在特定字段中包含特定关键字。 表结构如下: sid nid cid 数据 50 7 5 ee 50 7 6 AA 50 7 8 ff 51 7 5 ee 51
在 Prolog 中,我经常通过提供模板(包含变量的结构)然后满足其上的一组约束来解决问题。一个简单的例子可能是: go(T) :- T = [_, _, _], member(cat
在设计 FPGA 系统时,我如何粗略估计给定任务所需的逻辑 block 数量? 有人对我对这些常见设备的期望有一个粗略的数量级吗? 串口 使用 CRC32 的数据包解帧器 8 微核 我看过 www.o
我需要编写一段代码,如果函数满足列表中的大多数元素,则返回 True,不满足其中的 false。例如:moreThan odd [1,2,3] 是 True,但是 moreThan odd [1,2,
一旦满足三个条件,我需要使用 componentWillReceiveProps() 来调用我的组件中的方法。其中两个条件将当前 Prop 与下一个 Prop 进行比较,这两个条件通过 Ajax 请求
我正在构建一个主从表单。主视图模型构造细节 View 模型的实例。这些细节 View 模型有几个依赖项,需要用新 类实例来满足。 (这是因为他们需要在独立于主虚拟机的数据上下文中运行的服务层。) 实现
我有以下项目,我已经使用了一段时间。正如您在运行 snnipets 后看到的那样,一切正常。 /* The dark background behind the dialogs */ .dialog-
我正在尝试找出解决此问题的方法: 我想要一个函数来检查文本字段是否填充了文本并且复选框是否被选中。当满足这些条件时,“提交”按钮将启用。如果启用“提交”按钮后不久,用户清除文本字段或取消选中复选框,则
所以我相对较新,我有以下代码,我想知道如何制作这样我可以返回临时变量,同时满足java的返回要求。我希望返回临时值,但由于它位于 if-else block 内,因此从技术上讲,它不会在其外部初始化。
我正在编写一个脚本,该脚本读取文本文件并根据 .txt 文件的内容更改 div 中的文本。 但这不是我的问题。我不想要纯文本,背景颜色应该根据满足 if/elseif/else 函数的条件而改变。 v
我想在 if let 构造中满足多个约束。我知道我们可以使用“,”(逗号)来解包多个值,但它们都必须成功解包。 例如: var str: String? = "Hello" var x: Int? =
当我在 genymotion 模拟设备上安装我的应用程序时,它无法很好地安装,在控制台上我得到“INSTALL_FAILED_CPU_ABI_INCOMPATIBLE”我尝试了另一个应用程序,它安装得
因此,我试图根据数据帧的匹配条件来查看数据帧的两个变量(v1 和 v2)是否在其符号(正数或负数)中匹配变量(ID1==ID2)。 示例数据框 - Trial.df: ID1 v1
如果交付一个 Java 应用程序,它使用 gradle 依赖管理和许多来自 maven-central 的开源库,是否足以检查第一级 depedencies 的许可证(因为他们的依赖关系必须再次自动与
我正在尝试创建一个满足接口(interface) Iterable 的类“Gprogram” (这样我就可以在我的 Gprogram 中迭代 Gcommand)。但是,我只能使用类型 Iterable
我想知道是否可以获得一些帮助。 我试图在查询中写入一个查询,我使用 3 个字段:ID、选项和金额。 我需要对我的唯一 ID 进行分组,然后在该组中我需要按选项白色进行拆分,总计每个选项的金额。例如:编
如何在iOS swift项目中配置Jitsi-meet框架开启视频通话服务? 最佳答案 编辑:这也适用于 Xcode Version 12.2 (12B45b)在 Mac OS Big Sur 上。
我正在玩一些交互式菜单,目前有一个隐藏菜单,当按下一个按钮时,它会从右边出现,并将整个内容移到上面。有点像移动 facebook 应用程序。为了确定按钮应该将菜单滑出还是放回我使用 javascrip
我的目标很简单,使用遗传算法重现经典的“Hello, World”字符串。 我的代码基于此 post .代码主要包含4个部分: 生成具有多个不同个体的种群 根据与target的比较,定义评估个体好坏的
问题陈述 我们有一个雇主想要面试 N 个人,因此安排了 N 个面试时段。每个人都有这些时段的忙闲时间表。给出一个算法,如果可能的话将 N 个人安排到 N 个槽位,如果不可能则返回一个标志/错误/等。最
我是一名优秀的程序员,十分优秀!