java.lang.ClassCastException: org.apache.flink.streaming.connectors.kafka.FlinkKafkaProducer cannot be cast to org.apache.flink.streaming.api.functions.source.SourceFunction

tip
Do you know that we can give you better hits? Get more relevant results from Samebug’s stack trace search.
  1. 0

    ClassCastException while running Flink

    Stack Overflow | 9 months ago | Soumyajit Chatterjee
    java.lang.ClassCastException: org.apache.flink.streaming.connectors.kafka.FlinkKafkaProducer cannot be cast to org.apache.flink.streaming.api.functions.source.SourceFunction

    Root Cause Analysis

    1. java.lang.ClassCastException

      org.apache.flink.streaming.connectors.kafka.FlinkKafkaProducer cannot be cast to org.apache.flink.streaming.api.functions.source.SourceFunction

      at com.dataartisans.ReadFromKafka.main()
    2. com.dataartisans
      ReadFromKafka.main
      1. com.dataartisans.ReadFromKafka.main(ReadFromKafka.java:57)
      1 frame
    3. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      4. java.lang.reflect.Method.invoke(Method.java:497)
      4 frames
    4. IDEA
      AppMain.main
      1. com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)
      1 frame