Scalac: Error: CharRef object in intelliJ 14
I can compile the code from the terminal using the mvn compile command . But when I compile the code with intellij 14 I got the following error:
Error:scalac: Error: object CharRef does not have a member create
scala.reflect.internal.FatalError: object CharRef does not have a member create
at scala.reflect.internal.Definitions$DefinitionsClass.scala$reflect$internal$Definitions$DefinitionsClass$$fatalMissingSymbol(Definitions.scala:1179)
at ...
What could be the reason?
+3
source to share
4 answers
I had a similar problem while trying to work with some Scala examples for Spark.
Apparently the problem I was experiencing was caused by the incompatibility of the IntelliJ Scala project (3.11.7) and Spark Maven dependencies (2.10):
<dependency> <!-- Spark dependency -->
<groupId>org.apache.spark</groupId>
<artifactId>spark-core_2.10</artifactId>
<version>1.4.1</version>
<scope>provided</scope>
</dependency>
Once I changed spark-core_2.10 to spark-core_2.11 and rebuilt the project, everything started working as expected.
+1
source to share