java.lang.NoClassDefFoundError

If you like a tip written by other Samebug users, mark is as helpful! Marks help our algorithm provide you better solutions and also help other users.
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.

  • Cannot deploy to standalone jar file
    via by CInglez,
  • jax-ws standalone client null pointer exception
    via by user3653687,
  • 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
    ,
    • java.lang.NoClassDefFoundError: com/sun/xml/ws/spi/ProviderImpl at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(Unknown Source) at java.security.SecureClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.access$100(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at java.util.ServiceLoader$LazyIterator.nextService(Unknown Source) at java.util.ServiceLoader$LazyIterator.next(Unknown Source) at java.util.ServiceLoader$1.next(Unknown Source) at javax.xml.ws.spi.Provider.getProviderUsingServiceLoader(Unknown Source) at javax.xml.ws.spi.Provider.provider(Unknown Source) at javax.xml.ws.Service.<init>(Unknown Source) at ediMSV.ALRService.<init>(ALRService.java:46) at ediMSV.wssimpleClient.<init>(wssimpleClient.java:32) at ediMSV.transactionSet.main(transactionSet.java:23) at ediMSV.executeEDI.main(executeEDI.java:46) Caused by: java.lang.ClassNotFoundException: com.sun.xml.ws.spi.ProviderImpl at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) ... 24 more

    Users with the same issue

    Andreas Häber
    3 times, last one,
    Unknown visitor1 times, last one,
    rocday
    2 times, last one,
    junior_cEngineer
    1 times, last one,
    Matty
    1 times, last one,
    1418 more bugmates