Error building scala application in intelliJ
<p>I'm trying to build some sample projects writen in Scala from these sources in intelliJ.
<a href="https://github.com/hdinsight/spark-streaming-data-persistence-examples" rel="nofollow noreferrer">https://github.com/hdinsight/spark-streaming-data-persistence-examples</a>
<a href="https://github.com/hdinsight/eventhubs-sample-event-producer" rel="nofollow noreferrer">https://github.com/hdinsight/eventhubs-sample-event-producer</a></p>

<p>After cloning the repository, in Project Structure, I added scala SDK into Libraries and scala SDK, sbt-launch.jar into Modules. I've also created artifact. I'm completely new to Scala and not sure if I have setup sdk (or other dependencies) correctly for building the projects in intelliJ.
When I tried to build, the first project was built just fine, but the second one gave me this error message. When</p>

<p>Do you have any clue what a problem might be?
(I can use scalac from the command prompt)</p>

<pre><code>Error:scalac: 
     while compiling: C:\Dev\Spark\EventHubIntegration\eventhubs-sample-event-producer\src\test\scala\samples\junit.scala
        during phase: typer
     library version: version 2.10.5
    compiler version: version 2.10.5
  reconstructed args: -nobootcp -javabootclasspath ; -classpath C:\Program Files (x86)\Java\jdk1.8.0_111\jre\lib\charsets.jar;C:\Program Files (x86)\Java\jdk1.8.0_111\jre\lib\deploy.jar;C:\Program Files (x86)\Java\jdk1.8.0_111\jre\lib\ext\access-bridge-32.jar;C:\Program Files (x86)\Java\jdk1.8.0_111\jre\lib\ext\cldrdata.jar;C:\Program Files (x86)\Java\jdk1.8.0_111\jre\lib\ext\dnsns.jar;C:\Program Files (x86)\Java\jdk1.8.0_111\jre\lib\ext\jaccess.jar;C:\Program Files (x86)\Java\jdk1.8.0_111\jre\lib\ext\jfxrt.jar;C:\Program Files (x86)\Java\jdk1.8.0_111\jre\lib\ext\localedata.jar;C:\Program Files (x86)\Java\jdk1.8.0_111\jre\lib\ext\nashorn.jar;C:\Program Files (x86)\Java\jdk1.8.0_111\jre\lib\ext\sunec.jar;C:\Program Files (x86)\Java\jdk1.8.0_111\jre\lib\ext\sunjce_provider.jar;C:\Program Files (x86)\Java\jdk1.8.0_111\jre\lib\ext\sunmscapi.jar;C:\Program Files (x86)\Java\jdk1.8.0_111\jre\lib\ext\sunpkcs11.jar;C:\Program Files (x86)\Java\jdk1.8.0_111\jre\lib\ext\zipfs.jar;C:\Program Files (x86)\Java\jdk1.8.0_111\jre\lib\javaws.jar;C:\Program Files (x86)\Java\jdk1.8.0_111\jre\lib\jce.jar;C:\Program Files (x86)\Java\jdk1.8.0_111\jre\lib\jfr.jar;C:\Program Files (x86)\Java\jdk1.8.0_111\jre\lib\jfxswt.jar;C:\Program Files (x86)\Java\jdk1.8.0_111\jre\lib\jsse.jar;C:\Program Files (x86)\Java\jdk1.8.0_111\jre\lib\management-agent.jar;C:\Program Files (x86)\Java\jdk1.8.0_111\jre\lib\plugin.jar;C:\Program Files (x86)\Java\jdk1.8.0_111\jre\lib\resources.jar;C:\Program Files (x86)\Java\jdk1.8.0_111\jre\lib\rt.jar;C:\Program Files (x86)\sbt\bin\sbt-launch.jar;C:\Program Files (x86)\scala\api\jars\jline-2.14.1-javadoc.jar;C:\Program Files (x86)\scala\api\jars\scala-compiler-2.12.0-javadoc.jar;C:\Program Files (x86)\scala\api\jars\scala-library-2.12.0-javadoc.jar;C:\Program Files (x86)\scala\api\jars\scala-parser-combinators_2.12-1.0.4-javadoc.jar;C:\Program Files (x86)\scala\api\jars\scala-reflect-2.12.0-javadoc.jar;C:\Program Files (x86)\scala\api\jars\scala-swing_2.12-2.0.0-M2-javadoc.jar;C:\Program Files (x86)\scala\api\jars\scala-xml_2.12-1.0.5-javadoc.jar;C:\Program Files (x86)\scala\api\jars\scalap-2.12.0-javadoc.jar;C:\Dev\Spark\EventHubIntegration\eventhubs-sample-event-producer\out\test\test;C:\Dev\Spark\EventHubIntegration\eventhubs-sample-event-producer\out\production\test;C:\Users\jinnapat.indrapiromk\.ivy2\cache\org.scala-lang\scala-library\jars\scala-library-2.10.5.jar;C:\Users\jinnapat.indrapiromk\.ivy2\cache\org.scala-lang\scala-reflect\jars\scala-reflect-2.10.5.jar
  last tree to typer: TypeTree(class AppTest)
              symbol: class AppTest in package samples (flags: )
   symbol definition: class AppTest extends AnyRef
                 tpe: samples.AppTest
       symbol owners: class AppTest -&gt; package samples
      context owners: constructor AppTest -&gt; class AppTest -&gt; package samples
== Enclosing template or block ==
DefDef( // def &lt;init&gt;: &lt;?&gt; in class AppTest
  &lt;method&gt;
  "&lt;init&gt;"
  []
  List(Nil)
  &lt;tpt&gt; // tree.tpe=samples.AppTest
  Block(
    Apply(
      super."&lt;init&gt;"
      Nil
    )
    ()
  )
)
== Expanded type of tree ==
TypeRef(TypeSymbol(class AppTest extends AnyRef))
uncaught exception during compilation: scala.reflect.internal.FatalError
</code></pre>

<p>,followed by,</p>

<pre><code>Error:scalac: Error: class StringContext does not have a member f
scala.reflect.internal.FatalError: class StringContext does not have a member f

    at scala.reflect.internal.Definitions$DefinitionsClass.scala$reflect$internal$Definitions$DefinitionsClass$$fatalMissingSymbol(Definitions.scala:1037)

    at scala.reflect.internal.Definitions$DefinitionsClass.getMember(Definitions.scala:1055)

    at scala.reflect.internal.Definitions$DefinitionsClass.getMemberMethod(Definitions.scala:1090)

    at scala.reflect.internal.Definitions$DefinitionsClass.StringContext_f(Definitions.scala:538)

    at scala.tools.reflect.FastTrack$class.fastTrack(FastTrack.scala:38)

    at scala.tools.nsc.Global$$anon$1.fastTrack$lzycompute(Global.scala:493)

    at scala.tools.nsc.Global$$anon$1.fastTrack(Global.scala:493)

    at scala.tools.nsc.typechecker.Namers$Namer.methodSig(Namers.scala:1141)

    at scala.tools.nsc.typechecker.Namers$Namer.getSig$1(Namers.scala:1451)

    at scala.tools.nsc.typechecker.Namers$Namer.typeSig(Namers.scala:1463)

    at scala.tools.nsc.typechecker.Namers$Namer$$anonfun$monoTypeCompleter$1$$anonfun$apply$1.apply$mcV$sp(Namers.scala:728)

    at scala.tools.nsc.typechecker.Namers$Namer$$anonfun$monoTypeCompleter$1$$anonfun$apply$1.apply(Namers.scala:727)

    at scala.tools.nsc.typechecker.Namers$Namer$$anonfun$monoTypeCompleter$1$$anonfun$apply$1.apply(Namers.scala:727)

    at scala.tools.nsc.typechecker.Namers$Namer.scala$tools$nsc$typechecker$Namers$Namer$$logAndValidate(Namers.scala:1496)

    at scala.tools.nsc.typechecker.Namers$Namer$$anonfun$monoTypeCompleter$1.apply(Namers.scala:727)

    at scala.tools.nsc.typechecker.Namers$Namer$$anonfun$monoTypeCompleter$1.apply(Namers.scala:726)

    at scala.tools.nsc.typechecker.Namers$$anon$1.completeImpl(Namers.scala:1611)

    at scala.tools.nsc.typechecker.Namers$LockingTypeCompleter$class.complete(Namers.scala:1619)

    at scala.tools.nsc.typechecker.Namers$$anon$1.complete(Namers.scala:1609)

    at scala.reflect.internal.Symbols$Symbol.info(Symbols.scala:1231)

    at scala.reflect.internal.Symbols$Symbol.initialize(Symbols.scala:1374)

    at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5295)

    at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5642)

    at scala.tools.nsc.typechecker.Typers$Typer.scala$tools$nsc$typechecker$Typers$Typer$$typedStat$1(Typers.scala:2928)

    at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$61.apply(Typers.scala:3032)

    at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$61.apply(Typers.scala:3032)

    at scala.collection.immutable.List.loop$1(List.scala:170)

    at scala.collection.immutable.List.mapConserve(List.scala:186)

    at scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:3032)

    at scala.tools.nsc.typechecker.Typers$Typer.typedTemplate(Typers.scala:1919)

    at scala.tools.nsc.typechecker.Typers$Typer.typedClassDef(Typers.scala:1759)

    at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5583)

    at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5642)

    at scala.tools.nsc.typechecker.Typers$Typer.scala$tools$nsc$typechecker$Typers$Typer$$typedStat$1(Typers.scala:2928)

    at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$61.apply(Typers.scala:3032)

    at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$61.apply(Typers.scala:3032)

    at scala.collection.immutable.List.loop$1(List.scala:170)

    at scala.collection.immutable.List.mapConserve(List.scala:186)

    at scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:3032)

    at scala.tools.nsc.typechecker.Typers$Typer.typedPackageDef$1(Typers.scala:5301)

    at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5587)

    at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5642)

    at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5704)

    at scala.tools.nsc.typechecker.Analyzer$typerFactory$$anon$3.apply(Analyzer.scala:99)

    at scala.tools.nsc.Global$GlobalPhase.applyPhase(Global.scala:464)

    at scala.tools.nsc.typechecker.Analyzer$typerFactory$$anon$3$$anonfun$run$1.apply(Analyzer.scala:91)

    at scala.tools.nsc.typechecker.Analyzer$typerFactory$$anon$3$$anonfun$run$1.apply(Analyzer.scala:91)

    at scala.collection.Iterator$class.foreach(Iterator.scala:727)

    at scala.collection.AbstractIterator.foreach(Iterator.scala:1157)

    at scala.tools.nsc.typechecker.Analyzer$typerFactory$$anon$3.run(Analyzer.scala:91)

    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:115)

    at xsbt.CachedCompiler0.run(CompilerInterface.scala:94)

    at xsbt.CompilerInterface.run(CompilerInterface.scala:22)

    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:498)

    at sbt.compiler.AnalyzingCompiler.call(AnalyzingCompiler.scala:101)

    at sbt.compiler.AnalyzingCompiler.compile(AnalyzingCompiler.scala:47)

    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:67)

    at org.jetbrains.jps.incremental.scala.remote.Main$.nailMain(Main.scala:24)

    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:498)

    at com.martiansoftware.nailgun.NGSession.run(NGSession.java:319)
</code></pre>