java.lang.NoClassDefFoundError

ml/dmlc/xgboost4j/scala/spark/XGBoost$


Samebug tips9

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.

If you're using Hibernate, this indicates you're missing FasterXML Classmate dependency, which you can add to your dependencies. To add it, the groupId is com.fasterxml and artifactId is Classmate.

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


Solutions on the web962

Solution icon of github
ml/dmlc/xgboost4j/scala/spark/XGBoost$

Solution icon of googlegroups
via Google Groups by Sotiris Orfanou, 1 year ago
bagel/src/main/scala/spark/bagel/examples/WikipediaPageRankStandalone Caused by: java.lang.ClassNotFoundException: bagel.src.main.scala.spark.bagel.examples.WikipediaPageRankStandalone

Solution icon of googlegroups
via Google Groups by David Kerber, 1 year ago
ianywhere/ml/jdbcodbc/ASAMessageHandler

Solution icon of coderanch
via Coderanch by Joe Harry, 7 months ago
scala/ScalaObject

Solution icon of github
via GitHub by Dumbris
, 1 year ago
scala/ScalaObject

Solution icon of github
via GitHub by Kaijiro
, 1 year ago
scala/LowPriorityImplicits

Solution icon of github
via GitHub by 06needhamt
, 10 months ago
scala/Product

Solution icon of github
via GitHub by stuhood
, 1 year ago
scala/ScalaObject

Solution icon of github
via GitHub by Sidorion
, 1 year ago
scala/Function1

Solution icon of github
scala/Serializable

Stack trace

  • java.lang.NoClassDefFoundError: ml/dmlc/xgboost4j/scala/spark/XGBoost$ at DistTrainWithSpark$.main(DistTrainWithSpark.scala:36) at DistTrainWithSpark.main(DistTrainWithSpark.scala) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.apache.spark.deploy.SparkSubmit$.org$apache$spark$deploy$SparkSubmit$$runMain(SparkSubmit.scala:728) at org.apache.spark.deploy.SparkSubmit$.doRunMain$1(SparkSubmit.scala:177) at org.apache.spark.deploy.SparkSubmit$.submit(SparkSubmit.scala:202) at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:116) at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala) Caused by: java.lang.ClassNotFoundException: ml.dmlc.xgboost4j.scala.spark.XGBoost$ at java.net.URLClassLoader.findClass(URLClassLoader.java:381) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at java.lang.ClassLoader.loadClass(ClassLoader.java:357)

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

Samebug visitor profile picture
Unknown user
2 times, 1 week ago
4 times, 1 week ago
3 times, 4 weeks ago
Once, 1 month ago
Samebug visitor profile picture
Unknown user
Once, 1 month ago
2433 more bugmates