ActiveMQ的骆驼:不能使用&lt;到URI =&QUOT; HTTP://..."&GT; [英] Activemq-camel: can not use <to uri="http://...">
问题描述
我需要帮助解决这个问题,下面code为bean.xml给我误差
I want help to solve this problem, the following code is in bean.xml gives me error
<camelContext id="activeContext1" xmlns="http://camel.apache.org/schema/spring">
<route>
<from uri="activemq:queue:ThermalMap"/>
<to uri="http://myhost:8161/Example?throwExceptionOnFailure=false"/>
</route>
</camelContext>
错误我得到:
org.apache.camel.RuntimeCamelException:org.apache.camel.FailedToCreateRouteException:无法创建航线ROUTE1在:>>>要[HTTP://为myhost:8161 /例throwExceptionOnFailure =假]&LT;&LT;&LT ;在路线:路线[从[ActiveMQ的:队列:ThermalMap] - > [为了[HTT://为myhost ......因为无法解析端点:HTT://为myhost:8161 /例throwExceptionOnFailure =由于假? :无法自动创建组件:HTTP
org.apache.camel.RuntimeCamelException: org.apache.camel.FailedToCreateRouteException: Failed to create route route1 at: >>> To[http://myhost:8161/Example?throwExceptionOnFailure=false] <<< in route: Route[[From[activemq:queue:ThermalMap]] -> [To[htt://myhost... because of Failed to resolve endpoint: htt://myhost:8161/Example?throwExceptionOnFailure=false due to: Cannot auto create component: http
我该如何解决这个问题呢?
How can I solve this problem?
编辑:编辑我在Eclipse应用程序。我手动添加在的WebContent / WEB-INF / lib目录
文件夹中的所有jar文件。 Bean.xml
是一个定义我的应用程序。我用的Java
来写我的消费者()
和处理器()
功能。
I edit my application in eclipse. I have manually added all jar files in webcontent/WEB-INF/lib
folder. Bean.xml
is the one define my application. I used java
to write my consumer()
and processor()
functions.
推荐答案
也许你不放在骆驼HTTP在类路径组件。如果您在使用maven然后把骆驼HTTP组件的依赖在你的POM并应工作。
Perhaps you have not placed camel-http component in classpath. If you are using maven then put the dependency of camel-http component in your pom and it shall work.
这篇关于ActiveMQ的骆驼:不能使用&lt;到URI =&QUOT; HTTP://..."&GT;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!