In Kafka 2.1, the `Serializer` and `Deserializer` interface were changed: https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=87298242
It seems, that updating to 2.2.0 for the test driver does not update your dependency to `kafka-client` package. Try to add this dependency explicitly to make sure its using `2.2.0` clients jar. -Matthias On 4/13/19 12:49 PM, Chad Preisler wrote: > It seems like the Kafka test driver is not compatible with the latest > kafka-streams API. When I use the following two dependencies together. > > <dependency> > <groupId>org.apache.kafka</groupId> > <artifactId>kafka-streams-test-utils</artifactId> > <version>2.2.0</version> > <scope>test</scope> > </dependency> > <dependency> > <groupId>org.apache.kafka</groupId> > <artifactId>kafka-streams</artifactId> > <version>2.2.0</version> > <scope>compile</scope> > </dependency> > > > I get the following compiler error: > > java.lang.NoSuchMethodError: > org.apache.kafka.common.serialization.Serializer.serialize(Ljava/lang/String;Lorg/apache/kafka/common/header/Headers;Ljava/lang/Object;)[B > at > > > In my unit test file for this function call: > > testDriver.pipeInput(statusFactory.create(TopicNames.ENVELOPE_STATUS, > "1000", > new Status("FIN", "1000", "d200", EnvelopeState.DRAFT, new > Date().getTime(), "draft", null, null))); > > > Anyone run into this problem? Changing to version 2.0.1 or Kafka Streams > makes everything work. >
signature.asc
Description: OpenPGP digital signature