You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by sma <sm...@etcc.com> on 2016/09/27 14:04:42 UTC

kafka consumer error

Hi, 

I am testing with the kafka component, code is like


try {
			camelContext.addRoutes(new RouteBuilder() {
				public void configure() {
				
from("kafka:10.200.5.162:9092?topic=TMS_DATA&zookeeperHost=10.200.5.162&zookeeperPort=2181&groupId=group1&serializerClass=org.springframework.integration.kafka.serializer.avro.AvroSerializer")
					//   .marshal().avro()
					   //.to("bean:testBean?method=hello")
					   .to("stream:out");
				}
			});
			//ProducerTemplate template = camelContext.createProducerTemplate();
			camelContext.start();
			//for (int i = 0; i < 5; i++) {
			//	template.sendBody("activemq:queue:start", "body" + i);
			//}
			Thread.sleep(1000);
		} finally {
			camelContext.stop();
		}


and i am getting this error

xception in thread "main" java.lang.IncompatibleClassChangeError: Class
scala.collection.JavaConversions$ does not implement the requested interface
scala.collection.convert.WrapAsScala
	at kafka.utils.VerifiableProperties.verify(VerifiableProperties.scala:200)
	at kafka.consumer.ConsumerConfig.<init>(ConsumerConfig.scala:79)
	at
org.apache.camel.component.kafka.KafkaConsumer.doStart(KafkaConsumer.java:79)
	at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)
	at
org.apache.camel.impl.DefaultCamelContext.startService(DefaultCamelContext.java:2869)
	at
org.apache.camel.impl.DefaultCamelContext.doStartOrResumeRouteConsumers(DefaultCamelContext.java:3163)
	at
org.apache.camel.impl.DefaultCamelContext.doStartRouteConsumers(DefaultCamelContext.java:3099)
	at
org.apache.camel.impl.DefaultCamelContext.safelyStartRouteServices(DefaultCamelContext.java:3029)
	at
org.apache.camel.impl.DefaultCamelContext.doStartOrResumeRoutes(DefaultCamelContext.java:2797)
	at
org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:2653)
	at
org.apache.camel.impl.DefaultCamelContext.access$000(DefaultCamelContext.java:167)
	at
org.apache.camel.impl.DefaultCamelContext$2.call(DefaultCamelContext.java:2467)
	at
org.apache.camel.impl.DefaultCamelContext$2.call(DefaultCamelContext.java:2463)
	at
org.apache.camel.impl.DefaultCamelContext.doWithDefinedClassLoader(DefaultCamelContext.java:2486)
	at
org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:2463)
	at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)
	at
org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:2432)



Thanks
Shannon



--
View this message in context: http://camel.465427.n5.nabble.com/kafka-consumer-error-tp5788114.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: kafka consumer error

Posted by sma <sm...@etcc.com>.
For anyone interested, it is the wrong version of sacla-library.



--
View this message in context: http://camel.465427.n5.nabble.com/kafka-consumer-error-tp5788114p5788178.html
Sent from the Camel - Users mailing list archive at Nabble.com.