Duplication error on Kafka Connector Libraries

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Duplication error on Kafka Connector Libraries

Kevin Kwon
Hi community, I'm testing out 1.12-SNAPSHOT in master branch

I built my application with library 'flink-connector-kafka' but when I start the app, I get

Caused by: org.apache.kafka.common.KafkaException: class org.apache.kafka.common.serialization.ByteArrayDeserializer is not an instance of org.apache.kafka.common.serialization.Deserializer

while constructing KafkaConsumer class. Is this normal behavior?
Reply | Threaded
Open this post in threaded view
|

Re: Duplication error on Kafka Connector Libraries

Arvid Heise-3
The most common cause of such issues is usually class loading.

You probably have added the flink-connector-kafka also to flink-dist/libs. But the connector is only meant to be bundled with your job jar afaik. Right now, you have the Kafka classes loaded in the user code classloader and in the system classloader of Flink itself.

On Fri, Nov 27, 2020 at 12:24 AM Kevin Kwon <[hidden email]> wrote:
Hi community, I'm testing out 1.12-SNAPSHOT in master branch

I built my application with library 'flink-connector-kafka' but when I start the app, I get

Caused by: org.apache.kafka.common.KafkaException: class org.apache.kafka.common.serialization.ByteArrayDeserializer is not an instance of org.apache.kafka.common.serialization.Deserializer

while constructing KafkaConsumer class. Is this normal behavior?


--

Arvid Heise | Senior Java Developer


Follow us @VervericaData

--

Join Flink Forward - The Apache Flink Conference

Stream Processing | Event Driven | Real Time

--

Ververica GmbH | Invalidenstrasse 115, 10115 Berlin, Germany

--

Ververica GmbH
Registered at Amtsgericht Charlottenburg: HRB 158244 B
Managing Directors: Timothy Alexander Steinert, Yip Park Tung Jason, Ji (Toni) Cheng