首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >骆驼路线导致缺少依赖关系错误。

骆驼路线导致缺少依赖关系错误。
EN

Stack Overflow用户
提问于 2016-11-23 13:46:26
回答 2查看 1.4K关注 0票数 1

我目前正在尝试将骆驼路由部署到我的karaf容器(在Spring中):

代码语言:javascript
复制
<?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。

谢谢!

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2016-11-29 10:49:19

它似乎与骆驼2.16.3有某种联系。当我升级到2.18,一切都很好。milo客户机端点依赖于Camel 2.18。

谢谢大家的帮助!

票数 0
EN

Stack Overflow用户

发布于 2016-11-24 08:42:21

如果将camel XSD url添加到schemaLocation属性中怎么办?

代码语言:javascript
复制
<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

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/40766211

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档