Environment
- Windows 11
- Java 11
- Scala 2.13.4
- Akka 2.8.0
- IDEA 2023.1
Project
I modified nothing about the official project. The guide shows command of compile and run.
- Compile:
sbt compile
- Run:
sbt runMain com.example.helloworld.GreeterServer
Error Log
[info] running (fork) com.example.helloworld.GreeterServer
[info] [2023-04-15 12:13:36,854] [INFO] [akka.event.slf4j.Slf4jLogger] [GreeterServer-akka.actor.default-dispatcher-3] [] - Slf4jLogger started
[error] Exception in thread "main" java.lang.NoClassDefFoundError: akka/parboiled2/ParserInput
[error] at akka.http.scaladsl.model.headers.User$minusAgent$.apply(headers.scala:1094)
[error] at akka.http.impl.settings.ClientConnectionSettingsImpl$.$anonfun$fromSubConfig$1(ClientConnectionSettingsImpl.scala:58)
[error] at scala.Option.map(Option.scala:242)
[error] at akka.http.impl.settings.ClientConnectionSettingsImpl$.fromSubConfig(ClientConnectionSettingsImpl.scala:58)
[error] at akka.http.impl.settings.ConnectionPoolSettingsImpl$.fromSubConfig(ConnectionPoolSettingsImpl.scala:102)
[error] at akka.http.impl.settings.ConnectionPoolSettingsImpl$.fromSubConfig(ConnectionPoolSettingsImpl.scala:88)
[error] at akka.http.impl.util.SettingsCompanionImpl.apply(SettingsCompanionImpl.scala:51)
[error] at akka.http.scaladsl.settings.ConnectionPoolSettings$.apply(ConnectionPoolSettings.scala:97)
[error] at akka.http.scaladsl.settings.ConnectionPoolSettings$.apply(ConnectionPoolSettings.scala:87)
[error] at akka.http.scaladsl.settings.SettingsCompanion.apply(SettingsCompanion.scala:19)
[error] at akka.http.scaladsl.settings.SettingsCompanion.apply$(SettingsCompanion.scala:19)
[error] at akka.http.scaladsl.settings.ConnectionPoolSettings$.apply(ConnectionPoolSettings.scala:87)
[error] at akka.http.scaladsl.HttpExt.<init>(Http.scala:84)
[error] at akka.http.scaladsl.Http$.createExtension(Http.scala:1112)
[error] at akka.http.scaladsl.Http$.createExtension(Http.scala:846)
[error] at akka.actor.ActorSystemImpl.registerExtension(ActorSystem.scala:1187)
[error] at akka.actor.ExtensionId.apply(Extension.scala:78)
[error] at akka.actor.ExtensionId.apply$(Extension.scala:77)
[error] at akka.http.scaladsl.Http$.apply(Http.scala:1107)
[error] at akka.http.scaladsl.Http$.apply(Http.scala:846)
[error] at akka.actor.ExtensionId.apply(Extension.scala:84)
[error] at akka.actor.ExtensionId.apply$(Extension.scala:84)
[error] at akka.http.scaladsl.Http$.apply(Http.scala:1106)
[error] at akka.http.scaladsl.Http$.apply(Http.scala:846)
[error] at com.example.helloworld.GreeterServer.run(GreeterServer.scala:55)
[error] at com.example.helloworld.GreeterServer$.main(GreeterServer.scala:42)
[error] at com.example.helloworld.GreeterServer.main(GreeterServer.scala)
[error] Caused by: java.lang.ClassNotFoundException: akka.parboiled2.ParserInput
[error] at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
[error] at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
[error] at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
[error] ... 27 more
Another Problem about the Akka gRPC plugin.
I posted it before.
- https://youtrack.jetbrains.com/issue/SCL-21118/IDEA-cant-do-packages-importing-which-built-by-SBT-with-.proto-file.
- SBT compiled .proto, but IDEA can't recognize the trait built by it?
It’s my confusion:
- Why can only running the command
sbt compile
in terminal compile the.proto
files, but not “Build Project” in IDEA? - Why can’t the IDEA import the compiling result of
.proto
, event now in the official project?
Thanks.