manub / scalatest-embedded-kafka

A library that provides an in-memory Kafka instance to run your tests against.
MIT License
295 stars 87 forks source link

kafka.serializer.Encoder doesn't exist anymore in 2.0.0 #156

Closed TomLous closed 5 years ago

TomLous commented 6 years ago

Running the EmbeddedKafkaStreamsAllInOne example I keep getting

A needed class was not found. This could be due to an error in your runpath. Missing class: kafka/serializer/Encoder
java.lang.NoClassDefFoundError: kafka/serializer/Encoder
    at net.manub.embeddedkafka.Consumers.withStringConsumer(Consumers.scala:45)

I've noticed that I didn't have an Encoder class in my classpath. I probably don't need it, but it's part of the Codecs object and probably why it fails

https://github.com/apache/kafka/tree/2.0/core/src/main/scala/kafka/serializer

manub commented 6 years ago

Which version of EmbeddedKafka you're using? Currently we don't support 2.0.0 but I'm planning to release a 2.0.0 version over the weekend.

TomLous commented 6 years ago

Oh sorry you are right. I'm using 2.0.0 with your 1.1.1 lib. I did manage to work around by pulling the implicit serde out of the Codecs so it still works. Thanks!

francescopellegrini commented 5 years ago

Can we close this now?