我遇到了驼峰http4端点的问题

时间:2012-11-06 03:30:07

标签: apache-camel

春天背景:

<bean id="customRouteA" class="com.xxx.CustomRouteABean" />

<camelContext id="solr" xmlns="http://camel.apache.org/schema/spring">
    <route>
        <from uri="activemq:topic:agent" />
        <to uri="bean:customRouteA"/>
    </route>
</camelContext>

Java代码:

public class CustomRouteABean {

@EndpointInject(uri = "http4://localhost/camel-route-test.php")
ProducerTemplate producer;

public void processMessage(@Body String message) {
    ...
}
}

不断收到错误:

2085 [main] ERROR org.springframework.web.context.ContextLoader  - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'customRouteA' defined in ServletContext resource [/WEB-INF/application-context.xml]: Initialization of bean failed; nested exception is org.apache.camel.spring.GenericBeansException: Error post processing bean: customRouteA; nested exception is org.apache.camel.ResolveEndpointFailedException: Failed to resolve endpoint: http4://localhost/camel-route-test.php?bridgeEndpoint=true due to: null

我有另一个bean有相同的设置工作正常,我在这里缺少什么?

1 个答案:

答案 0 :(得分:0)

你有类似路径的camel-http4及其依赖的JAR吗?