我正试图把Kafka和 Camel 结合起来。我已经实现了以下路线。
<bean id="publisherPoint" class="org.vaida.esb.camel.orderdispatcher.OrderDispatcher.PublisherPoint">
<property name="topicId" value="feedAlpha"/>
<property name="props">
<props>
<prop key="serializer.class">kafka.serializer.StringEncoder</prop>
<prop key="partitioner.class">org.vaida.esb.camel.orderdispatcher.OrderDispatcher.SimplePartitioner</prop>
<prop key="metadata.broker.list">localhost:9093,localhost:9094</prop>
</props>
</property>
<property name="reqMessage" value="RAONE"/>
</bean>
拉贾
当我测试这个的时候camel:run,我可以将消息发布到kafka集群。但当我绑定并部署到ServiceMixOSGi容器时,我遇到了以下问题。
2014-02-26 17:00:17190 |错误|#0-timer://foo |defaulterrorhandler | 100-org.apache.camel.camel-core-2.10.7 |传递失败(exchangeid:id-vvvvv-d-40084-1393430384926-0-11上的messageid:id-vvvv-d-40084-1393430384926-0-12)。尝试传递后耗尽:1捕获到:org.apache.camel.cameleExecutionException:在exchange[message:raja]org.apache.camel.cameleExecutionException:在exchange[message:raja]上执行时发生异常org.apache.camel.util.objecthelper.wrapcamelexecutionexception(objecthelper。java:1344)[100:org.apache.camel.camel-core:2.10.7]在org.apache.camel.impl.defaultexchange.setexception(defaultexchange。java:282)[100:org.apache.camel.camel-core:2.10.7]在org.apache.camel.component.bean.methodinfo$1.继续(methodinfo。java:224)[100:org.apache.camel.camel-core:2.10.7]在org.apache.camel.component.bean.beanprocessor.process(beanprocessor。java:166)[100:org.apache.camel.camel-core:2.10.7]在org.apache.camel.util.asyncprocessorhelper.process(asyncprocessorhelper)。java:99)[100:org.apache.camel.camel-core:2.10.7]在org.apache.camel.component.bean.beanprocessor.process(beanprocessor。java:67)[100:org.apache.camel.camel-core:2.10.7]在org.apache.camel.impl.processorendpoint.onexchange(processorendpoint。java:101)[100:org.apache.camel.camel-core:2.10.7]在org.apache.camel.impl.processorendpoint$1.process(processorendpoint。java:71)[100:org.apache.camel.camel-core:2.10.7]在org.apache.camel.util.asyncprocessorconverterhelper$processortoasyncprocessorbridge.process(asyncprocessorconverterhelper)。java:61)[100:org.apache.camel.camel-core:2.10.7]在org.apache.camel.util.asyncprocessorhelper.process(asyncprocessorhelper)中。java:73)[100:org.apache.camel.camel-core:2.10.7]在org.apache.camel.processor.sendprocessor$2.doinasyncproducer(sendprocessor。java:122)[100:org.apache.camel.camel-core:2.10.7]在org.apache.camel.impl.producercache.doinasyncproducer(producercache。java:298)[100:org.apache.camel.camel-core:2.10.7]在org.apache.camel.processor.sendprocessor.process(sendprocessor。java:117)[100:org.apache.camel.camel-core:2.10.7]在org.apache.camel.util.asyncprocessorhelper.process(asyncprocessorhelper)中。java:73)[100:org.apache.camel.camel-core:2.10.7]在org.apache.camel.processor.delegateasyncprocessor.processnext(delegateasyncprocessor。java:99)[100:org.apache.camel.camel-core:2.10.7]位于org.apache.camel.processor.delegateasyncprocessor.process(delegateasyncprocessor)。java:90)[100:org.apache.camel.camel-core:2.10.7]在org.apache.camel.management.instrumentationprocessor.process(instrumentationprocessor。java:72)[100:org.apache.camel.camel-core:2.10.7]在org.apache.camel.util.asyncprocessorhelper.process(asyncprocessorhelper)中。java:73)[100:org.apache.camel.camel-core:2.10.7]在org.apache.camel.processor.delegateasyncprocessor.processnext(delegateasyncprocessor。java:99)[100:org.apache.camel.camel-core:2.10.7]位于org.apache.camel.processor.delegateasyncprocessor.process(delegateasyncprocessor)。java:90)[100:org.apache.camel.camel-core:2.10.7]在org.apache.camel.processor.interceptor.traceinterceptor.process(traceinterceptor。java:91)[100:org.apache.camel.camel-core:2.10.7]在org.apache.camel.util.asyncprocessorhelper.process(asyncprocessorhelper)中。java:73)[100:org.apache.camel.camel-core:2.10.7]在org.apache.camel.processor.redeliveryerrorhandler.processerrorhandler(redeliveryerrorhandler。java:335)[100:org.apache.camel.camel-core:2.10.7]在org.apache.camel.processor.redeliveryerrorhandler.process(redeliveryerrorhandler。java:220)[100:org.apache.camel.camel-core:2.10.7]在org.apache.camel.processor.routecontextprocessor.processnext(routecontextprocessor。java:46)[100:org.apache.camel.camel-core:2.10.7]位于org.apache.camel.processor.delegateasyncprocessor.process(delegateasyncprocessor)。java:90)[100:org.apache.camel.camel-core:2.10.7]在org.apache.camel.processor.interceptor.defaultchannel.process(defaultchannel。java:308)[100:org.apache.camel.camel-core:2.10.7]在org.apache.camel.util.asyncprocessorhelper.process(asyncprocessorhelper)中。java:73)[100:org.apache.camel.camel-core:2.10.7]在org.apache.camel.processor.pipeline.process(管道。java:117)[100:org.apache.camel.camel-core:2.10.7]在org.apache.camel.processor.pipeline.process(pipeline。java:80)[100:org.apache.camel.camel-core:2.10.7]在org.apache.camel.processor.routecontextprocessor.processnext(routecontextprocessor。java:46)[100:org.apache.camel.camel-core:2.10.7]在org.apache.camel.processor.delegateasyncprocessor.process(delegateasyncprocessor)。java:90)[100:org.apache.camel.camel-core:2.10.7]在org.apache.camel.processor.unitofworkprocessor.processasync(unitofworkprocessor。java:150)[100:org.apache.camel.camel-core:2.10.7]在org.apache.camel.processor.unitofworkprocessor.process(unitofworkprocessor。java:117)[100:org.apache.camel.camel-core:2.10.7]位于org.apache.camel.processor.routeinflightrepositoryprocessor.processnext(routeinflightrepositoryprocessor)。java:48)[100:org.apache.camel.camel-core:2.10.7]在org.apache.camel.processor.delegateasyncprocessor.process(delegateasyncprocessor)。java:90)[100:org.apache.camel.camel-core:2.10.7]在org.apache.camel.util.asyncprocessorhelper.process(asyncprocessorhelper)中。java:73)[100:org.apache.camel.camel-core:2.10.7]在org.apache.camel.processor.delegateasyncprocessor.processnext(delegateasyncprocessor。java:99)[100:org.apache.camel.camel-core:2.10.7]位于org.apache.camel.processor.delegateasyncprocessor.process(delegateasyncprocessor)。java:90)[100:org.apache.camel.camel-core:2.10.7]在org.apache.camel.management.instrumentationprocessor.process(instrumentationprocessor。java:72)[100:org.apache.camel.camel-core:2.10.7]在org.apache.camel.util.asyncprocessorhelper.process(asyncprocessorhelper)中。java:99)[100:org.apache.camel.camel-core:2.10.7]在org.apache.camel.processor.delegateasyncprocessor.process(delegateasyncprocessor)。java:86)[100:org.apache.camel.camel-core:2.10.7]在org.apache.camel.component.timer.timerconsumer.sendtimerexchange(timerconsumer。java:135)[100:org.apache.camel.camel-core:2.10.7]在org.apache.camel.component.timer.timerconsumer$1.run(timerconsumer。java:63)[100:org.apache.camel.camel-core:2.10.7]在java.util.timerthread.mainloop(timer。java:555)[:1.7.0\u 51]在java.util.timerthread.run(timer。java:505)[:1.7.0\u 51]原因:java.lang.noclassdeffounderror:scala/collection/immutable/stringlike atorg.vaida.esb.camel.orderdispatcher.orderdispatcher.publisherpoint.publishaction(publisherpoint。java:56)[238:订购ispatcher:0.0.1.snapshot]在sun.reflect.nativemethodaccessorimpl.invoke0(本机方法)[:1.7.0_]在sun.reflect.nativemethodaccessorimpl.invoke(本机方法AccessorImpl)。java:57)[:1.7.0_]在sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl。java:43)[:1.7.0_]位于java.lang.reflect.method.invoke(method。java:606)[:1.7.0_]位于org.apache.camel.component.bean.methodinfo.invoke(methodinfo。java:362)在org.apache.camel.component.bean.methodinfo$1.doproceed(methodinfo。java:249)[100:org.apache.camel.camel-core:2.10.7]在org.apache.camel.component.bean.methodinfo$1.procedue(methodinfo。java:222)[100:org.apache.camel.camel-core:2.10.7] ... 43更多原因:java.lang.classnotfoundexception:scala.collection.immutable.stringlike not found by org.apache.kafka[216]at org.apache.felix.framework.moduleimpl.findclassorresourcebydelegation(moduleimpl)。java:812)访问org.apache.felix.framework.moduleimpl.access$400(moduleimpl。java:72)在org.apache.felix.framework.moduleimpl$moduleclassloader.loadclass(moduleimpl。java:1807)在java.lang.classloader.loadclass(classloader。java:358)[:1.7.0_51] ... 51更多2014-02-26 17:00:17204 |警告|#0-timer://foo |timerconsumer | 100-org.apache.camel.camel-core-2.10.7 |错误处理交换。交换[信息:拉贾]。原因:[org.apache.camel.cameleExecutionException-在exchange上执行时发生异常:exchange[message:raja]]org.apache.cameleExecutionException:在exchange上执行时发生异常:exchange[message:raja]位于org.apache.camel.util.objecthelper.wrapcamelexecutionexception(objecthelper。java:1344)[100:org.apache.camel.camel-core:2.10.7]在org.apache.camel.impl.defaultexchange.setexception(defaultexchange。java:282)[100:org.apache.camel.camel-core:2.10.7]在org.apache.camel.component.bean.methodinfo$1.继续(methodinfo。java:224)[100:org.apache.camel.camel-core:2.10.7]在org.apache.camel.component.bean.beanprocessor.process(beanprocessor。java:166)[100:org.apache.camel.camel-core:2.10.7]在org.apache.camel.util.asyncprocessorhelper.process(asyncprocessorhelper)。java:99)[100:org.apache.camel.camel-core:2.10.7]在org.apache.camel.component.bean.beanprocessor.process(beanprocessor。java:67)[100:org.apache.camel.camel-core:2.10.7]在org.apache.camel.impl.processorendpoint.onexchange(processorendpoint。java:101)[100:org.apache.camel.camel-core:2.10.7]在org.apache.camel.impl.processorendpoint$1.process(processorendpoint。java:71)[100:org.apache.camel.camel-core:2.10.7]在org.apache.camel.util.asyncprocessorconverterhelper$processortoasyncprocessorbridge.process(asyncprocessorconverterhelper)。java:61)[100:org.apache.camel.camel-core:2.10.7]在org.apache.camel.util.asyncprocessorhelper.process(asyncprocessorhelper)中。java:73)[100:org.apache.camel.camel-core:2.10.7]在org.apache.camel.processor.sendprocessor$2.doinasyncproducer(sendprocessor。java:122)[100:org.apache.camel.camel-core:2.10.7]在org.apache.camel.impl.producercache.doinasyncproducer(producercache。java:298)[100:org.apache.camel.camel-core:2.10.7]在org.apache.camel.processor.sendprocessor.process(sendprocessor。java:117)[100:org.apache.camel.camel-core:2.10.7]在org.apache.camel.util.asyncprocessorhelper.process(asyncprocessorhelper)中。java:73)[100:org.apache.camel.camel-core:2.10.7]位于org.apache.camel.processor.delegateasyncprocessor.processnext(delegateasyncprocessor.jav
暂无答案!
目前还没有任何答案,快来回答吧!