Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-3565

FlinkKafkaConsumer does not work with Scala 2.11

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Blocker
    • Resolution: Fixed
    • 1.0.0
    • 1.0.0, 1.1.0
    • None
    • None

    Description

      Running a program built against Flink_2.11 dependencies fails on a Flink_2.11 cluster with this exception:

      java.lang.NoClassDefFoundError: scala/collection/GenTraversableOnce$class
      at kafka.utils.Pool.<init>(Pool.scala:28)
      at kafka.consumer.FetchRequestAndResponseStatsRegistry$.<init>(FetchRequestAndResponseStats.scala:60)
      at kafka.consumer.FetchRequestAndResponseStatsRegistry$.<clinit>(FetchRequestAndResponseStats.scala)
      at kafka.consumer.SimpleConsumer.<init>(SimpleConsumer.scala:39)
      at kafka.javaapi.consumer.SimpleConsumer.<init>(SimpleConsumer.scala:34)
      at org.apache.flink.streaming.connectors.kafka.FlinkKafkaConsumer08.getPartitionsForTopic(FlinkKafkaConsumer08.java:518)
      at org.apache.flink.streaming.connectors.kafka.FlinkKafkaConsumer08.<init>(FlinkKafkaConsumer08.java:218)
      at org.apache.flink.streaming.connectors.kafka.FlinkKafkaConsumer08.<init>(FlinkKafkaConsumer08.java:193)
      at org.apache.flink.streaming.connectors.kafka.FlinkKafkaConsumer08.<init>(FlinkKafkaConsumer08.java:160)
      at com.dataartisans.querywindow.WindowJob.main(WindowJob.java:93)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:606)
      at org.apache.flink.client.program.PackagedProgram.callMainMethod(PackagedProgram.java:505)
      at org.apache.flink.client.program.PackagedProgram.invokeInteractiveModeForExecution(PackagedProgram.java:403)
      at org.apache.flink.client.program.Client.runBlocking(Client.java:248)
      at org.apache.flink.client.CliFrontend.executeProgramBlocking(CliFrontend.java:866)
      at org.apache.flink.client.CliFrontend.run(CliFrontend.java:333)
      at org.apache.flink.client.CliFrontend.parseParameters(CliFrontend.java:1189)
      at org.apache.flink.client.CliFrontend.main(CliFrontend.java:1239)
      Caused by: java.lang.ClassNotFoundException: scala.collection.GenTraversableOnce$class
      at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
      at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
      ... 21 more

      Attachments

        Issue Links

          Activity

            People

              mxm Maximilian Michels
              aljoscha Aljoscha Krettek
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: