Макет Ливий сервера для юнит-теста - PullRequest
7 голосов
/ 22 апреля 2020

В настоящее время я пытаюсь смоделировать сервер livy из scala для запуска модульных тестов.

По сути, я хотел бы проверить отправку jar клиенту livy. Я пытаюсь адаптировать код, который я нашел здесь (livy) HttpClientSpe c. scala, и я получаю ошибку при компиляции.

Точнее, я получение ошибки всякий раз, когда я пытаюсь переопределить метод createSession класса InteractiveSessionServlet. Что странно, поскольку InteractiveSessionServlet не является частным классом.

Буду очень признателен, если кто-нибудь сможет мне помочь.

Вот мой код:

import java.util.concurrent.atomic.AtomicLong
import org.scalatra.servlet.ScalatraListener
import org.apache.livy.{LivyClient, LivyConf}
import org.apache.livy.client.common.Serializer
import org.apache.livy.server.WebServer
import org.apache.livy.server.interactive.InteractiveSession
import org.scalatest.{BeforeAndAfterAll, FlatSpec, Matchers}

private object LivyServerMock {
  // Hack warning: keep the session object available so that individual tests can mock
  // the desired behavior before making requests to the server.
  var session: InteractiveSession = _
}

class LivyServerMock extends FlatSpec with Matchers with BeforeAndAfterAll {

  import LivyServerMock.session

  private val TIMEOUT_S = 10
  private val ID_GENERATOR = new AtomicLong()
  private val serializer = new Serializer()

  private var server: WebServer = _
  private var client: LivyClient = _

  override def beforeAll(): Unit = {
    super.beforeAll()
    server = new WebServer(new LivyConf(), "0.0.0.0", 0)

    server.context.setResourceBase("src/main/org/apache/livy/server")
    server.context.setInitParameter(ScalatraListener.LifeCycleKey,
      classOf[HttpClientTestBootstrap].getCanonicalName)
    server.context.addEventListener(new ScalatraListener)
    server.start()

  }

  override def afterAll(): Unit = {
    super.afterAll()
    if (server != null) {
      server.stop()
      server = null
    }
    if (client != null) {
      client.stop(true)
      client = null
    }
    session = null
  }
}

private class HttpClientTestBootstrap extends LifeCycle {

  private implicit def executor: ExecutionContext = ExecutionContext.global

  override def init(context: ServletContext): Unit = {
    val conf = new LivyConf()
    val accessManager = null
    val stateStore = mock(classOf[SessionStore])
    val sessionManager = new InteractiveSessionManager(conf, stateStore, Some(Seq.empty))
    val servlet = new InteractiveSessionServlet(sessionManager, stateStore, conf, accessManager) {
      override def createSession(req: HttpServletRequest): InteractiveSession = {
        val session = mock(classOf[InteractiveSession])
        val id = sessionManager.nextId()
        when(session.id).thenReturn(id)
        when(session.name).thenReturn(None)
        when(session.appId).thenReturn(None)
        when(session.appInfo).thenReturn(AppInfo())
        when(session.state).thenReturn(SessionState.Idle)
        when(session.proxyUser).thenReturn(None)
        when(session.kind).thenReturn(Spark)
        when(session.stop()).thenReturn(Future.successful(()))
        require(LivyServerMock.session == null, "Session already created?")
        LivyServerMock.session = session
        session
      }
    }

    // hack to access LivyConnection's SESSIONS_URI parameter field
    val mirror = ru.runtimeMirror(getClass.getClassLoader)
    val symbolClass = mirror.staticClass("org.apache.livy.client.http.LivyConnection")
    val LivyConnection_SESSIONS_URI = symbolClass.toType.decl(ru.TermName("SESSIONS_URI")).asTerm.asInstanceOf[String]

    context.mount(servlet, s"$LivyConnection_SESSIONS_URI/*")
  }
}

и моя ошибка на консоли

Error:scalac: Error: assertion failed: 
  class JsonServlet
     while compiling: .../HttpClientTestBootstrap.scala
        during phase: erasure
     library version: version 2.11.12
    compiler version: version 2.11.12
  reconstructed args: -language:higherKinds -Ywarn-unused-import -encoding utf8 -deprecation -feature -classpath /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/charsets.jar.
......

  last tree to typer: This(<$anon: () => String>)
       tree position: line 64 of ..../HttpClientTestBootstrap.scala
              symbol: final <$anon: () => String>
   symbol definition: final class $anonfun extends AbstractFunction0[String] with Serializable (a ClassSymbol)
      symbol package: co.invenis.uvenix.iss.utilities
       symbol owners: <$anon: () => String> -> method createSession -> <$anon: org.apache.livy.server.interactive.InteractiveSessionServlet> -> value servlet -> method init -> class HttpClientTestBootstrap
           call site: method createSession in package utilities
== Source file context for tree position ==
    61                 when(session.kind).thenReturn(Spark)
    62                 when(session.stop()).thenReturn(Future.successful(()))
    63                 require(LivyServerMock.session == null, "Session already created?")
    64                 LivyServerMock.session = session
    65                 session
    66       }
    67     }
    at scala.tools.nsc.transform.AddInterfaces.transformMixinInfo(AddInterfaces.scala:217)
    at scala.tools.nsc.transform.Erasure.transformInfo(Erasure.scala:388)
    at scala.tools.nsc.transform.InfoTransform$Phase$$anon$1.transform(InfoTransform.scala:38)
    at scala.reflect.internal.Symbols$Symbol.rawInfo(Symbols.scala:1625)
    at scala.reflect.internal.Symbols$Symbol.info(Symbols.scala:1545)
    at scala.reflect.internal.Types$TypeRef.thisInfo(Types.scala:2199)
    at scala.reflect.internal.Types$TypeRef.baseClasses(Types.scala:2204)
    at scala.reflect.internal.Types$class.computeBaseClasses(Types.scala:1430)
    at scala.reflect.internal.SymbolTable.computeBaseClasses(SymbolTable.scala:16)
    at scala.reflect.internal.Types$$anonfun$defineBaseClassesOfCompoundType$1.apply(Types.scala:1565)
    at scala.reflect.internal.Types$$anonfun$defineBaseClassesOfCompoundType$1.apply(Types.scala:1565)
    at scala.reflect.internal.Types$CompoundType.memo(Types.scala:1398)
    at scala.reflect.internal.Types$class.defineBaseClassesOfCompoundType(Types.scala:1565)
    at scala.reflect.internal.Types$class.define$1(Types.scala:1532)
    at scala.reflect.internal.Types$class.defineBaseClassesOfCompoundType(Types.scala:1533)
    at scala.reflect.internal.SymbolTable.defineBaseClassesOfCompoundType(SymbolTable.scala:16)
    at scala.reflect.internal.Types$CompoundType.baseClasses(Types.scala:1375)
    at scala.reflect.internal.Types$$anonfun$defineBaseClassesOfCompoundType$2.apply(Types.scala:1565)
    at scala.reflect.internal.Types$$anonfun$defineBaseClassesOfCompoundType$2.apply(Types.scala:1565)
    at scala.reflect.internal.Types$CompoundType.memo(Types.scala:1398)
    at scala.reflect.internal.Types$class.defineBaseClassesOfCompoundType(Types.scala:1565)
    at scala.reflect.internal.Types$class.define$1(Types.scala:1532)
    at scala.reflect.internal.Types$class.defineBaseClassesOfCompoundType(Types.scala:1533)
    at scala.reflect.internal.SymbolTable.defineBaseClassesOfCompoundType(SymbolTable.scala:16)
    at scala.reflect.internal.Types$CompoundType.baseClasses(Types.scala:1375)
    at scala.reflect.internal.Types$TypeRef.baseClasses(Types.scala:2204)
    at scala.reflect.internal.Types$class.computeBaseClasses(Types.scala:1430)
    at scala.reflect.internal.SymbolTable.computeBaseClasses(SymbolTable.scala:16)
    at scala.reflect.internal.Types$$anonfun$defineBaseClassesOfCompoundType$1.apply(Types.scala:1565)
    at scala.reflect.internal.Types$$anonfun$defineBaseClassesOfCompoundType$1.apply(Types.scala:1565)
    at scala.reflect.internal.Types$CompoundType.updateCache$1(Types.scala:1392)
    at scala.reflect.internal.Types$CompoundType.memo(Types.scala:1401)
    at scala.reflect.internal.Types$class.defineBaseClassesOfCompoundType(Types.scala:1565)
    at scala.reflect.internal.Types$class.define$1(Types.scala:1532)
    at scala.reflect.internal.Types$class.defineBaseClassesOfCompoundType(Types.scala:1533)
    at scala.reflect.internal.SymbolTable.defineBaseClassesOfCompoundType(SymbolTable.scala:16)
    at scala.reflect.internal.Types$CompoundType.baseClasses(Types.scala:1375)
    at scala.reflect.internal.Types$TypeRef.baseClasses(Types.scala:2204)
    at scala.reflect.internal.Types$class.computeBaseClasses(Types.scala:1430)
    at scala.reflect.internal.SymbolTable.computeBaseClasses(SymbolTable.scala:16)
    at scala.reflect.internal.Types$$anonfun$defineBaseClassesOfCompoundType$1.apply(Types.scala:1565)
    at scala.reflect.internal.Types$$anonfun$defineBaseClassesOfCompoundType$1.apply(Types.scala:1565)
    at scala.reflect.internal.Types$CompoundType.memo(Types.scala:1398)
    at scala.reflect.internal.Types$class.defineBaseClassesOfCompoundType(Types.scala:1565)
    at scala.reflect.internal.Types$class.define$1(Types.scala:1532)
    at scala.reflect.internal.Types$class.defineBaseClassesOfCompoundType(Types.scala:1533)
    at scala.reflect.internal.SymbolTable.defineBaseClassesOfCompoundType(SymbolTable.scala:16)
    at scala.reflect.internal.Types$CompoundType.baseClasses(Types.scala:1375)
    at scala.reflect.internal.Types$$anonfun$defineBaseClassesOfCompoundType$2.apply(Types.scala:1565)
    at scala.reflect.internal.Types$$anonfun$defineBaseClassesOfCompoundType$2.apply(Types.scala:1565)
    at scala.reflect.internal.Types$CompoundType.memo(Types.scala:1398)
    at scala.reflect.internal.Types$class.defineBaseClassesOfCompoundType(Types.scala:1565)
    at scala.reflect.internal.Types$class.define$1(Types.scala:1532)
    at scala.reflect.internal.Types$class.defineBaseClassesOfCompoundType(Types.scala:1533)
    at scala.reflect.internal.SymbolTable.defineBaseClassesOfCompoundType(SymbolTable.scala:16)
    at scala.reflect.internal.Types$CompoundType.baseClasses(Types.scala:1375)
    at scala.reflect.internal.Symbols$Symbol.ancestors(Symbols.scala:2150)
    at scala.reflect.internal.Symbols$Symbol.mixinClasses(Symbols.scala:2146)
    at scala.tools.nsc.transform.AddInterfaces.scala$tools$nsc$transform$AddInterfaces$$addMixinConstructorCalls(AddInterfaces.scala:313)
    at scala.tools.nsc.transform.AddInterfaces$$anon$1$$anonfun$14.apply(AddInterfaces.scala:344)
    at scala.tools.nsc.transform.AddInterfaces$$anon$1$$anonfun$14.apply(AddInterfaces.scala:344)
    at scala.reflect.internal.Trees$class.deriveDefDef(Trees.scala:1810)
    at scala.reflect.internal.SymbolTable.deriveDefDef(SymbolTable.scala:16)
    at scala.tools.nsc.transform.AddInterfaces$$anon$1.transform(AddInterfaces.scala:344)
    at scala.tools.nsc.transform.AddInterfaces$$anon$1.transform(AddInterfaces.scala:333)
    at scala.reflect.api.Trees$Transformer$$anonfun$transformStats$1.apply(Trees.scala:2589)
    at scala.reflect.api.Trees$Transformer$$anonfun$transformStats$1.apply(Trees.scala:2587)
    at scala.collection.immutable.List.loop$1(List.scala:176)
    at scala.collection.immutable.List.mapConserve(List.scala:200)
    at scala.reflect.api.Trees$Transformer.transformStats(Trees.scala:2587)
    at scala.tools.nsc.transform.AddInterfaces$$anon$1.transformStats(AddInterfaces.scala:335)
    at scala.tools.nsc.transform.AddInterfaces$$anon$1.transformStats(AddInterfaces.scala:333)
    at scala.reflect.internal.Trees$class.itransform(Trees.scala:1404)
    at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
    at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
    at scala.reflect.api.Trees$Transformer.transform(Trees.scala:2555)
    at scala.tools.nsc.transform.AddInterfaces$$anon$1.transform(AddInterfaces.scala:339)
    at scala.tools.nsc.transform.AddInterfaces$$anon$1.transform(AddInterfaces.scala:333)
    at scala.reflect.api.Trees$Transformer.transformTemplate(Trees.scala:2563)
    at scala.reflect.internal.Trees$$anonfun$itransform$4.apply(Trees.scala:1408)
    at scala.reflect.internal.Trees$$anonfun$itransform$4.apply(Trees.scala:1407)
    at scala.reflect.api.Trees$Transformer.atOwner(Trees.scala:2600)
    at scala.reflect.internal.Trees$class.itransform(Trees.scala:1406)
    at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
    at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
    at scala.reflect.api.Trees$Transformer.transform(Trees.scala:2555)
    at scala.tools.nsc.transform.AddInterfaces$$anon$1.transform(AddInterfaces.scala:339)
    at scala.tools.nsc.transform.AddInterfaces$$anon$1.transform(AddInterfaces.scala:333)
    at scala.reflect.api.Trees$Transformer$$anonfun$transformStats$1.apply(Trees.scala:2589)
    at scala.reflect.api.Trees$Transformer$$anonfun$transformStats$1.apply(Trees.scala:2587)
    at scala.collection.immutable.List.loop$1(List.scala:176)
    at scala.collection.immutable.List.mapConserve(List.scala:200)
    at scala.reflect.api.Trees$Transformer.transformStats(Trees.scala:2587)
    at scala.tools.nsc.transform.AddInterfaces$$anon$1.transformStats(AddInterfaces.scala:335)
    at scala.tools.nsc.transform.AddInterfaces$$anon$1.transformStats(AddInterfaces.scala:333)
    at scala.reflect.internal.Trees$class.itransform(Trees.scala:1366)
    at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
    at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
    at scala.reflect.api.Trees$Transformer.transform(Trees.scala:2555)
    at scala.tools.nsc.transform.AddInterfaces$$anon$1.transform(AddInterfaces.scala:339)
    at scala.tools.nsc.transform.AddInterfaces$$anon$1.transform(AddInterfaces.scala:333)
    at scala.reflect.internal.Trees$$anonfun$itransform$1.apply(Trees.scala:1357)
    at scala.reflect.internal.Trees$$anonfun$itransform$1.apply(Trees.scala:1356)
    at scala.reflect.api.Trees$Transformer.atOwner(Trees.scala:2600)
    at scala.reflect.internal.Trees$class.itransform(Trees.scala:1355)
    at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
    at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
    at scala.reflect.api.Trees$Transformer.transform(Trees.scala:2555)
    at scala.tools.nsc.transform.AddInterfaces$$anon$1.transform(AddInterfaces.scala:339)
    at scala.tools.nsc.transform.AddInterfaces$$anon$1.transform(AddInterfaces.scala:333)
    at scala.reflect.api.Trees$Transformer$$anonfun$transformStats$1.apply(Trees.scala:2589)
    at scala.reflect.api.Trees$Transformer$$anonfun$transformStats$1.apply(Trees.scala:2587)
    at scala.collection.immutable.List.loop$1(List.scala:176)
    at scala.collection.immutable.List.mapConserve(List.scala:200)
    at scala.reflect.api.Trees$Transformer.transformStats(Trees.scala:2587)
    at scala.tools.nsc.transform.AddInterfaces$$anon$1.transformStats(AddInterfaces.scala:335)
    at scala.tools.nsc.transform.AddInterfaces$$anon$1.transformStats(AddInterfaces.scala:333)
    at scala.reflect.internal.Trees$class.itransform(Trees.scala:1366)
    at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
    at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
    at scala.reflect.api.Trees$Transformer.transform(Trees.scala:2555)
    at scala.tools.nsc.transform.AddInterfaces$$anon$1.transform(AddInterfaces.scala:339)
    at scala.tools.nsc.transform.AddInterfaces$$anon$1.transform(AddInterfaces.scala:333)
    at scala.reflect.internal.Trees$$anonfun$itransform$2.apply(Trees.scala:1363)
    at scala.reflect.internal.Trees$$anonfun$itransform$2.apply(Trees.scala:1361)
    at scala.reflect.api.Trees$Transformer.atOwner(Trees.scala:2600)
    at scala.reflect.internal.Trees$class.itransform(Trees.scala:1360)
    at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
    at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
    at scala.reflect.api.Trees$Transformer.transform(Trees.scala:2555)
    at scala.tools.nsc.transform.AddInterfaces$$anon$1.transform(AddInterfaces.scala:339)
    at scala.tools.nsc.transform.AddInterfaces$$anon$1.transform(AddInterfaces.scala:333)
    at scala.reflect.api.Trees$Transformer$$anonfun$transformStats$1.apply(Trees.scala:2589)
    at scala.reflect.api.Trees$Transformer$$anonfun$transformStats$1.apply(Trees.scala:2587)
    at scala.collection.immutable.List.loop$1(List.scala:176)
    at scala.collection.immutable.List.mapConserve(List.scala:200)
    at scala.reflect.api.Trees$Transformer.transformStats(Trees.scala:2587)
    at scala.tools.nsc.transform.AddInterfaces$$anon$1.transformStats(AddInterfaces.scala:335)
    at scala.tools.nsc.transform.AddInterfaces$$anon$1.transformStats(AddInterfaces.scala:333)
    at scala.reflect.internal.Trees$class.itransform(Trees.scala:1404)
    at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
    at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
    at scala.reflect.api.Trees$Transformer.transform(Trees.scala:2555)
    at scala.tools.nsc.transform.AddInterfaces$$anon$1.transform(AddInterfaces.scala:339)
    at scala.tools.nsc.transform.AddInterfaces$$anon$1.transform(AddInterfaces.scala:333)
    at scala.reflect.api.Trees$Transformer.transformTemplate(Trees.scala:2563)
    at scala.reflect.internal.Trees$$anonfun$itransform$4.apply(Trees.scala:1408)
    at scala.reflect.internal.Trees$$anonfun$itransform$4.apply(Trees.scala:1407)
    at scala.reflect.api.Trees$Transformer.atOwner(Trees.scala:2600)
    at scala.reflect.internal.Trees$class.itransform(Trees.scala:1406)
    at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
    at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
    at scala.reflect.api.Trees$Transformer.transform(Trees.scala:2555)
    at scala.tools.nsc.transform.AddInterfaces$$anon$1.transform(AddInterfaces.scala:339)
    at scala.tools.nsc.transform.AddInterfaces$$anon$1.transform(AddInterfaces.scala:333)
    at scala.reflect.api.Trees$Transformer$$anonfun$transformStats$1.apply(Trees.scala:2589)
    at scala.reflect.api.Trees$Transformer$$anonfun$transformStats$1.apply(Trees.scala:2587)
    at scala.collection.immutable.List.loop$1(List.scala:176)
    at scala.collection.immutable.List.mapConserve(List.scala:200)
    at scala.reflect.api.Trees$Transformer.transformStats(Trees.scala:2587)
    at scala.tools.nsc.transform.AddInterfaces$$anon$1.transformStats(AddInterfaces.scala:335)
    at scala.tools.nsc.transform.AddInterfaces$$anon$1.transformStats(AddInterfaces.scala:333)
    at scala.reflect.internal.Trees$$anonfun$itransform$7.apply(Trees.scala:1426)
    at scala.reflect.internal.Trees$$anonfun$itransform$7.apply(Trees.scala:1426)
    at scala.reflect.api.Trees$Transformer.atOwner(Trees.scala:2600)
    at scala.reflect.internal.Trees$class.itransform(Trees.scala:1425)
    at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
    at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
    at scala.reflect.api.Trees$Transformer.transform(Trees.scala:2555)
    at scala.tools.nsc.transform.AddInterfaces$$anon$1.transform(AddInterfaces.scala:339)
    at scala.tools.nsc.transform.AddInterfaces$$anon$1.transform(AddInterfaces.scala:333)
    at scala.tools.nsc.transform.Erasure$ErasureTransformer$$anonfun$transform$2.apply(Erasure.scala:1179)
    at scala.tools.nsc.transform.Erasure$ErasureTransformer$$anonfun$transform$2.apply(Erasure.scala:1178)
    at scala.reflect.internal.SymbolTable.enteringPhase(SymbolTable.scala:235)
    at scala.reflect.internal.SymbolTable.exitingPhase(SymbolTable.scala:256)
    at scala.tools.nsc.transform.Erasure$ErasureTransformer.transform(Erasure.scala:1178)
    at scala.tools.nsc.transform.Erasure$ErasureTransformer.transform(Erasure.scala:759)
    at scala.tools.nsc.ast.Trees$Transformer.transformUnit(Trees.scala:147)
    at scala.tools.nsc.transform.Transform$Phase.apply(Transform.scala:30)
    at scala.tools.nsc.Global$GlobalPhase$$anonfun$applyPhase$1.apply$mcV$sp(Global.scala:467)
    at scala.tools.nsc.Global$GlobalPhase.withCurrentUnit(Global.scala:458)
    at scala.tools.nsc.Global$GlobalPhase.applyPhase(Global.scala:467)
    at scala.tools.nsc.Global$GlobalPhase$$anonfun$run$1.apply(Global.scala:425)
    at scala.tools.nsc.Global$GlobalPhase$$anonfun$run$1.apply(Global.scala:425)
    at scala.collection.Iterator$class.foreach(Iterator.scala:891)
    at scala.collection.AbstractIterator.foreach(Iterator.scala:1334)
    at scala.tools.nsc.Global$GlobalPhase.run(Global.scala:425)
    at scala.tools.nsc.Global$Run.compileUnitsInternal(Global.scala:1528)
    at scala.tools.nsc.Global$Run.compileUnits(Global.scala:1513)
    at scala.tools.nsc.Global$Run.compileSources(Global.scala:1508)
    at scala.tools.nsc.Global$Run.compile(Global.scala:1609)
    at xsbt.CachedCompiler0.run(CompilerInterface.scala:130)
    at xsbt.CachedCompiler0.run(CompilerInterface.scala:105)
    at xsbt.CompilerInterface.run(CompilerInterface.scala:31)
    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.internal.inc.AnalyzingCompiler.call(AnalyzingCompiler.scala:237)
    at sbt.internal.inc.AnalyzingCompiler.compile(AnalyzingCompiler.scala:111)
    at sbt.internal.inc.AnalyzingCompiler.compile(AnalyzingCompiler.scala:90)
    at org.jetbrains.jps.incremental.scala.local.IdeaIncrementalCompiler.compile(IdeaIncrementalCompiler.scala:41)
    at org.jetbrains.jps.incremental.scala.local.LocalServer.compile(LocalServer.scala:42)
    at org.jetbrains.jps.incremental.scala.remote.Main$.compileLogic(Main.scala:133)
    at org.jetbrains.jps.incremental.scala.remote.Main$.$anonfun$handleCommand$1(Main.scala:123)
    at org.jetbrains.jps.incremental.scala.remote.Main$.compilingNowCounterDecorated$1(Main.scala:112)
    at org.jetbrains.jps.incremental.scala.remote.Main$.handleCommand(Main.scala:120)
    at org.jetbrains.jps.incremental.scala.remote.Main$.serverLogic(Main.scala:96)
    at org.jetbrains.jps.incremental.scala.remote.Main$.nailMain(Main.scala:55)
    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)
...