question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unexpected `MissingRequirementError` with bloop console

See original GitHub issue

Hey, 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:open
  • Created 3 years ago
  • Reactions:2
  • Comments:12 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
tgodzikcommented, Dec 3, 2020

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.

0reactions
tgodzikcommented, Dec 7, 2020

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:

> coursier resolve com.lihaoyi:ammonite_2.13.3:2.3.8     
ch.epfl.scala:bsp4j:2.0.0-M6:default
com.github.javaparser:javaparser-core:3.2.5:default
com.google.code.gson:gson:2.8.2:default
com.google.guava:guava:21.0:default
com.google.protobuf:protobuf-java:3.11.4:default
com.lihaoyi:ammonite-interp-api_2.13.3:2.3.8:default
com.lihaoyi:ammonite-interp_2.13.3:2.3.8:default
com.lihaoyi:ammonite-ops_2.13:2.3.8:default
com.lihaoyi:ammonite-repl-api_2.13.3:2.3.8:default
com.lihaoyi:ammonite-repl_2.13.3:2.3.8:default
com.lihaoyi:ammonite-runtime_2.13.3:2.3.8:default
com.lihaoyi:ammonite-terminal_2.13:2.3.8:default
com.lihaoyi:ammonite-util_2.13:2.3.8:default
com.lihaoyi:ammonite_2.13.3:2.3.8:default
com.lihaoyi:fansi_2.13:0.2.9:default
com.lihaoyi:fastparse_2.13:2.3.0:default
com.lihaoyi:geny_2.13:0.6.2:default
com.lihaoyi:mainargs_2.13:0.1.4:default
com.lihaoyi:os-lib_2.13:0.7.1:default
com.lihaoyi:pprint_2.13:0.5.9:default
com.lihaoyi:requests_2.13:0.6.5:default
com.lihaoyi:scalaparse_2.13:2.3.0:default
com.lihaoyi:sourcecode_2.13:0.2.1:default
com.lihaoyi:ujson_2.13:1.2.0:default
com.lihaoyi:upack_2.13:1.2.0:default
com.lihaoyi:upickle-core_2.13:1.2.0:default
com.lihaoyi:upickle-implicits_2.13:1.2.0:default
com.lihaoyi:upickle_2.13:1.2.0:default
com.thesamet.scalapb:lenses_2.13:0.10.3:default
com.thesamet.scalapb:scalapb-runtime_2.13:0.10.3:default
io.get-coursier:interface:0.0.21:default
net.java.dev.jna:jna:5.3.1:default
org.eclipse.lsp4j:org.eclipse.lsp4j.generator:0.8.1:default
org.eclipse.lsp4j:org.eclipse.lsp4j.jsonrpc:0.8.1:default
org.eclipse.xtend:org.eclipse.xtend.lib:2.18.0:default
org.eclipse.xtend:org.eclipse.xtend.lib.macro:2.18.0:default
org.eclipse.xtext:org.eclipse.xtext.xbase.lib:2.18.0:default
org.javassist:javassist:3.21.0-GA:default
org.jline:jline:3.15.0:default
org.jline:jline-reader:3.14.1:default
org.jline:jline-terminal:3.14.1:default
org.jline:jline-terminal-jna:3.14.1:default
org.scala-lang:scala-compiler:2.13.3:default
org.scala-lang:scala-library:2.13.3:default
org.scala-lang:scala-reflect:2.13.3:default
org.scala-lang.modules:scala-collection-compat_2.13:2.1.6:default
org.scala-lang.modules:scala-xml_2.13:1.2.0:default
org.scalameta:common_2.13:4.3.20:default
org.scalameta:fastparse-utils_2.13:1.0.1:default
org.scalameta:fastparse_2.13:1.0.1:default
org.scalameta:trees_2.13:4.3.20:default
Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found