无法部署 Scala Web 应用程序

Unable to deploy Scala web application

我正在尝试部署一个使用 Play 框架和 Scala 构建的简单 Web 应用程序。该应用程序工作正常,当我 运行 使用 sbt run 命令的应用程序时,但是,当我尝试在我的本地服务器中使用 sbt dist 命令部署该应用程序时,我得到以下消息

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.google.inject.internal.cglib.core.$ReflectUtils (file:/D:/Scala/SomeDomain/SomeProject/target/universal/SomeProject-1.0-SNAPSHOT/lib/com.google.inject.guice-4.2.2.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
WARNING: Please consider reporting this to the maintainers of com.google.inject.internal.cglib.core.$ReflectUtils
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
Oops, cannot start the server.
com.google.inject.CreationException: Unable to create injector, see the following errors:

1) Error injecting constructor, java.io.IOException: Dictionary directory does not exist: D:\Scala\SomeDomain\SomeProject\target\universal\SomeProject-1.0-SNAPSHOT\bin\dict
  at initializer.ServiceInitializer.<init>(ServiceInitializer.scala:11)
  at initializer.ApplicationInitializer.configure(ApplicationInitializer.scala:12) (via modules: com.google.inject.util.Modules$OverrideModule -> initializer.ApplicationInitializer)
  while locating initializer.ServiceInitializer

我正在使用 Windows,我提取了生成的 .zip 文件并执行了 /bin 目录中的 .bat 文件。

build.sbt


version := "1.0-SNAPSHOT"

lazy val root = (project in file(".")).enablePlugins(PlayScala, LauncherJarPlugin)

scalaVersion := "2.12.10"

libraryDependencies += guice
libraryDependencies += "org.scalatestplus.play" %% "scalatestplus-play" % "5.0.0" % Test
libraryDependencies += "postgresql" % "postgresql" % "9.1-901-1.jdbc4"

plugins.sbt

addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.8.0")
addSbtPlugin("org.foundweekends.giter8" % "sbt-giter8-scaffold" % "0.11.0")

您应用程序的某些组件似乎需要一个目录:

java.io.IOException: Dictionary directory does not exist: D:\Scala\SomeDomain\SomeProject\target\universal\SomeProject-1.0-SNAPSHOT\bin\dict

确保创建目录,或将丢失的文件添加到您的 dist。