I am trying to run a mapreduce program written in scala. I have included scala-library in the classpath. While running the program my program throws following error.
$hadoop jar ~/HadoopScala.jar com.learning.spark.WordCount /input/wordcountinput.csv /output -libjars ~/lib/org.scala-lang.scala-library_2.12.2.v20170412-161608-VFINAL-21d12e9.jar Exception in thread "main" java.lang.NoClassDefFoundError: scala/Predef$ at com.learning.spark.WordCount$.main(WordCount.scala:52) at com.learning.spark.WordCount.main(WordCount.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.hadoop.util.RunJar.run(RunJar.java:234) at org.apache.hadoop.util.RunJar.main(RunJar.java:148) Caused by: java.lang.ClassNotFoundException: scala.Predef$ at java.net.URLClassLoader.findClass(URLClassLoader.java:381) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
scala.Predef$ is available in scala-library. What could be causing this error.