【发布时间】:2019-08-08 19:42:09
【问题描述】:
我想使用ahc组件调用外部http服务,在pom.xml中添加camel-ahc依赖,并且在karaf中安装camel-ahc功能:
feature:install camel-ahc
已添加的捆绑包:
骆驼-ahc 和 wrap_file__home_ossl_.m2_repository_org_asynchttpclient_async-http-client_2.4.3_async-http-cl...
我的代码是:
<camelContext id="jetty-ws-camel-ahc" xmlns="http://camel.apache.org/schema/blueprint" >
<route id="ahc-route">
<from uri="timer://webinar?period=20000"/>
<setHeader headerName="CamelHttpMethod">
<constant>GET</constant>
</setHeader>
<to uri="ahc:http://217.0.0.0:3030/sendSMS/mynumber/bye"/>
<log message="message sent!"/>
</route>
</camelContext>
但是我有一个警告并且请求没有发送到 http 地址: WARN [Blueprint Extender: 3] Listener 引起异常,将被忽略 java.util.concurrent.ExecutionException: java.lang.NoClassDefFoundError: org/reactivestreams/Publisher
原因:java.lang.ClassNotFoundException: org.reactivestreams.Publisher not found by wrap_file__home_ossl_.m2_repository_org_asynchttpclient_async-http-client_2.4.3_async-http-client-2.4.3.jar_Export-Package_org.asynchttpclient.__version_2.4.3
我该怎么办?
【问题讨论】:
标签: asynchronous apache-camel apache-karaf