0

春のコンテキスト:

<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 がありますが、ここで何が欠けていますか?

4

1 に答える 1

0

クラスパスに camel-http4 とそれに依存する JAR がありますか?

于 2012-11-06T10:31:05.023 に答える