com.google.common.util.concurrent.ExecutionError: java.lang.NoSuchMethodError: kafka.server.KafkaServer.<init>(Lkafka/server/KafkaConfig;Lkafka/utils/Time;)V at org.apache.twill.internal.kafka.EmbeddedKafkaServer.createKafkaServer(EmbeddedKafkaServer.java:88) at org.apache.twill.internal.kafka.EmbeddedKafkaServer.startUp(EmbeddedKafkaServer.java:56)
If a project has dependency on cdap-kafka-flow-compat-0.7, then of course it shouldn't use the `EmbeddedKafkaServer` to start Kafka for unit-test, since that was compiled with Kafka 0.8. If you look at the unit-test of the cdap-kafka-flow-compat-0.7 unit test, it has it's own way of starting Kafka server for unit-test.
Hi , Could you clarify if this fix was actually done and is now available in 3.5.0-SNAPSHOT? The PR#383 above is not obviously related to cdap-packs/kafka/twill, etc. Thanks.
Sreevatsan RamanAugust 18, 2016 at 11:12 AM
PR merged. resolving
Fixed
Pinned fields
Click on the next to a field label to start pinning.
cdap-kafka-packs-0.7 has a dependency on twill-0.6.0, which uses kafka-0.8.
So if somebody has the dependency:
<groupId>co.cask.cdap</groupId>
<artifactId>cdap-kafka-flow-compat-0.7</artifactId>
<version>${kafka-flow.version}</version>
<classifier>embedded-kafka</classifier>
Their test will fail with:
com.google.common.util.concurrent.ExecutionError: java.lang.NoSuchMethodError: kafka.server.KafkaServer.<init>(Lkafka/server/KafkaConfig;Lkafka/utils/Time;)V
at org.apache.twill.internal.kafka.EmbeddedKafkaServer.createKafkaServer(EmbeddedKafkaServer.java:88)
at org.apache.twill.internal.kafka.EmbeddedKafkaServer.startUp(EmbeddedKafkaServer.java:56)