spark-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From subash basnet <yasub...@gmail.com>
Subject class not found exception Logging while running JavaKMeansExample
Date Mon, 15 Aug 2016 16:48:24 GMT
Hello all,

I am trying to run JavaKMeansExample of the spark example project. I am
getting the classnotfound exception error:
*Exception in thread "main" java.lang.NoClassDefFoundError:
org/apache/spark/internal/Logging*
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:760)
at
jcom.dfki.spark.kmeans.KMeansSpark.JavaKMeansExample.main(JavaKMeansExample.java:43)
*Caused by: java.lang.ClassNotFoundException:
org.apache.spark.internal.Logging*
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)

I have added all the logging related dependencies as below:
<dependency> <groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId> <version>${slf4j.version}</version>
</dependency> <dependency> <groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId> <version>${slf4j.version}</version>
<scope>${hadoop.deps.scope}</scope> </dependency> <dependency>
<groupId>org.slf4j</groupId> <artifactId>jul-to-slf4j</artifactId>
<version>${slf4j.version}</version> </dependency> <dependency>
<groupId>org.slf4j</groupId> <artifactId>jcl-over-slf4j</artifactId>
<version>${slf4j.version}</version> <!-- <scope>runtime</scope>
--> <!--
more correct, but scalac 2.10.3 doesn't like it --> </dependency>
<dependency> <groupId>log4j</groupId> <artifactId>log4j</artifactId>
<version>${log4j.version}</version> </dependency> <dependency>
<groupId>commons-logging</groupId> <artifactId>commons-logging</artifactId>
<version>1.2</version> </dependency> What depedencies could I be missing,
any idea? Regards, Subash Basnet

Mime
View raw message