【发布时间】:2014-04-01 17:55:54
【问题描述】:
我有一个 cxf 制作人的骆驼路线(Camel v2.10):
<to uri="cxf:bean:myCxfEndpoint?dataFormat=PAYLOAD"/>
我知道 camel 会转换为 CxfPayload,所以我在 OSGi 标头中添加了以下导入:
org.apache.camel.component.cxf,
org.apache.camel.component.cxf.converter,
org.apache.camel.converter.jaxb
所以当producer被触发时,会发生如下异常:
org.apache.camel.NoTypeConversionAvailableException - No type converter available to convert from type: my.package.Foo to the required type: org.apache.camel.component.cxf.CxfPayload
我可以通过重新启动 camel-jaxb 包来摆脱这个异常,但是摆脱它是不够的:我需要阻止它,因为每次我重新启动 Fuse 时都会发生这种情况。
任何想法都非常感谢:)
编辑
事实证明,问题并不总是出现。有时重启后能用,有时不能。我尝试使用捆绑级别,但仍然无法预测。我有一种感觉,可能是 Camel 没有正确加载转换器,但根据跟踪日志,看起来 CxfPayloadConverter 总是加载到 ConverterRegistry 中。
【问题讨论】:
标签: apache-camel osgi apache-karaf apache-servicemix