Error when running Scala project - class scala.deprecatedInheritance in compiler mirror not found - scala

Im new to java and Scala.
I have downloaded IntelliJ 13.1 and Im trying to run this project (Goose text extractor) as is: https://github.com/GravityLabs/goose
Im using JDK 1.7.0_67 with these project structure settings:
When Im trying to run the file TalkToMeGoose.scala Im getting this error:
Error:scalac: Error: class scala.deprecatedInheritance in compiler mirror not found. scala.reflect.internal.MissingRequirementError: class scala.deprecatedInheritance in compiler mirror not found.
at scala.reflect.internal.MissingRequirementError$.signal(MissingRequirementError.scala:17)
at scala.reflect.internal.MissingRequirementError$.notFound(MissingRequirementError.scala:18)
at scala.reflect.internal.Mirrors$RootsBase.getModuleOrClass(Mirrors.scala:53)
at scala.reflect.internal.Mirrors$RootsBase.getModuleOrClass(Mirrors.scala:66)
at scala.reflect.internal.Mirrors$RootsBase.getClassByName(Mirrors.scala:102)
at scala.reflect.internal.Mirrors$RootsBase.getRequiredClass(Mirrors.scala:105)
at scala.reflect.internal.Mirrors$RootsBase.requiredClass(Mirrors.scala:108)
at scala.reflect.internal.Definitions$DefinitionsClass.DeprecatedInheritanceAttr$lzycompute(Definitions.scala:1101)
at scala.reflect.internal.Definitions$DefinitionsClass.DeprecatedInheritanceAttr(Definitions.scala:1101)
at scala.reflect.internal.Symbols$Symbol.hasDeprecatedInheritanceAnnotation(Symbols.scala:842)
at scala.tools.nsc.typechecker.Typers$Typer.scala$tools$nsc$typechecker$Typers$Typer$$validateParentClass$1(Typers.scala:1675)
at scala.tools.nsc.typechecker.Typers$Typer.validateParentClasses(Typers.scala:1706)
at scala.tools.nsc.typechecker.Typers$Typer.typedTemplate(Typers.scala:1864)
at scala.tools.nsc.typechecker.Typers$Typer.typedClassDef(Typers.scala:1738)
at scala.tools.nsc.typechecker.Typers$Typer.typedMemberDef$1(Typers.scala:5206)
at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5256)
at scala.tools.nsc.typechecker.Typers$Typer.runTyper$1(Typers.scala:5293)
at scala.tools.nsc.typechecker.Typers$Typer.scala$tools$nsc$typechecker$Typers$Typer$$typedInternal(Typers.scala:5320)
at scala.tools.nsc.typechecker.Typers$Typer.body$2(Typers.scala:5267)
at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5271)
at scala.tools.nsc.typechecker.Typers$Typer.typedByValueExpr(Typers.scala:5349)
at scala.tools.nsc.typechecker.Typers$Typer.scala$tools$nsc$typechecker$Typers$Typer$$typedStat$1(Typers.scala:2985)
at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$61.apply(Typers.scala:3089)
at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$61.apply(Typers.scala:3089)
at scala.collection.immutable.List.loop$1(List.scala:172)
at scala.collection.immutable.List.mapConserve(List.scala:188)
at scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:3089)
at scala.tools.nsc.typechecker.Typers$Typer.typedPackageDef$1(Typers.scala:4916)
at scala.tools.nsc.typechecker.Typers$Typer.typedMemberDef$1(Typers.scala:5209)
at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5256)
at scala.tools.nsc.typechecker.Typers$Typer.runTyper$1(Typers.scala:5293)
at scala.tools.nsc.typechecker.Typers$Typer.scala$tools$nsc$typechecker$Typers$Typer$$typedInternal(Typers.scala:5320)
at scala.tools.nsc.typechecker.Typers$Typer.body$2(Typers.scala:5267)
at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5271)
at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5345)
at scala.tools.nsc.typechecker.Analyzer$typerFactory$$anon$3.apply(Analyzer.scala:102)
at scala.tools.nsc.Global$GlobalPhase.applyPhase(Global.scala:410)
at scala.tools.nsc.typechecker.Analyzer$typerFactory$$anon$3$$anonfun$run$1.apply(Analyzer.scala:94)
at scala.tools.nsc.typechecker.Analyzer$typerFactory$$anon$3$$anonfun$run$1.apply(Analyzer.scala:93)
at scala.collection.Iterator$class.foreach(Iterator.scala:743)
at scala.collection.AbstractIterator.foreach(Iterator.scala:1177)
at scala.tools.nsc.typechecker.Analyzer$typerFactory$$anon$3.run(Analyzer.scala:93)
at scala.tools.nsc.Global$Run.compileUnitsInternal(Global.scala:1557)
at scala.tools.nsc.Global$Run.compileUnits(Global.scala:1542)
at scala.tools.nsc.Global$Run.compileSources(Global.scala:1537)
at scala.tools.nsc.Global$Run.compile(Global.scala:1644)
at xsbt.CachedCompiler0.run(CompilerInterface.scala:126)
at xsbt.CachedCompiler0.run(CompilerInterface.scala:102)
at xsbt.CompilerInterface.run(CompilerInterface.scala:27)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at sbt.compiler.AnalyzingCompiler.call(AnalyzingCompiler.scala:102)
at sbt.compiler.AnalyzingCompiler.compile(AnalyzingCompiler.scala:48)
at sbt.compiler.AnalyzingCompiler.compile(AnalyzingCompiler.scala:41)
at org.jetbrains.jps.incremental.scala.local.IdeaIncrementalCompiler.compile(IdeaIncrementalCompiler.scala:28)
at org.jetbrains.jps.incremental.scala.local.LocalServer.compile(LocalServer.scala:26)
at org.jetbrains.jps.incremental.scala.remote.Main$.make(Main.scala:64)
at org.jetbrains.jps.incremental.scala.remote.Main$.nailMain(Main.scala:22)
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:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.martiansoftware.nailgun.NGSession.run(NGSession.java:319)
couldn't find anything relevant on Google...

So to resume my comments:
The compiler library you should use is : Maven: org.scala-lang:scala-compiler-bundle:2.9.0-1
I don't know why it haven't been created when you opened the Goose project.
But you can create it yourself:
Open the library settings and spot where your system download the maven libraries by clicking eg on: Maven: org.scala-lang:scala-library:2.9.0-1.
Then click on New Project Library, and add to it both Maven: org.scala-lang:scala-library:2.9.0-1 and Maven: org.scala-lang:scala-compiler:2.9.0-1. The file selector has an option to display hidden directories, which can be useful.
Then go in the Module settings and change the Scala compiler to the library you just created. (It may take a few seconds before appearing in the list of libraries).
It should work fine.

I am able to compile goose with maven on the command line. It requires Scala 2.9.0. Please check the version of Scala compiler used by IDEA 13.1. If there are version differences, you can get such an error. Refer http://grokbase.com/t/gg/scala-ide-user/143ntm6n3p/switching-scala-library-version-to-match-project

Related

Joda Time - Cannot run JUnit tests in Eclipse or IntelliJ

I cloned the joda-time GitHub repository locally, imported it as a Maven project in both Eclipse and IntelliJ Idea and it built absolutelly fine in both IDEs. But when trying to run the JUnit tests it just will not work in either IDE and I cannot see what the issue is.
I know that I need to create an additional folder
src\tz-data\org\joda\time\tz\data
and place in there the two files
CET
ZoneInfoMap
and I have done all that.
The JUnit tests still do not run and the funny thing is that I get completelly different errors under Eclipse:
java.lang.ExceptionInInitializerError
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestLoader.getTest(JUnit3TestLoader.java:100)
at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestLoader.loadTests(JUnit3TestLoader.java:51)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:444)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:678)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
Caused by: java.lang.IllegalArgumentException: The datetime zone id 'Europe/Paris' is not recognised
at org.joda.time.DateTimeZone.forID(DateTimeZone.java:234)
at org.joda.time.TestLocalDate_Basics.<clinit>(TestLocalDate_Basics.java:50)
... 10 more
and under IntelliJ Idea:
Exception in thread "main" java.lang.NoClassDefFoundError: Could not initialize class org.joda.time.TestAbstractPartial
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at junit.framework.TestSuite.createTest(TestSuite.java:58)
at junit.framework.TestSuite.addTestMethod(TestSuite.java:280)
at junit.framework.TestSuite.<init>(TestSuite.java:140)
at com.intellij.junit3.TestRunnerUtil.createClassOrMethodSuite(TestRunnerUtil.java:147)
at com.intellij.junit3.TestAllInPackage2.<init>(TestAllInPackage2.java:32)
at com.intellij.junit3.TestRunnerUtil.getTestSuite(TestRunnerUtil.java:78)
at com.intellij.junit3.JUnit3IdeaTestRunner.startRunnerWithArgs(JUnit3IdeaTestRunner.java:43)
at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:51)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)
Any tips on how to get around this would be really appreciated.
I am new to maven and it turns out the issue was with the way I was trying to run the tests.
As noted by roby, I should have used the maven bar in IntelliJ to run the correct maven goal (simmilarly, I should have used Run As.. and the correct maven goal in Eclipse), whereas I was just trying to run the tests by using the IDE, i.e. right click on the project and 'Run All Tests' which understandably did not work as it was not using the correct configuration.

Copied IntelliJ project machine A to B, but it won't build on B

I have IntelliJ, Scala and SBT at work (Win8) and on my laptop (OSX). I've never had a problem like this before. I'm stuck in a hotel because of weather, and I have a copy of my IDEA project on my laptop. I tried building the project on my laptop, and it failed with the message below. As far as I know I have all the dependent JARs, the latest plugins, etc. I don't think I'm missing anything. But I'm mystified how something so simple could eat up time that could be spent programming while I try to figure out what went wrong after zipping and copying an IntelliJ project from one machine to another.
Error:scalac: Error: xsbt.CompilerInterface
java.lang.ClassNotFoundException: xsbt.CompilerInterface
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:249)
at sbt.compiler.AnalyzingCompiler.getInterfaceClass(AnalyzingCompiler.scala:117)
at sbt.compiler.AnalyzingCompiler.call(AnalyzingCompiler.scala:99)
at sbt.compiler.AnalyzingCompiler.newCachedCompiler(AnalyzingCompiler.scala:57)
at sbt.compiler.AnalyzingCompiler.newCachedCompiler(AnalyzingCompiler.scala:52)
at sbt.compiler.CompilerCache$$anon$2.apply(CompilerCache.scala:50)
at sbt.compiler.AnalyzingCompiler.compile(AnalyzingCompiler.scala:39)
at org.jetbrains.jps.incremental.scala.local.IdeaIncrementalCompiler.compile(IdeaIncrementalCompiler.scala:29)
at org.jetbrains.jps.incremental.scala.local.LocalServer.compile(LocalServer.scala:26)
at org.jetbrains.jps.incremental.scala.remote.Main$.make(Main.scala:62)
at org.jetbrains.jps.incremental.scala.remote.Main$.nailMain(Main.scala:20)
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:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.martiansoftware.nailgun.NGSession.run(NGSession.java:319)
Suggestions:
use "Import project" instead of File|Open. Select sbt project
ensure you have access to internet
build the project first on the command line . e.g
sbt compile package
or
sbt compile assembly
- rebuild the project in the IDE (Yes painful, but it is a known bug)
Get back here if you still encounter issues.
It seems the problem with updating IDEA to version 14. Try removing the JDK from IDEA and adding it again. It should work.

Why does IDEA report "Error:scalac: error while loading Object, Missing dependency 'object scala in compiler mirror'" building scala breeze?

The breeze project builds fine from command line sbt:
sbt package
...
info] Done packaging.
[info] Packaging /shared/breeze/viz/target/scala-2.11/breeze-viz_2.11-0.11-SNAPSHOT.jar ...
[info] Done packaging.
[success] Total time: 238 s, completed Jan 27, 2015 9:40:03 AM
However , the following error comes up repeatedly when doing Build|Rebuild Project in IntelliJ IDEA 14:
Error:scalac: error while loading Object, Missing dependency 'object scala in compiler mirror', required by /Library/Java/JavaVirtualMachines/jdk1.7.0_25.jdk/Contents/Home/jre/lib/rt.jar(java/lang/Object.class)
Here is the full stacktrace:
Error:scalac: Error: scala.tools.nsc.typechecker.Namers$Namer.enterExistingSym(Lscala/reflect/internal/Symbols$Symbol;)Lscala/tools/nsc/typechecker/Contexts$Context;
java.lang.NoSuchMethodError: scala.tools.nsc.typechecker.Namers$Namer.enterExistingSym(Lscala/reflect/internal/Symbols$Symbol;)Lscala/tools/nsc/typechecker/Contexts$Context;
at org.scalamacros.paradise.typechecker.Namers$Namer$class.enterSym(Namers.scala:41)
at org.scalamacros.paradise.typechecker.Namers$$anon$3.enterSym(Namers.scala:13)
at org.scalamacros.paradise.typechecker.AnalyzerPlugins$MacroPlugin$.pluginsEnterSym(AnalyzerPlugins.scala:35)
at scala.tools.nsc.typechecker.AnalyzerPlugins$$anon$13.custom(AnalyzerPlugins.scala:429)
at scala.tools.nsc.typechecker.AnalyzerPlugins$$anonfun$2.apply(AnalyzerPlugins.scala:371)
at scala.tools.nsc.typechecker.AnalyzerPlugins$$anonfun$2.apply(AnalyzerPlugins.scala:371)
at scala.collection.immutable.List.map(List.scala:273)
at scala.tools.nsc.typechecker.AnalyzerPlugins$class.invoke(AnalyzerPlugins.scala:371)
at scala.tools.nsc.typechecker.AnalyzerPlugins$class.pluginsEnterSym(AnalyzerPlugins.scala:423)
at scala.tools.nsc.Global$$anon$1.pluginsEnterSym(Global.scala:463)
at scala.tools.nsc.typechecker.Namers$Namer.enterSym(Namers.scala:274)
at scala.tools.nsc.typechecker.Namers$Namer$$anonfun$enterSyms$1.apply(Namers.scala:500)
at scala.tools.nsc.typechecker.Namers$Namer$$anonfun$enterSyms$1.apply(Namers.scala:499)
at scala.collection.LinearSeqOptimized$class.foldLeft(LinearSeqOptimized.scala:124)
at scala.collection.immutable.List.foldLeft(List.scala:84)
at scala.tools.nsc.typechecker.Namers$Namer.enterSyms(Namers.scala:499)
at scala.tools.nsc.typechecker.Namers$Namer.templateSig(Namers.scala:925)
at scala.tools.nsc.typechecker.Namers$Namer.moduleSig(Namers.scala:989)
at scala.tools.nsc.typechecker.Namers$Namer.getSig$1(Namers.scala:1526)
at scala.tools.nsc.typechecker.Namers$Namer.typeSig(Namers.scala:1541)
at scala.tools.nsc.typechecker.Namers$Namer$$anonfun$monoTypeCompleter$1$$anonfun$apply$1.apply$mcV$sp(Namers.scala:781)
at scala.tools.nsc.typechecker.Namers$Namer$$anonfun$monoTypeCompleter$1$$anonfun$apply$1.apply(Namers.scala:780)
at scala.tools.nsc.typechecker.Namers$Namer$$anonfun$monoTypeCompleter$1$$anonfun$apply$1.apply(Namers.scala:780)
at scala.tools.nsc.typechecker.Namers$Namer.scala$tools$nsc$typechecker$Namers$Namer$$logAndValidate(Namers.scala:1568)
at scala.tools.nsc.typechecker.Namers$Namer$$anonfun$monoTypeCompleter$1.apply(Namers.scala:780)
at scala.tools.nsc.typechecker.Namers$Namer$$anonfun$monoTypeCompleter$1.apply(Namers.scala:772)
at scala.tools.nsc.typechecker.Namers$$anon$1.completeImpl(Namers.scala:1684)
at scala.tools.nsc.typechecker.Namers$LockingTypeCompleter$class.complete(Namers.scala:1692)
at scala.tools.nsc.typechecker.Namers$$anon$1.complete(Namers.scala:1682)
at scala.reflect.internal.Symbols$Symbol.info(Symbols.scala:1483)
at scala.reflect.internal.SymbolTable.openPackageModule(SymbolTable.scala:286)
at scala.tools.nsc.typechecker.Analyzer$packageObjects$$anon$2$$anon$4.traverse(Analyzer.scala:63)
at scala.tools.nsc.typechecker.Analyzer$packageObjects$$anon$2$$anon$4.traverse(Analyzer.scala:59)
at scala.reflect.api.Trees$Traverser$$anonfun$traverseStats$1$$anonfun$apply$1.apply$mcV$sp(Trees.scala:2498)
at scala.reflect.api.Trees$Traverser.atOwner(Trees.scala:2507)
at scala.reflect.api.Trees$Traverser.traverseStats(Trees.scala:2497)
at scala.reflect.internal.Trees$class.itraverse(Trees.scala:1326)
at scala.reflect.internal.SymbolTable.itraverse(SymbolTable.scala:16)
at scala.reflect.internal.SymbolTable.itraverse(SymbolTable.scala:16)
at scala.reflect.api.Trees$Traverser.traverse(Trees.scala:2475)
at scala.tools.nsc.typechecker.Analyzer$packageObjects$$anon$2$$anon$4.traverse(Analyzer.scala:66)
at scala.tools.nsc.typechecker.Analyzer$packageObjects$$anon$2$$anon$4.traverse(Analyzer.scala:59)
at scala.reflect.api.Trees$Traverser$$anonfun$traverseStats$1$$anonfun$apply$1.apply$mcV$sp(Trees.scala:2498)
at scala.reflect.api.Trees$Traverser.atOwner(Trees.scala:2507)
at scala.reflect.api.Trees$Traverser.traverseStats(Trees.scala:2497)
at scala.reflect.internal.Trees$class.itraverse(Trees.scala:1326)
at scala.reflect.internal.SymbolTable.itraverse(SymbolTable.scala:16)
at scala.reflect.internal.SymbolTable.itraverse(SymbolTable.scala:16)
at scala.reflect.api.Trees$Traverser.traverse(Trees.scala:2475)
at scala.tools.nsc.typechecker.Analyzer$packageObjects$$anon$2$$anon$4.traverse(Analyzer.scala:66)
at scala.tools.nsc.typechecker.Analyzer$packageObjects$$anon$2$$anon$4.traverse(Analyzer.scala:59)
at scala.reflect.api.Trees$Traverser.apply(Trees.scala:2513)
at scala.tools.nsc.typechecker.Analyzer$packageObjects$$anon$2.apply(Analyzer.scala:71)
at scala.tools.nsc.Global$GlobalPhase$$anonfun$applyPhase$1.apply$mcV$sp(Global.scala:441)
at scala.tools.nsc.Global$GlobalPhase.withCurrentUnit(Global.scala:432)
at scala.tools.nsc.Global$GlobalPhase.applyPhase(Global.scala:441)
at scala.tools.nsc.Global$GlobalPhase$$anonfun$run$1.apply(Global.scala:399)
at scala.tools.nsc.Global$GlobalPhase$$anonfun$run$1.apply(Global.scala:399)
at scala.collection.Iterator$class.foreach(Iterator.scala:750)
at scala.collection.AbstractIterator.foreach(Iterator.scala:1202)
at scala.tools.nsc.Global$GlobalPhase.run(Global.scala:399)
at scala.tools.nsc.Global$Run.compileUnitsInternal(Global.scala:1500)
at scala.tools.nsc.Global$Run.compileUnits(Global.scala:1487)
at scala.tools.nsc.Global$Run.compileSources(Global.scala:1482)
at scala.tools.nsc.Global$Run.compile(Global.scala:1580)
at xsbt.CachedCompiler0.run(CompilerInterface.scala:126)
at xsbt.CachedCompiler0.run(CompilerInterface.scala:102)
at xsbt.CompilerInterface.run(CompilerInterface.scala:27)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at sbt.compiler.AnalyzingCompiler.call(AnalyzingCompiler.scala:102)
at sbt.compiler.AnalyzingCompiler.compile(AnalyzingCompiler.scala:48)
at sbt.compiler.AnalyzingCompiler.compile(AnalyzingCompiler.scala:41)
at org.jetbrains.jps.incremental.scala.local.IdeaIncrementalCompiler.compile(IdeaIncrementalCompiler.scala:29)
at org.jetbrains.jps.incremental.scala.local.LocalServer.compile(LocalServer.scala:26)
at org.jetbrains.jps.incremental.scala.remote.Main$.make(Main.scala:65)
at org.jetbrains.jps.incremental.scala.remote.Main$.nailMain(Main.scala:23)
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:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.martiansoftware.nailgun.NGSession.run(NGSession.java:319)
There's a version mismatch between the Scala compiler and the macro paradise version. Macro-paradise is a compiler plugin and is tightly coupled to the Scala compiler, so it's cross-compiled against a full Scala version. Check the version of Scala that IntelliJ uses and check what Scala version is macro-paradise compiled against.
Not sure exactly how Intellij works, but in Eclipse there's a "Scala Installation" configuration page (similar to JDK). You can set a Scala Installation that matches the paradise version. Maybe IntelliJ has a similar concept.
For my case, I switch to JDK8, now it builds successfully.

Scalac: Assertion failed while run Scalatest in IDEA

I am running a ScalaTest Suite inside Intellij IDEA, during the make phase before scala test, I run into this problem:
Error:scalac: Error: assertion failed: List(object package$DebugNode, object package$DebugNode)
java.lang.AssertionError: assertion failed: List(object package$DebugNode, object package$DebugNode)
at scala.reflect.internal.Symbols$Symbol.suchThat(Symbols.scala:1678)
at scala.reflect.internal.Symbols$ClassSymbol.companionModule0(Symbols.scala:2988)
at scala.reflect.internal.Symbols$ClassSymbol.companionModule(Symbols.scala:2991)
at scala.tools.nsc.backend.jvm.GenASM$JPlainBuilder.genClass(GenASM.scala:1371)
at scala.tools.nsc.backend.jvm.GenASM$AsmPhase.run(GenASM.scala:120)
at scala.tools.nsc.Global$Run.compileUnitsInternal(Global.scala:1583)
at scala.tools.nsc.Global$Run.compileUnits(Global.scala:1557)
at scala.tools.nsc.Global$Run.compileSources(Global.scala:1553)
at scala.tools.nsc.Global$Run.compile(Global.scala:1662)
at xsbt.CachedCompiler0.run(CompilerInterface.scala:126)
at xsbt.CachedCompiler0.run(CompilerInterface.scala:102)
at xsbt.CompilerInterface.run(CompilerInterface.scala:27)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at sbt.compiler.AnalyzingCompiler.call(AnalyzingCompiler.scala:102)
at sbt.compiler.AnalyzingCompiler.compile(AnalyzingCompiler.scala:48)
at sbt.compiler.AnalyzingCompiler.compile(AnalyzingCompiler.scala:41)
at org.jetbrains.jps.incremental.scala.local.IdeaIncrementalCompiler.compile(IdeaIncrementalCompiler.scala:28)
at org.jetbrains.jps.incremental.scala.local.LocalServer.compile(LocalServer.scala:25)
at org.jetbrains.jps.incremental.scala.remote.Main$.make(Main.scala:64)
at org.jetbrains.jps.incremental.scala.remote.Main$.nailMain(Main.scala:22)
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:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.martiansoftware.nailgun.NGSession.run(NGSession.java:319)
Is it a jetbrains error due to incremental compilation? or Its related to the Test Suite I was running? Nothing information in the stack trace are related to the TestSuite/project I was test on.
I think it was an error due to Interllij IDEA incremental compilation. I got the same error when I built Spark for the first time.
I went to Preferences > Scala, set Incrmental compilation by SBT incremental compiler, Name Hasing: Default, Compilation order: Mixed. Recompiled the code, everything was OK then.
I met such issue before, because I built the spark in command and then imported into IDEA, rebuild will see the two errors, solve it is very easy, just run "mvn clean" under root folder of spark in command line, then Make again in IDEA, the errors gone.
details of TestSQLContext.scala assertion failed ref to: http://www.dataguru.cn/thread-537920-1-1.html
and more details about build spark 1.4.1 on Linux ref to: http://www.dataguru.cn/thread-539343-1-1.html
fredericyuan

Intellij 12 and internal compilation error when building scala project

I have just downloaded Intellij 12.01 (build #IC-123.94) and once I try to build a Scala project I get the following stacktrace:
Internal error: (java.lang.ClassNotFoundException) org.jetbrains.jps.incremental.BinaryContent
java.lang.ClassNotFoundException: org.jetbrains.jps.incremental.BinaryContent
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at org.jetbrains.jps.incremental.scala.LazyCompiledClass.<init>(ScalaBuilder.scala:239)
at org.jetbrains.jps.incremental.scala.IdeClient.generated(ScalaBuilder.scala:230)
at org.jetbrains.jps.incremental.scala.remote.ClientEventProcessor.process(ClientEventProcessor.scala:17)
at org.jetbrains.jps.incremental.scala.remote.RemoteServer$.liftedTree1$1(RemoteServer.scala:76)
at org.jetbrains.jps.incremental.scala.remote.RemoteServer$.org$jetbrains$jps$incremental$scala$remote$RemoteServer$$handle(RemoteServer.scala:74)
at org.jetbrains.jps.incremental.scala.remote.RemoteServer$$anonfun$send$1$$anonfun$apply$1$$anonfun$apply$3.apply(RemoteServer.scala:44)
at org.jetbrains.jps.incremental.scala.remote.RemoteServer$$anonfun$send$1$$anonfun$apply$1$$anonfun$apply$3.apply(RemoteServer.scala:43)
at org.jetbrains.jps.incremental.scala.package$.using(package.scala:15)
at org.jetbrains.jps.incremental.scala.remote.RemoteServer$$anonfun$send$1$$anonfun$apply$1.apply(RemoteServer.scala:43)
at org.jetbrains.jps.incremental.scala.remote.RemoteServer$$anonfun$send$1$$anonfun$apply$1.apply(RemoteServer.scala:40)
at org.jetbrains.jps.incremental.scala.package$.using(package.scala:15)
at org.jetbrains.jps.incremental.scala.remote.RemoteServer$$anonfun$send$1.apply(RemoteServer.scala:40)
at org.jetbrains.jps.incremental.scala.remote.RemoteServer$$anonfun$send$1.apply(RemoteServer.scala:39)
at org.jetbrains.jps.incremental.scala.package$.using(package.scala:15)
at org.jetbrains.jps.incremental.scala.remote.RemoteServer.send(RemoteServer.scala:39)
at org.jetbrains.jps.incremental.scala.remote.RemoteServer.compile(RemoteServer.scala:24)
at org.jetbrains.jps.incremental.scala.ScalaBuilder$$anonfun$5$$anonfun$apply$3$$anonfun$apply$4.apply(ScalaBuilder.scala:110)
at org.jetbrains.jps.incremental.scala.ScalaBuilder$$anonfun$5$$anonfun$apply$3$$anonfun$apply$4.apply(ScalaBuilder.scala:100)
at scala.util.Either$RightProjection.map(Either.scala:536)
at org.jetbrains.jps.incremental.scala.ScalaBuilder$$anonfun$5$$anonfun$apply$3.apply(ScalaBuilder.scala:100)
at org.jetbrains.jps.incremental.scala.ScalaBuilder$$anonfun$5$$anonfun$apply$3.apply(ScalaBuilder.scala:99)
at scala.util.Either$RightProjection.flatMap(Either.scala:523)
at org.jetbrains.jps.incremental.scala.ScalaBuilder$$anonfun$5.apply(ScalaBuilder.scala:99)
at org.jetbrains.jps.incremental.scala.ScalaBuilder$$anonfun$5.apply(ScalaBuilder.scala:98)
at scala.util.Either$RightProjection.flatMap(Either.scala:523)
at org.jetbrains.jps.incremental.scala.ScalaBuilder.doBuild(ScalaBuilder.scala:98)
at org.jetbrains.jps.incremental.scala.ScalaBuilder.build(ScalaBuilder.scala:67)
at org.jetbrains.jps.incremental.scala.ScalaBuilderService$ScalaBuilderDecorator.build(ScalaBuilderService.java:42)
at org.jetbrains.jps.incremental.IncProjectBuilder.runModuleLevelBuilders(IncProjectBuilder.java:963)
at org.jetbrains.jps.incremental.IncProjectBuilder.runBuildersForChunk(IncProjectBuilder.java:710)
at org.jetbrains.jps.incremental.IncProjectBuilder.buildTargetsChunk(IncProjectBuilder.java:740)
at org.jetbrains.jps.incremental.IncProjectBuilder.buildChunkIfAffected(IncProjectBuilder.java:673)
at org.jetbrains.jps.incremental.IncProjectBuilder.buildChunks(IncProjectBuilder.java:494)
at org.jetbrains.jps.incremental.IncProjectBuilder.runBuild(IncProjectBuilder.java:274)
at org.jetbrains.jps.incremental.IncProjectBuilder.build(IncProjectBuilder.java:164)
at org.jetbrains.jps.cmdline.BuildRunner.runBuild(BuildRunner.java:114)
at org.jetbrains.jps.cmdline.BuildSession.runBuild(BuildSession.java:205)
at org.jetbrains.jps.cmdline.BuildSession.run(BuildSession.java:102)
at org.jetbrains.jps.cmdline.BuildMain$MyMessageHandler$1.run(BuildMain.java:107)
at org.jetbrains.jps.service.impl.SharedThreadPoolImpl$1.run(SharedThreadPoolImpl.java:26)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Apparently, the problem comes from the openapi.jar inside the Intellij's lib folder, which was supposed to contain such a class.
Any pointers?
Regards.
Had the same issue with Idea 12, but after updating the Scala plugin to version 0.7.62, problem has been solved for me.
However, you can try to follow Idea's advice:
In case of any compilation problems you may enable the previous (internal) compiler by clearing:
Project Settings / Compiler / Use external build
Same issue for me too, fixed by updating to nightly builds (0.7.82), instructions available here: http://confluence.jetbrains.net/display/SCA/Scala+Plugin+Nightly+Builds+for+Leda