【发布时间】:2016-11-23 13:46:26
【问题描述】:
我目前正在尝试将骆驼路线部署到我的 karaf 容器(在 Spring DSL 中):
<?xml version="1.0" encoding="UTF-8"?>
<blueprint
xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://www.osgi.org/xmlns/blueprint/v1.0.0
http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">
<bean id="milo-client" class="org.apache.camel.component.milo.client.MiloClientComponent">
<!--<property name="enableAnonymousAuthentication" value="true"/>-->
</bean>
<camelContext xmlns="http://camel.apache.org/schema/blueprint">
<route id="opctorest">
<from uri="timer://simpleTimer?period=1000"/>
<log message="Triggered Route: opctorest: Sensorreading body: ${body}"/>
<to uri="milo-client:tcp://127.0.0.1:4840/freeopcua/server?namespaceUri=http://examples.freeopcua.github.io"/>
<convertBodyTo type="java.lang.String"/>
<to uri="stream:out"/>
</route>
</camelContext>
</blueprint>
该路由的捆绑包未安装,但仍处于“GracePeriod”状态。我修复了所有缺失的依赖项(我认为是这样),但我不明白这条消息:
捆绑 251 ---------- 状态:GracePeriod Blueprint 11/23/16 2:08 PM 缺少依赖项: (&(objectClass=org.apache.aries.blueprint.NamespaceHandler)(osgi.service.blueprint.namespace=http://camel.apache.org/schema/blueprint))
我可以做些什么来解决这种依赖关系? camel-blueprint 和 aries 一样已安装。 Karaf 是 4.0.5 版。蓝图是 2.16.3。
谢谢!
【问题讨论】:
-
camel-blueprint是否激活了您的 karaf 容器? -
是:47 |活跃 | 50 | 2.16.3 |骆驼蓝图
-
您是否安装了带有 features:install 的骆驼流功能?
-
您是如何安装的?通常最好做功能:安装任何与骆驼相关的东西。
-
camel-stream 已安装,所有功能都通过功能安装安装。唯一的事情是其中一个端点:milo-client 是通过 .kar 文件安装的。但这似乎不是问题还是我在这里被误导了?