java.lang.NoClassDefFoundError: scala/collection/GenTraversableOnce$class

Apache's JIRA Issue Tracker | Aljoscha Krettek | 1 year ago
tip
Do you find the tips below useful? Click on the to mark them and say thanks to Rafael Fischer Viola . Or join the community to write better ones.
  1. 0

    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

    Apache's JIRA Issue Tracker | 1 year ago | Aljoscha Krettek
    java.lang.NoClassDefFoundError: scala/collection/GenTraversableOnce$class
  2. 0

    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

    Apache's JIRA Issue Tracker | 1 year ago | Aljoscha Krettek
    java.lang.NoClassDefFoundError: scala/collection/GenTraversableOnce$class
  3. 0

    Apache Flink User Mailing List archive. - Simple Flink - Kafka Test

    nabble.com | 7 months ago
    java.lang.NoClassDefFoundError: scala/collection/GenTraversableOnce$class
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Iam running a Storm topology , getting java.lang.NoClassDefFoundError: scala/reflect/ClassManifest

    Google Groups | 3 years ago | Madhava reddy
    java.lang.NoClassDefFoundError: scala/reflect/ClassManifest
  6. 0
    samebug tip
    This exception normally means you either have to add the said class to your dependencies or you miswrote it. Look in the documentation of your library how to add it as a dependency.
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.lang.ClassNotFoundException

    scala.collection.GenTraversableOnce$class

    at java.net.URLClassLoader$1.run()
  2. Java RT
    ClassLoader.loadClass
    1. java.net.URLClassLoader$1.run(URLClassLoader.java:366)
    2. java.net.URLClassLoader$1.run(URLClassLoader.java:355)
    3. java.security.AccessController.doPrivileged(Native Method)
    4. java.net.URLClassLoader.findClass(URLClassLoader.java:354)
    5. java.lang.ClassLoader.loadClass(ClassLoader.java:425)
    6. java.lang.ClassLoader.loadClass(ClassLoader.java:358)
    6 frames
  3. Apache Kafka
    SimpleConsumer.<init>
    1. kafka.utils.Pool.<init>(Pool.scala:28)
    2. kafka.consumer.FetchRequestAndResponseStatsRegistry$.<init>(FetchRequestAndResponseStats.scala:60)
    3. kafka.consumer.FetchRequestAndResponseStatsRegistry$.<clinit>(FetchRequestAndResponseStats.scala)
    4. kafka.consumer.SimpleConsumer.<init>(SimpleConsumer.scala:39)
    5. kafka.javaapi.consumer.SimpleConsumer.<init>(SimpleConsumer.scala:34)
    5 frames
  4. org.apache.flink
    FlinkKafkaConsumer08.<init>
    1. org.apache.flink.streaming.connectors.kafka.FlinkKafkaConsumer08.getPartitionsForTopic(FlinkKafkaConsumer08.java:518)
    2. org.apache.flink.streaming.connectors.kafka.FlinkKafkaConsumer08.<init>(FlinkKafkaConsumer08.java:218)
    3. org.apache.flink.streaming.connectors.kafka.FlinkKafkaConsumer08.<init>(FlinkKafkaConsumer08.java:193)
    4. org.apache.flink.streaming.connectors.kafka.FlinkKafkaConsumer08.<init>(FlinkKafkaConsumer08.java:160)
    4 frames
  5. com.dataartisans.querywindow
    WindowJob.main
    1. com.dataartisans.querywindow.WindowJob.main(WindowJob.java:93)
    1 frame
  6. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    4. java.lang.reflect.Method.invoke(Method.java:606)
    4 frames
  7. flink-clients
    CliFrontend.main
    1. org.apache.flink.client.program.PackagedProgram.callMainMethod(PackagedProgram.java:505)
    2. org.apache.flink.client.program.PackagedProgram.invokeInteractiveModeForExecution(PackagedProgram.java:403)
    3. org.apache.flink.client.program.Client.runBlocking(Client.java:248)
    4. org.apache.flink.client.CliFrontend.executeProgramBlocking(CliFrontend.java:866)
    5. org.apache.flink.client.CliFrontend.run(CliFrontend.java:333)
    6. org.apache.flink.client.CliFrontend.parseParameters(CliFrontend.java:1189)
    7. org.apache.flink.client.CliFrontend.main(CliFrontend.java:1239)
    7 frames