Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NoClassDefFoundError #2

Open
ToraNova opened this issue Apr 4, 2019 · 0 comments
Open

NoClassDefFoundError #2

ToraNova opened this issue Apr 4, 2019 · 0 comments

Comments

@ToraNova
Copy link

ToraNova commented Apr 4, 2019

Greetings ! I am facing a problem when creating a yggdrasil object.

While trying to run this line to check if I have loaded the module correctly :

Main.scala:13: val dt = new YggdrasilClassifier()

I got the following output :

[error] (run-main-0) java.lang.NoClassDefFoundError: org/apache/spark/ml/param/shared/HasCheckpointInterval$class
[error] java.lang.NoClassDefFoundError: org/apache/spark/ml/param/shared/HasCheckpointInterval$class
[error] 	at org.apache.spark.ml.tree.impl.YggdrasilClassifier.<init>(Yggdrasil.scala:40)
[error] 	at org.apache.spark.ml.tree.impl.YggdrasilClassifier.<init>(Yggdrasil.scala:44)
[error] 	at Main$.main(Main.scala:13)
[error] 	at Main.main(Main.scala)
[error] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[error] 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[error] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[error] 	at java.lang.reflect.Method.invoke(Method.java:498)
[error] Caused by: java.lang.ClassNotFoundException: org.apache.spark.ml.param.shared.HasCheckpointInterval$class
[error] 	at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
[error] 	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
[error] 	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
[error] 	at org.apache.spark.ml.tree.impl.YggdrasilClassifier.<init>(Yggdrasil.scala:40)
[error] 	at org.apache.spark.ml.tree.impl.YggdrasilClassifier.<init>(Yggdrasil.scala:44)
[error] 	at Main$.main(Main.scala:13)
[error] 	at Main.main(Main.scala)
[error] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[error] 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[error] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[error] 	at java.lang.reflect.Method.invoke(Method.java:498)
[error] Nonzero exit code: 1
[error] (Compile / run) Nonzero exit code: 1
[error] Total time: 36 s, completed Apr 4, 2019 10:51:30 PM

I would like to know if I there is anything that I missed out ?

using spark 2.4.0, scala 2.12.8.
following is part of by build.sbt

resolvers += "Spark Packages Repo" at "http://dl.bintray.com/spark-packages/maven"

// Want to use a published library in your project?
// You can define other libraries as dependencies in your build like this:
libraryDependencies += "org.typelevel" %% "cats-core" % "1.6.0"
libraryDependencies += "org.scala-lang.modules" %% "scala-parser-combinators" % "1.1.0"
libraryDependencies += "fabuzaid21" % "yggdrasil" % "1.0.1"

val sparkVersion = "2.4.0"
libraryDependencies ++= Seq(
  "org.apache.spark" %% "spark-core" % sparkVersion,
  "org.apache.spark" %% "spark-streaming" % sparkVersion,
  "org.apache.spark" %% "spark-sql" % sparkVersion,
  "org.apache.spark" %% "spark-mllib" % sparkVersion
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant