Unexpected `MissingRequirementError` with bloop console
See original GitHub issueHey, any idea what is going wrong here?
I can reproduce it with running:
sbt new scala/scala-seed.g8
and then bloop console root --verbose --version
in this fresh project. Starting ammonite standalone works fine. Is that some misconfiguration of my machine or can you reproduce it?
[D] Loading workspace settings from bloop.settings.json
bloop v1.4.0-RC1-105-118a551b
Using Scala v2.12.8 and Zinc v1.3.0-M4+32-b1accb96
Running on Java JDK v11.0.6 (/Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/Home)
-> Supports debugging user code, Java Debug Interface (JDI) is available.
Maintained by the Scala Center (Jorge Vicente Cantero, Martin Duhem)
[D] Computing sources and classpath hashes for root
[D] Scheduling compilation for root...
[D] Using successful result for root associated with /Users/yannick/otherworkspace/test/.bloop/root/bloop-internal-classes/classes-bloop-cli-_OovRxS0R--EzjuHe5x6LQ==
[D] Cache hit true for plugin /Users/yannick/Library/Caches/bloop/semanticdb/org.scalameta.semanticdb-scalac_2.13.1.4.3.6/semanticdb-scalac_2.13.1-4.3.6.jar
[D] External classes directory /Users/yannick/otherworkspace/test/.bloop/root/bloop-bsp-clients-classes/classes-bloop-cli
[D] Read-only classes directory /Users/yannick/otherworkspace/test/.bloop/root/bloop-internal-classes/classes-bloop-cli-_OovRxS0R--EzjuHe5x6LQ==
[D] New rw classes directory /Users/yannick/otherworkspace/test/.bloop/root/bloop-internal-classes/classes-bloop-cli-SJW4FuyCQ2uMwlzJ7t__iw==
[D] No changes
[D] Recording new last successful request for root associated with /Users/yannick/otherworkspace/test/.bloop/root/bloop-internal-classes/classes-bloop-cli-_OovRxS0R--EzjuHe5x6
LQ==
[D] Skipping delete of /Users/yannick/otherworkspace/test/.bloop/root/bloop-internal-classes/classes-bloop-cli-_OovRxS0R--EzjuHe5x6LQ== associated with no-op result
[D] Wrote Ammonite command to /var/folders/bb/8n4dgm5x1wxgc5ldq_7x61rw0000gn/T/tmpuzo94z
[D] Elapsed: 43.881493 ms
Loading...
Compiling (synthetic)/ammonite/predef/interpBridge.sc
scala.reflect.internal.MissingRequirementError: object java.lang.Object in compiler mirror not found.
scala.reflect.internal.MissingRequirementError$.notFound(MissingRequirementError.scala:24)
scala.reflect.internal.Mirrors$RootsBase.$anonfun$getModuleOrClass$6(Mirrors.scala:66)
scala.reflect.internal.Mirrors$RootsBase.getModuleOrClass(Mirrors.scala:66)
scala.reflect.internal.Mirrors$RootsBase.getModuleOrClass(Mirrors.scala:56)
scala.reflect.internal.Mirrors$RootsBase.getRequiredClass(Mirrors.scala:56)
scala.reflect.internal.Definitions$DefinitionsClass.ObjectClass$lzycompute(Definitions.scala:286)
scala.reflect.internal.Definitions$DefinitionsClass.ObjectClass(Definitions.scala:286)
scala.reflect.internal.Definitions$DefinitionsClass.init(Definitions.scala:1585)
scala.tools.nsc.Global$Run.<init>(Global.scala:1205)
ammonite.interp.Compiler$$anon$1.<init>(Compiler.scala:256)
ammonite.interp.Compiler$.apply(Compiler.scala:141)
ammonite.interp.CompilerLifecycleManager.init(CompilerLifecycleManager.scala:98)
ammonite.interp.CompilerLifecycleManager.preprocess(CompilerLifecycleManager.scala:58)
ammonite.interp.Interpreter.compileRunBlock$1(Interpreter.scala:491)
ammonite.interp.Interpreter.$anonfun$processAllScriptBlocks$9(Interpreter.scala:530)
scala.Option$WithFilter.map(Option.scala:242)
ammonite.interp.Interpreter.loop$1(Interpreter.scala:516)
ammonite.interp.Interpreter.processAllScriptBlocks(Interpreter.scala:583)
ammonite.interp.Interpreter.$anonfun$processModule$6(Interpreter.scala:379)
ammonite.util.Catching.flatMap(Res.scala:115)
ammonite.interp.Interpreter.$anonfun$processModule$5(Interpreter.scala:370)
ammonite.util.Res$Success.flatMap(Res.scala:62)
ammonite.interp.Interpreter.processModule(Interpreter.scala:360)
ammonite.interp.Interpreter.$anonfun$initializePredef$1(Interpreter.scala:126)
ammonite.interp.Interpreter.$anonfun$initializePredef$1$adapted(Interpreter.scala:126)
ammonite.interp.PredefInitialization$.$anonfun$apply$7(PredefInitialization.scala:75)
ammonite.util.Res$.$anonfun$fold$1(Res.scala:32)
scala.collection.LinearSeqOps.foldLeft(LinearSeq.scala:169)
scala.collection.LinearSeqOps.foldLeft$(LinearSeq.scala:165)
scala.collection.immutable.List.foldLeft(List.scala:79)
ammonite.util.Res$.fold(Res.scala:30)
ammonite.interp.PredefInitialization$.apply(PredefInitialization.scala:63)
ammonite.interp.Interpreter.initializePredef(Interpreter.scala:128)
ammonite.repl.Repl.initializePredef(Repl.scala:142)
ammonite.Main.run(Main.scala:212)
ammonite.MainRunner.$anonfun$runRepl$1(Main.scala:408)
ammonite.MainRunner.watchLoop(Main.scala:389)
ammonite.MainRunner.runRepl(Main.scala:408)
ammonite.Main$.main0(Main.scala:307)
ammonite.Main$.main(Main.scala:271)
ammonite.Main.main(Main.scala)
jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method.invoke(Method.java:566)
coursier.cli.launch.Launch$.$anonfun$launch$6(Launch.scala:116)
coursier.cli.launch.Launch$.$anonfun$task$28(Launch.scala:295)
coursier.cli.launch.Launch$.run(Launch.scala:356)
coursier.cli.Coursier$.$anonfun$runA$2(Coursier.scala:79)
coursier.cli.Coursier$.$anonfun$runA$2$adapted(Coursier.scala:67)
coursier.cli.CommandAppPreA.run(CommandAppPreA.scala:22)
caseapp.core.app.CommandAppWithPreCommand.$anonfun$main$5(CommandAppWithPreCommand.scala:98)
caseapp.core.app.CommandAppWithPreCommand.$anonfun$main$5$adapted(CommandAppWithPreCommand.scala:98)
scala.util.Either.fold(Either.scala:191)
caseapp.core.app.CommandAppWithPreCommand.$anonfun$main$3(CommandAppWithPreCommand.scala:98)
caseapp.core.app.CommandAppWithPreCommand.$anonfun$main$3$adapted(CommandAppWithPreCommand.scala:84)
scala.Option.foreach(Option.scala:274)
caseapp.core.app.CommandAppWithPreCommand.main(CommandAppWithPreCommand.scala:84)
coursier.cli.Coursier.main(Coursier.scala)
jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method.invoke(Method.java:566)
coursier.bootstrap.launcher.a.a(Unknown Source)
coursier.bootstrap.launcher.Launcher.main(Unknown Source)
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:12 (8 by maintainers)
Top Results From Across the Web
scalacenter/bloop - Gitter
Hi everyone I am wondering if anyone else is running into this issue but when I do bloop console <some-project I get the...
Read more >scala.reflect.internal.MissingRequirementError: object java ...
I solved this issue ,I found that I used java 9 that isn't compatible with scala version so I migrated from java 9...
Read more >CLI tutorial · Bloop - Scala Center
The Bloop CLI allows you to run Bloop commands from the comfort of the. ... bloop console foo Compiling foo (1 Scala source)...
Read more >coursier cli - ms.fr.edu.vn Search
Unexpected `MissingRequirementError` with bloop console - Lightrun lightrun.com › answers › scalacenter-bloop-une... Method.invoke(Method.java:566) ...
Read more >Meet bloop, a fast tool to compile and test your project
Martin Duhem and I are happy to announce Bloop, a tool that Scala ... Supporting console , a faster testQuick , and built-in...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
From what I checked this might be an issue with missing jars on classpath, updating coursier should help as I did have the same problem with an older version, but it worked after updating.
Hmm… This might be it, I tested it all again and it doesn’t work again. I might have had JDK 8 by mistake since I was switching back and forth a lot. I checked what classpath is loaded and i all seems correct: