Support for Play 2.2.3 #550

Closed
ganddev opened this Issue May 5, 2014 · 8 comments

Projects

None yet

4 participants

@ganddev
ganddev commented May 5, 2014

Are there any plans to support the play version 2.2.3? Because I get a NoClassDefFound Exception for TypesScanner.
Stacktrace:
java.lang.NoClassDefFoundError: org/reflections/scanners/TypesScanner
play.libs.Classpath.getReflections(Classpath.java:48)
play.libs.Classpath.getTypes(Classpath.java:25)
play.db.ebean.EbeanPlugin.onStart(EbeanPlugin.java:62)
play.api.Play$$anonfun$start$1$$anonfun$apply$mcV$sp$1.apply(Play.scala:88)
play.api.Play$$anonfun$start$1$$anonfun$apply$mcV$sp$1.apply(Play.scala:88)
scala.collection.immutable.List.foreach(List.scala:318)
play.api.Play$$anonfun$start$1.apply$mcV$sp(Play.scala:88)
play.api.Play$$anonfun$start$1.apply(Play.scala:88)
play.api.Play$$anonfun$start$1.apply(Play.scala:88)
play.utils.Threads$.withContextClassLoader(Threads.scala:18)
play.api.Play$.start(Play.scala:87)
play.core.ReloadableApplication$$anonfun$get$1$$anonfun$apply$1$$anonfun$1.apply(ApplicationProvider.scala:139)
play.core.ReloadableApplication$$anonfun$get$1$$anonfun$apply$1$$anonfun$1.apply(ApplicationProvider.scala:112)
scala.Option.map(Option.scala:145)

@fehguy
Member
fehguy commented May 5, 2014

Typesafe revises and breaks Play with reckless abandon. Can you see what version of reflections you're using? You may need to force 0.9.8--it shouldn't affect swagger-core to do so.

@ganddev
ganddev commented May 5, 2014

I had a look at the Dependencies.scala and it seems that play uses version 0.9.8.
"
"org.reflections" % "reflections" % "0.9.8" notTransitive ())
.exclude("com.google.guava", "guava")
.exclude("javassist", "javassist"),
"

@fehguy
Member
fehguy commented May 5, 2014

got it. Can you force 0.9.8 during your app build?

@ganddev
ganddev commented May 6, 2014

What do you mean by forcing? As I mentioned play uses 0.9.8

@fehguy
Member
fehguy commented May 6, 2014

Meaning, you can exclude the Reflections 0.9.9-RC from the swagger-play2 module. I believe it will work fine like that. You can also revert to 1.3.4 which I believe used reflections 0.9.8

@herrmann

Swagger 1.3.3 (not 1.3.4) appears to be the correct version for Play 2.2.3.

@donovanmuller
Contributor

For anybody else with this issue, here is a quick reference (Play 2.2.3 + swagger-play2 1.3.6)

build.sbt

...
libraryDependencies ++= Seq(
  ...
  "com.wordnik" %% "swagger-play2" % "1.3.6" exclude("org.reflections", "reflections"),
  "org.reflections" % "reflections" % "0.9.8" notTransitive ()
)
...
@fehguy
Member
fehguy commented Jul 13, 2014

1.3.7-SNAPSHOT is available in sonatype snapshots. The exclude is now in the project for play 2.2.

@fehguy fehguy closed this Jul 13, 2014
@fehguy fehguy added a commit that referenced this issue Jul 13, 2014
@fehguy fehguy play 2.2 support #550 573dcb9
@fehguy fehguy added a commit that referenced this issue Jul 13, 2014
@fehguy fehguy play 2.2 support #550 692edb7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment