Updating project to Java 8 and Scala 2.11.1 won't compile

This is an existing project that has been working fine.  I upgraded to Java 8 and Scala 2.11.1.  From within Intellij I can not compile the project.  The same project can be compiled from the command line using maven.  The error in IDEA is:

scala: Error: org.jetbrains.jps.incremental.scala.remote.ServerException
Error compiling sbt component 'compiler-interface-2.11.1-52.0'
    at sbt.compiler.AnalyzingCompiler$$anonfun$compileSources$1$$anonfun$apply$2.apply(AnalyzingCompiler.scala:117)
    at sbt.compiler.AnalyzingCompiler$$anonfun$compileSources$1$$anonfun$apply$2.apply(AnalyzingCompiler.scala:114)
    at sbt.IO$.withTemporaryDirectory(IO.scala:281)
    at sbt.compiler.AnalyzingCompiler$$anonfun$compileSources$1.apply(AnalyzingCompiler.scala:114)
    at sbt.compiler.AnalyzingCompiler$$anonfun$compileSources$1.apply(AnalyzingCompiler.scala:111)
    at sbt.IO$.withTemporaryDirectory(IO.scala:281)
    at sbt.compiler.AnalyzingCompiler$.compileSources(AnalyzingCompiler.scala:111)
    at sbt.compiler.IC$.compileInterfaceJar(IncrementalCompiler.scala:31)
    at org.jetbrains.jps.incremental.scala.local.CompilerFactoryImpl$.org$jetbrains$jps$incremental$scala$local$CompilerFactoryImpl$$getOrCompileInterfaceJar(CompilerFactoryImpl.scala:65)
    at org.jetbrains.jps.incremental.scala.local.CompilerFactoryImpl$$anonfun$2.apply(CompilerFactoryImpl.scala:21)
    at org.jetbrains.jps.incremental.scala.local.CompilerFactoryImpl$$anonfun$2.apply(CompilerFactoryImpl.scala:20)
    at scala.Option.map(Option.scala:145)
    at org.jetbrains.jps.incremental.scala.local.CompilerFactoryImpl.createCompiler(CompilerFactoryImpl.scala:20)
    at org.jetbrains.jps.incremental.scala.local.CachingFactory$$anonfun$createCompiler$1.apply(CachingFactory.scala:20)
    at org.jetbrains.jps.incremental.scala.local.CachingFactory$$anonfun$createCompiler$1.apply(CachingFactory.scala:20)
    at org.jetbrains.jps.incremental.scala.local.Cache$$anonfun$getOrUpdate$2.apply(Cache.scala:20)
    at scala.Option.getOrElse(Option.scala:120)
    at org.jetbrains.jps.incremental.scala.local.Cache.getOrUpdate(Cache.scala:19)
    at org.jetbrains.jps.incremental.scala.local.CachingFactory.createCompiler(CachingFactory.scala:19)
    at org.jetbrains.jps.incremental.scala.local.LocalServer.compile(LocalServer.scala:21)
    at org.jetbrains.jps.incremental.scala.remote.Main$.nailMain(Main.scala:31)
    at org.jetbrains.jps.incremental.scala.remote.Main.nailMain(Main.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:483)
    at com.martiansoftware.nailgun.NGSession.run(Unknown Source)

2 comments

To get around this problem, on the Scala Facet I turned off the 'Use ordinary compiler' and selected the 'Use Project FSC'.  I then changed the FSC to use Scala 2.11.1  The project now compiles and runs.

0

Hi Daniel,
I would recommend you to upgrade to IDEA 13. It seems that there is no such issue there.

But your workaround is fine also.

0

Please sign in to leave a comment.