【发布时间】:2019-02-04 09:53:11
【问题描述】:
我正在尝试在 OSGi 上下文中使用 Ice 客户端。在非 OSGi 环境中运行服务器和最小示例客户端可以正常工作。对于 OSGi 环境中的客户端,我得到以下异常:
com.zeroc.Ice.NoValueFactoryException
reason = "no value factory found and compact format prevents slicing (the sender should use the sliced format instead)"
type = "::MyModule::Knowledge::CMKnowledge"
但是,我不能 100% 确定 OSGi 运行时是否在这里有所作为。 Slice 文件如下所示:
module MyModule{
module Knowledge{
class KnowledgePart{
string value;
}
class FMKnowledge extends KnowledgePart{}
class CMKnowledge extends KnowledgePart{}
interface IKnowledge{
void sendKnowledge(KnowledgePart knowledge);
FMKnowledge getFMKnowledge();
CMKnowledge getCMKnowledge();
}
}
}
在这种情况下,这个异常是什么意思,我该如何解决?我已经尝试设置 ["format:sliced"] 而不是隐式使用的紧凑格式。
【问题讨论】:
标签: ice