我目前正在尝试将骆驼路由部署到我的karaf容器(在Spring中):
<?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
我能做些什么来解决这个依赖呢?camel-blueprint已经安装,白羊座也是。Karaf是4.0.5版。蓝图为2.16.3。
谢谢!
发布于 2016-11-29 10:49:19
它似乎与骆驼2.16.3有某种联系。当我升级到2.18,一切都很好。milo客户机端点依赖于Camel 2.18。
谢谢大家的帮助!
发布于 2016-11-24 08:42:21
如果将camel XSD url添加到schemaLocation属性中怎么办?
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:camel="http://camel.apache.org/schema/blueprint"
xsi:schemaLocation="
http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd
http://camel.apache.org/schema/blueprint http://camel.apache.org/schema/blueprint/camel-blueprint.xsd">编辑:我是在评论,但这是一个很长的故事,所以它在这里。
我不是百分之百确定,但是<camelContext xmlns="http://camel.apache.org/schema/blueprint">告诉Blueprint要使用哪个名称空间来验证该部分XML。蓝图需要知道查找名称空间模式的“位置”(xmlns = Name Space),并搜索schemaLocation属性。
名称空间是标记的前缀,例如在<mythings:tag> mythings中是名称空间。通过使用xmlns属性,您基本上是在说“这里的所有内容都有以下名称空间”。
我意识到这是因为:
包251
https://stackoverflow.com/questions/40766211
复制相似问题