java - Getting ClassNotFoundException while deploying a camel route with kakfa in Apache karaf -
getting classnotfoundexception while deploying camel route kakfa in apache karaf
i trying deploy xml file in karaf(camel-kakfa , zookeeper features installed)
when deploy getting classnotfoundexception exception:
camel-installed fearures: ------------------------- karaf@root()> bundle:list | grep -i camel 95 | active | 50 | 2.15.1 | camel-catalog 96 | active | 50 | 2.15.1 | camel-commands-core 97 | active | 50 | 2.15.1 | camel-core 98 | active | 50 | 2.15.1 | camel-stream 99 | active | 50 | 2.15.1 | camel-karaf-commands 103 | active | 50 | 2.15.1 | camel-spring 120 | active | 50 | 2.15.1 | camel-zookeeper 122 | active | 50 | 2.15.1 | camel-kafka karaf@root()>
xml :
<camelcontext xmlns="http://camel.apache.org/schema/spring" autostartup="true"> <route id="firstroute" streamcache="true"> <from uri="file:/karaf/test/input"/> <to uri="kafka:localhost:9092?topic=createaccountkafka&zookeeperhost=localhost&zookeeperport=2181&serializerclass=kafka.serializer.stringencoder"/> </route> <route id="secondroute" streamcache="true"> <from uri="kafka:localhost:9092?topic=createaccountkafka&zookeeperhost=localhost&zookeeperport=2181&serializerclass=kafka.serializer.stringencoder&autooffsetreset=smallest&groupid=0"/> <log message="the body :${body}" /> <log message="the head :${headers}" /> <to uri="file:/karaf/test/output"/> </route> </camelcontext>
exception
karaf@root()> exception in thread "springosgiextenderthread-6" java.lang.noclassdeffounderror: org/i0itec/zkclient/izkstatelistener @ kafka.javaapi.consumer.zookeeperconsumerconnector.(zookeeperconsumerconnector.scala:65) @ kafka.javaapi.consumer.zookeeperconsumerconnector.(zookeeperconsumerconnector.scala:67) @ kafka.consumer.consumer$.createjavaconsumerconnector(consumerconnector.scala:100) @ kafka.consumer.consumer.createjavaconsumerconnector(consumerconnector.scala) @ org.apache.camel.component.kafka.kafkaconsumer.dostart(kafkaconsumer.java:79) @ org.apache.camel.support.servicesupport.start(servicesupport.java:61) @ org.apache.camel.impl.defaultcamelcontext.startservice(defaultcamelcontext.java:2869) @ org.apache.camel.impl.defaultcamelcontext.dostartorresumerouteconsumers(defaultcamelcontext.java:3163) @ org.apache.camel.impl.defaultcamelcontext.dostartrouteconsumers(defaultcamelcontext.java:3099) @ org.apache.camel.impl.defaultcamelcontext.safelystartrouteservices(defaultcamelcontext.java:3029) @ org.apache.camel.impl.defaultcamelcontext.dostartorresumeroutes(defaultcamelcontext.java:2797) @ org.apache.camel.impl.defaultcamelcontext.dostartcamel(defaultcamelcontext.java:2653) @ org.apache.camel.impl.defaultcamelcontext.access$000(defaultcamelcontext.java:167) @ org.apache.camel.impl.defaultcamelcontext$2.call(defaultcamelcontext.java:2467) @ org.apache.camel.impl.defaultcamelcontext$2.call(defaultcamelcontext.java:2463) @ org.apache.camel.impl.defaultcamelcontext.dowithdefinedclassloader(defaultcamelcontext.java:2486) @ org.apache.camel.impl.defaultcamelcontext.dostart(defaultcamelcontext.java:2463) @ org.apache.camel.support.servicesupport.start(servicesupport.java:61) @ org.apache.camel.impl.defaultcamelcontext.start(defaultcamelcontext.java:2432) @ org.apache.camel.spring.springcamelcontext.maybestart(springcamelcontext.java:255) @ org.apache.camel.spring.springcamelcontext.onapplicationevent(springcamelcontext.java:121) @ org.apache.camel.spring.camelcontextfactorybean.onapplicationevent(camelcontextfactorybean.java:332) @ org.springframework.context.event.simpleapplicationeventmulticaster.multicastevent(simpleapplicationeventmulticaster.java:96) @ org.springframework.context.support.abstractapplicationcontext.publishevent(abstractapplicationcontext.java:334) @ org.springframework.context.support.abstractapplicationcontext.finishrefresh(abstractapplicationcontext.java:954) @ org.springframework.osgi.context.support.abstractosgibundleapplicationcontext.finishrefresh(abstractosgibundleapplicationcontext.java:235) @ org.springframework.osgi.context.support.abstractdelegatedexecutionapplicationcontext$4.run(abstractdelegatedexecutionapplicationcontext.java:358) @ org.springframework.osgi.util.internal.privilegedutils.executewithcustomtccl(privilegedutils.java:85) @ org.springframework.osgi.context.support.abstractdelegatedexecutionapplicationcontext.completerefresh(abstractdelegatedexecutionapplicationcontext.java:320) @ org.springframework.osgi.extender.internal.dependencies.startup.dependencywaiterapplicationcontextexecutor$completerefreshtask.run(dependencywaiterapplicationcontextexecutor.java:132) @ java.lang.thread.run(thread.java:745) caused by: java.lang.classnotfoundexception: org.i0itec.zkclient.izkstatelistener not found org.apache.servicemix.bundles.kafka_2.10 [136] @ org.apache.felix.framework.bundlewiringimpl.findclassorresourcebydelegation(bundlewiringimpl.java:1574) @ org.apache.felix.framework.bundlewiringimpl.access$400(bundlewiringimpl.java:79) @ org.apache.felix.framework.bundlewiringimpl$bundleclassloader.loadclass(bundlewiringimpl.java:2018) @ java.lang.classloader.loadclass(classloader.java:357) ... 31 more -----------------------------------------------------
also have tried adding zkclient jar manually in deployment folder , still did not work
Comments
Post a Comment