Java.lang.ClassNotFoundException: play.core.server.NettyServer when more game libraries are added to build.sbt

I am new to Scala, SBT and Play, so please consider this as a NooB quest. I am creating a sample Play application for a contest and started with a stockpile application as a template. To expand its functionality, naturally, I need to add Security, JDBC connections, etc.

This is the source build.sbt file specified in the template -

scalaVersion := "2.11.1"

libraryDependencies ++= Seq(
  ws, // Play web services module
  "com.typesafe.akka" %% "akka-actor" % "2.3.4",
  "com.typesafe.akka" %% "akka-slf4j" % "2.3.4",
  "org.webjars" % "bootstrap" % "2.3.1",
  "org.webjars" % "flot" % "0.8.0",
  "com.typesafe.akka" %% "akka-testkit" % "2.3.4" % "test"
)

above this I added "com.typesafe.play"% "anorm_2.11"% "2.4.0-M1" to the list immediately after the slf4j dependency, and the application can compile and run.

, - "com.typesafe.play" % "filters-helpers_2.11" % "2.4.0-M1" "com.typesafe.play" % "play-jdbc_2.11" % "2.4.0-1", - Activator "(echo: run) java.lang.ClassNotFoundException: play.core.server.NettyServer".

Netty Server . ?

JDK 8.

scalaVersion := "2.11.1"

libraryDependencies ++= Seq(
  ws, // Play web services module
  "com.typesafe.akka" %% "akka-actor" % "2.3.4",
  "com.typesafe.akka" %% "akka-slf4j" % "2.3.4",
  "org.webjars" % "bootstrap" % "2.3.1",
  "org.webjars" % "flot" % "0.8.0",
  "com.typesafe.akka" %% "akka-testkit" % "2.3.4" % "test",
  "com.typesafe.play" % "anorm_2.11" % "2.4.0-M1",
  "com.typesafe.play" % "filters-helpers_2.11" % "2.4.0-M1",
  "com.typesafe.play" % "play-jdbc_2.11" % "2.4.0-M1"
)

log

Reapplying settings...
Set current project to reactive-stocks (in build file:/D:/Miura/reactive-stocks/)
Reapplying settings...
Set current project to reactive-stocks (in build file:/D:/Miura/reactive-stocks/)
Reapplying settings...
Set current project to reactive-stocks (in build file:/D:/Miura/reactive-stocks/)
Reapplying settings...
Set current project to reactive-stocks (in build file:/D:/Miura/reactive-stocks/)
Running task... Cancel: sbt.TaskCancellationStrategy$Null$@571cf19b, check cycles: false
play.core.server.NettyServer
(echo:run) java.lang.ClassNotFoundException: play.core.server.NettyServer
Run complete.
+4
2

Google, - Play. Play 2.3.3, , , 2.4.

build.sbt

    libraryDependencies ++= Seq(
     jdbc,
     anorm,
     cache,
     ws
+2

:

 Exception in thread "main" java.lang.NoClassDefFoundError: play/core/server/NettyServer
 Caused by: java.lang.ClassNotFoundException: play.core.server.NettyServer
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)

: . , , , .

, .

0

All Articles