i am getting below exception while running word count program in scala.
Exception in thread "main" java.lang.NoSuchMethodError: scala.Predef$.refArrayOps([Ljava/lang/Object;)Lscala/collection/mutable/ArrayOps;
at org.apache.spark.util.Utils$.getCallSite(Utils.scala:1406)
googling for the resolution i can understand this happens when there is a mismatch between spark and scala. my pam dependeny is
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>Test</groupId>
<artifactId>Test</artifactId>
<version>1.0-SNAPSHOT</version>
<dependencies>
<dependency>
<groupId>org.apache.spark</groupId>
<artifactId>spark-core_2.11</artifactId>
<version>2.1.0</version>
</dependency>
</dependencies>
</project>
and the scala version in project settings scala-sdk-2.11.8
Not sure what is wrong here.i have spent considerable amount of time in maven repository trying with different version combinations.
from my local spark installation i figured out the right scala version by running command scala.util.Properties.versionString
i have selected the same scala sdk for the project.but no luck.
your help is greatly appreciated.