java.lang.NoClassDefFoundError

com/google/common/util/concurrent/ThreadFactoryBuilder

Samebug tips9

Check if you didn't forget to instantiate your topic in the kafka broker.

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.

Don't give up yet. Our experts can help. Paste your full stack trace to get a solution.

Solutions on the web11011

  • com/google/common/util/concurrent/ThreadFactoryBuilder
  • via GitHub by sanchitaroy
    , 8 months ago
    com/google/common/util/concurrent/ThreadFactoryBuilder
  • com/google/common/util/concurrent/ThreadFactoryBuilder
  • Stack trace

    • java.lang.NoClassDefFoundError: com/google/common/util/concurrent/ThreadFactoryBuilder at org.apache.spark.util.Utils$.<init>(Utils.scala:636) at org.apache.spark.util.Utils$.<clinit>(Utils.scala) at org.apache.spark.repl.SparkILoop.<init>(SparkILoop.scala:134) at org.apache.spark.repl.SparkILoop.<init>(SparkILoop.scala:65) at org.apache.spark.repl.Main$.main(Main.scala:30) at org.apache.spark.repl.Main.main(Main.scala) 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.spark.deploy.SparkSubmit$.launch(SparkSubmit.scala:317) at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:73) at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala) Caused by: java.lang.ClassNotFoundException: com.google.common.util.concurrent.ThreadFactoryBuilder 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 sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) at java.lang.ClassLoader.loadClass(ClassLoader.java:358) ... 13 more

    Write tip

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

    Users with the same issue

    4 times, 1 month ago
    Once, 1 month ago
    Unknown user
    2 times, 3 months ago
    Unknown user
    Once, 5 months ago
    Unknown user
    Once, 6 months ago
    2376 more bugmates