java.lang.NoClassDefFoundError

tip

A few things cause this exception: 1) Check if you have all jars and if they're in the correct path when running. 2) Your classpath might be broken, you can define it in the command line with "java -cp yourClassPath" or at your IDE if you're using one.

tip

Needs to add netty-transport-native-epoll with a OS classifier to the classpath, it's not included in netty-all

tip

This might be an issue with the file location in the Spark submit command. Try it with "spark-submit --master spark://master:7077 hello_world_from_pyspark.py {file location}"

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

  • invoke error with Scala code
    via GitHub by o-l-o
    ,
  • Getting started with OWL API
    via by Unknown author,
  • Kafka Consumer in Java
    via Stack Overflow by Zerbraxi
    ,
  • Error in spark-submit but not in pyspark
    via Stack Overflow by nanounanue
    ,
  • JMS Connection to Websphere Server
    via Stack Overflow by Jamie Coleman
    ,
  • GitHub comment 3625#126674820
    via GitHub by Dreampie
    ,
  • visual-c++: mai 2015
    via by Unknown author,
    • java.lang.NoClassDefFoundError: scala/Product at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:763) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) at java.net.URLClassLoader.defineClass(URLClassLoader.java:467) at java.net.URLClassLoader.access$100(URLClassLoader.java:73) at java.net.URLClassLoader$1.run(URLClassLoader.java:368) at java.net.URLClassLoader$1.run(URLClassLoader.java:362) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:361) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:348) at sun.reflect.generics.factory.CoreReflectionFactory.makeNamedType(CoreReflectionFactory.java:114) at sun.reflect.generics.visitor.Reifier.visitClassTypeSignature(Reifier.java:125) at sun.reflect.generics.tree.ClassTypeSignature.accept(ClassTypeSignature.java:49) at sun.reflect.generics.visitor.Reifier.reifyTypeArguments(Reifier.java:68) at sun.reflect.generics.visitor.Reifier.visitClassTypeSignature(Reifier.java:138) at sun.reflect.generics.tree.ClassTypeSignature.accept(ClassTypeSignature.java:49) at sun.reflect.generics.repository.ClassRepository.getSuperInterfaces(ClassRepository.java:108) at java.lang.Class.getGenericInterfaces(Class.java:913) Caused by: java.lang.ClassNotFoundException: scala.Product at java.net.URLClassLoader.findClass(URLClassLoader.java:381) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ... 21 more

    Users with the same issue

    marcbouvierdav
    364 times, last one,
    Matty
    1 times, last one,
    odd
    1 times, last one,
    tvrmsmith
    2 times, last one,
    Andreas Häber
    3 times, last one,
    1418 more bugmates