Exception in thread "bloop-server-background" java.lang.NoClassDefFoundError #6108
Replies: 3 comments 4 replies
-
@tgodzik any inputs? |
Beta Was this translation helpful? Give feedback.
-
Looks like we are missing one of the libraries for bloop. You might try downloading bloop frontend jars also. We have an utility main class in metals that should do it. |
Beta Was this translation helpful? Give feedback.
-
@tgodzik there seems to weird things happening here. Seems like if I explicitly tell Metals to use my local maven installation |
Beta Was this translation helpful? Give feedback.
-
Hi all,
I am new to Metals and VSCode but have been using maven to do my scala builds for a long time.
I have been trying to get metals server up and running in an air-gapped system which has connectivity to corporate JFrog artifactory server. Coursier Mirror and Custom repositories have been setup and all dependencies have been sorted out.
However, I am unable to get the Metals serer started. Below are system details and error that I am getting.
Error
`
2024.02.09 18:02:14 INFO [INFO] SUCCESS: org.apache.parquet:parquet-jackson:jar:1.12.3:provided (sources = true)
2024.02.09 18:02:14 INFO [INFO] Resolving artifact: com.google.protobuf:protobuf-java:jar:3.21.12:provided (sources = false)
2024.02.09 18:02:14 INFO [INFO] SUCCESS: com.google.protobuf:protobuf-java:jar:3.21.12:provided (sources = false)
2024.02.09 18:02:14 INFO [INFO] Resolving artifact: com.google.protobuf:protobuf-java:jar:3.21.12:provided (sources = true)
2024.02.09 18:02:14 INFO [INFO] SUCCESS: com.google.protobuf:protobuf-java:jar:3.21.12:provided (sources = true)
2024.02.09 18:02:14 INFO [INFO] Generated .bloop/SampleSparkProject-test.json
2024.02.09 18:02:14 INFO [INFO] ------------------------------------------------------------------------
2024.02.09 18:02:14 INFO [INFO] BUILD SUCCESS
2024.02.09 18:02:14 INFO [INFO] ------------------------------------------------------------------------
2024.02.09 18:02:14 INFO [INFO] Total time: 03:40 min
2024.02.09 18:02:14 INFO [INFO] Finished at: 2024-02-09T18:02:14+11:00
2024.02.09 18:02:14 INFO [INFO] ------------------------------------------------------------------------
2024.02.09 18:02:14 INFO time: ran 'mvn bloopInstall' in 3m43s
2024.02.09 18:02:15 INFO Attempting to connect to the build server...
2024.02.09 18:02:15 INFO Setting up current java home /opt/java/jdk-11 in /home/svikas/.bloop/bloop.json
Exception in thread "bloop-server-background" java.lang.NoClassDefFoundError: com/github/plokhotnyuk/jsoniter_scala/core/JsonValueCodec
at bloop.bloopgun.util.Environment$.bloopGlobalSettings(Environment.scala:31)
at bloop.bloopgun.BloopgunCli.startServer(Bloopgun.scala:543)
at bloop.bloopgun.BloopgunCli$FireInBackground$.$anonfun$fire$1(Bloopgun.scala:314)
at bloop.bloopgun.core.Shell$$anon$2.run(Shell.scala:154)
Caused by: java.lang.ClassNotFoundException: com.github.plokhotnyuk.jsoniter_scala.core.JsonValueCodec
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:582)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
... 4 more
Exception in thread "bloop-server-background" java.lang.NoClassDefFoundError: com/github/plokhotnyuk/jsoniter_scala/core/JsonValueCodec
at bloop.bloopgun.util.Environment$.bloopGlobalSettings(Environment.scala:31)
at bloop.bloopgun.BloopgunCli.startServer(Bloopgun.scala:543)
at bloop.bloopgun.BloopgunCli$FireInBackground$.$anonfun$fire$1(Bloopgun.scala:314)
at bloop.bloopgun.core.Shell$$anon$2.run(Shell.scala:154)
Caused by: java.lang.ClassNotFoundException: com.github.plokhotnyuk.jsoniter_scala.core.JsonValueCodec
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:582)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
... 4 more
2024.02.09 18:08:58 ERROR > Attempting a connection to the server...
2024.02.09 18:08:58 ERROR > Attempting a connection to the server...
2024.02.09 18:08:58 ERROR > Attempting a connection to the server...
2024.02.09 18:08:58 ERROR > Attempting a connection to the server...
2024.02.09 18:08:58 ERROR > Attempting a connection to the server...
2024.02.09 18:08:58 ERROR > Attempting a connection to the server...
2024.02.09 18:08:58 ERROR > Attempting a connection to the server...
2024.02.09 18:08:58 ERROR > Attempting a connection to the server...
2024.02.09 18:08:58 ERROR error: The launcher failed to establish a bsp connection, aborting...
2024.02.09 18:08:59 ERROR Failed to connect with build server, no functionality will work.
java.lang.RuntimeException: The server did not start, got FailedToOpenBspConnection
at bloop.launcher.LauncherMain.failPromise$1(Launcher.scala:92)
at bloop.launcher.LauncherMain.runLauncher(Launcher.scala:119)
at scala.meta.internal.metals.BloopServers$$anon$2.run(BloopServers.scala:501)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.lang.Thread.run(Thread.java:834)
`
Can I please get some help here what is causing the ClassNotFoundException here?
Beta Was this translation helpful? Give feedback.
All reactions