scala.reflect.internal.MissingRequirementError: object scala in compiler mirror not found

We are trying to run an Interpreter code as part of Apache Livy Interactive Session. The setup is:
java version “1.8.0_281”
Scala 2.11.8

We are seeing following error on the runtime.
scala.reflect.internal.MissingRequirementError: object scala 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.getPackage(Mirrors.scala:173)
at scala.reflect.internal.Definitions$DefinitionsClass.ScalaPackage$lzycompute(Definitions.scala:161)
at scala.reflect.internal.Definitions$DefinitionsClass.ScalaPackage(Definitions.scala:161)
at scala.reflect.internal.Definitions$DefinitionsClass.ScalaPackageClass$lzycompute(Definitions.scala:162)
at scala.reflect.internal.Definitions$DefinitionsClass.ScalaPackageClass(Definitions.scala:162)
at scala.reflect.internal.Definitions$DefinitionsClass.init(Definitions.scala:1395)
at scala.tools.nsc.Global$Run.(Global.scala:1215)
at scala.tools.nsc.interpreter.IMain.addUrlsToClassPath(IMain.scala:257)
at org.apache.livy.repl.SparkInterpreter$$anonfun$start$1.apply$mcV$sp(SparkInterpreter.scala:167)
at org.apache.livy.repl.SparkInterpreter$$anonfun$start$1.apply(SparkInterpreter.scala:132)
at org.apache.livy.repl.SparkInterpreter$$anonfun$start$1.apply(SparkInterpreter.scala:132)
at org.apache.livy.repl.AbstractSparkInterpreter.restoreContextClassLoader(AbstractSparkInterpreter.scala:341)
at org.apache.livy.repl.SparkInterpreter.start(SparkInterpreter.scala:132)
at org.apache.livy.repl.Session$$anonfun$1.apply(Session.scala:129)
at org.apache.livy.repl.Session$$anonfun$1.apply(Session.scala:123)
at scala.concurrent.impl.Future$PromiseCompletingRunnable.liftedTree1$1(Future.scala:24)
at scala.concurrent.impl.Future$PromiseCompletingRunnable.run(Future.scala:24)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)

We are adding following property to the interpreter settings:

settings.usejavacp.value = true

Also, tried to add scala-compiler and scala-library jars in settings.bootclasspath and settings.classpath but that did not seem to help either. Could anyone please suggest what might be going wrong?

Is there anyway to enable Scala debug logs and see what package it might be trying to load and what dependencies we might be missing?

Navigate to Event Viewer (Local)Applications and Service LogsMicrosoftUser Experience VirtualizationApp Agent. Right-click on on Debug below App Agent and pick out Enable Log. Select OK while offered with the "Analytic and Debug logs may also lose occasions while they’re enabled.

This post was flagged by the community and is temporarily hidden.