Reputation: 345
I'm trying to deploy a simple web application built using Play framework with Scala. The application is working fine, when I run the application using sbt run
command, however, when I tried to deploy the application, in my local server, using sbt dist
command, I'm getting the following message
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.google.inject.internal.cglib.core.$ReflectUtils$1 (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$1
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
I'm using Windows, I extracted the generated .zip
file and executed the .bat
file from the /bin
directory.
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")
Upvotes: 1
Views: 150
Reputation: 4608
Seems like some component of you application expects a directory to exist:
java.io.IOException: Dictionary directory does not exist: D:\Scala\SomeDomain\SomeProject\target\universal\SomeProject-1.0-SNAPSHOT\bin\dict
Ensure to create the directory, or add the missing files to your dist.
Upvotes: 1