kaliber-scala / play-s3

S3 module for Play
MIT License
119 stars 49 forks source link

Not working with Play 2.4.0 #51

Closed bwlim closed 9 years ago

bwlim commented 9 years ago

play-s3 5.0.2 may not be compatible with Play 2.4.0

I've got warning messages while building Play 2.4.0 project -----------------------------------------------

[warn] There may be incompatibilities among your library dependencies. [warn] Here are some of the libraries that were evicted: [warn] * com.typesafe.play:play-ws_2.11:(2.3.0, 2.3.4) -> 2.4.0 (caller: XXXXplay:XXXXplay_2.11:1.0-SNAPSHOT, nl.rhinofly:play-aws-utils_2.11:4.1.0, nl.rhinofly:play-s3_2.11:5.0.2)

And got runtime error -----------------------------------------------

[ERROR] [06/04/2015 17:58:49.841] [application-multimedia-proc-23] [ActorSystem(application)] Uncaught fatal error from thread [application-multimedia-proc-23] shutting down ActorSystem [application] java.lang.NoSuchMethodError: play.api.libs.ws.WS$.url(Ljava/lang/String;Lplay/api/Application;)Lplay/api/libs/ws/WSRequestHolder; at fly.play.aws.Aws$AwsRequestBuilder.url(Aws.scala:23) at fly.play.s3.S3.put(S3.scala:113) at fly.play.s3.Bucket.add(Bucket.scala:102) at controllers.NewnalWebImage$$anonfun$uploadFileToS3$1.apply(NewnalWebImage.scala:189) at controllers.NewnalWebImage$$anonfun$uploadFileToS3$1.apply(NewnalWebImage.scala:187) at scala.concurrent.Future$$anonfun$flatMap$1.apply(Future.scala:251) at scala.concurrent.Future$$anonfun$flatMap$1.apply(Future.scala:249) at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:32) at akka.dispatch.BatchingExecutor$AbstractBatch.processBatch(BatchingExecutor.scala:55) at akka.dispatch.BatchingExecutor$BlockableBatch$$anonfun$run$1.apply$mcV$sp(BatchingExecutor.scala:91) at akka.dispatch.BatchingExecutor$BlockableBatch$$anonfun$run$1.apply(BatchingExecutor.scala:91) at akka.dispatch.BatchingExecutor$BlockableBatch$$anonfun$run$1.apply(BatchingExecutor.scala:91) at scala.concurrent.BlockContext$.withBlockContext(BlockContext.scala:72) at akka.dispatch.BatchingExecutor$BlockableBatch.run(BatchingExecutor.scala:90) at akka.dispatch.TaskInvocation.run(AbstractDispatcher.scala:40) at akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(AbstractDispatcher.scala:397) at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260) at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339) at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979) at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)

Please support Play 2.4.x :D

EECOLOR commented 9 years ago

I have not had enough time to work on the library. You might check out 6.0.0-RC1, however that one has also been compiled with Play 2.3.

bwlim commented 9 years ago

I think Play 2.4 has made breaking changes for WS apis See WS Client section of Play 2.4 migration guide https://www.playframework.com/documentation/2.4.x/Migration24#WS-client I hope and wait for play-s3 to be updated to support Play 2.4 smoothly~ :D

EECOLOR commented 9 years ago

I hope to be able to release 6.0.0 soon, that would allow me to update the library to 2.4 as well.

ghingis commented 9 years ago

@bwlim You should add this to your build.sbt. It won't solve the problem, but the least it will mask it and you will be able to run your project againg.

libraryDependencies ++= Seq(
  ...
  ws, // <- this is the one you will need
  ...
)
neilchaudhuri commented 9 years ago

+1

I have run into the issue as well as I have begun to migrate my Play application to 2.4.3. Is there any movement on this, or would you recommend I refactor to use the Amazon Java APIs? S3 integration is critical for my application.

By the way, is the only issue making WSClient and Configuration injectable?

EECOLOR commented 9 years ago

We have reserved time upcoming friday to upgrade our libraries to Play 2.4

neilchaudhuri commented 9 years ago

Great news. I think I can speak for other users when I say we really love this library and appreciate the time from you and your team.

EECOLOR commented 9 years ago

The library has been updated. Note that is has been published under a different organisation:

https://github.com/Kaliber/play-s3

"net.kaliber" %% "play-s3" % "7.0.0"

resolvers += "Kaliber Internal Repository" at "https://jars.kaliber.io/artifactory/libs-release-local"