Reputation: 8281
It seems that there is some issue due to the version of specs2.
Here are the errors when I compile the test :
[error] Uncaught exception when running ServiceSpec: java.lang.IncompatibleClassChangeError: Found class scalaz.Memo, but interface was expected
[trace] Stack trace suppressed: run last test:test for the full output.
[error] Uncaught exception when running ApplicationSpec: java.lang.NoClassDefFoundError: Could not initialize class org.specs2.main.Arguments$
[trace] Stack trace suppressed: run last test:test for the full output.
[error] Uncaught exception when running IntegrationSpec: java.lang.NoClassDefFoundError: Could not initialize class org.specs2.main.Arguments$
[trace] Stack trace suppressed: run last test:test for the full output.
[error] Uncaught exception when running FileImportSpec: java.lang.NoClassDefFoundError: Could not initialize class org.specs2.main.Arguments$
[trace] Stack trace suppressed: run last test:test for the full output.
Is there a workaround ?
Upvotes: 3
Views: 381
Reputation: 2500
I just have had the same problem, but for Play 2.5.x. Bumbing up version both of scalaz and specs2 resolved the issue for me:
libraryDependencies ++= Seq(
"org.scalaz" %% "scalaz-core" % "7.2.7",
"org.specs2" %% "specs2-core" % "3.8.6" % "test"
)
Maybe one will find that helpful;)
Upvotes: 0
Reputation: 152
TLDR; Could not find a workaroud, so I downgraded it
The problem is not Play but specs2. My version of specs2 uses : scalaz-core
version 7.1.1
. You can find your own using the sbt dependency graph plugin (The plugin seems to hide test scoped dependencies: remove the test
scope from specs2 dependency)
I had to downgrade the scalaz-core version to 7.1.1
"org.scalaz" %% "scalaz-core" % "7.1.1"
Cheers
Upvotes: 1
Reputation: 4753
Yann, have a look at sbt Dependency overrides to try and force the version of scalaz.
ie. I believe you need something like this in build.sbt (not tested)
dependencyOverrides += "org.scalaz" %% "scalaz-core" % "7.2.0"
Upvotes: 0