Home » Java » java – spark-streaming-twitter_2.10-1.6.0.jar of simple-spark-project build path is cross-compiled with an incompatible version of Scala (2.10.0)-Exceptionshub

java – spark-streaming-twitter_2.10-1.6.0.jar of simple-spark-project build path is cross-compiled with an incompatible version of Scala (2.10.0)-Exceptionshub

Posted by: admin February 25, 2020 Leave a comment

Questions:

I am trying to build an app with Scala IDE for purposes of fetching the data streams from Twitter (Spark service). However, I am unable to build my solution, due to following error:
– spark-streaming-twitter_2.11.8-1.6.0.jar of simple-spark-project build path is cross-compiled with an incompatible version of Scala (2.11.8). In case this report is mistaken, this check can be disabled in the compiler preference page.

I read articles on similar topic, where one of them was:
1. Spark 1.6 dependencies cross compiled with scala 2.11.0

Here is how my “pom.xml” files looks like:

<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>com.spark.tutorial</groupId>
  <artifactId>simple-spark-project</artifactId>
  <version>1.0</version>
  <name>simple spark project</name>
  <packaging>jar</packaging>
  <dependencies>

 <dependency>
    <groupId>org.apache.spark</groupId>
    <artifactId>spark-streaming-twitter_2.10</artifactId>
    <version>1.6.0</version>
</dependency>

<dependency>
    <groupId>com.sparkjava</groupId>
    <artifactId>spark-core</artifactId>
    <version>2.5</version>
</dependency>

</dependencies>
</project>

Despite everything, I am still unable to match the Scala and Spark versions, so any help would be very appreciated.

How to&Answers: