playframework-2.3

assets are not loaded in functional test mode

余生颓废 提交于 2019-11-29 07:02:17
The answer to my problem is probably very simple and stupid but, can't find it by myself so far. Using Play Framework, emberjs and FluentLenium, I wrote a very simple functional test but can't make it works under IntelliJ IDEA 13 . For some reason, every assets located in the public/ and app/ folders are not found when I run the test with IntelliJ. Here's my code : import org.junit.Test; import play.libs.F.Callback; import play.test.TestBrowser; import play.test.WithApplication; import static org.fest.assertions.Assertions.assertThat; import static play.test.Helpers.*; public class

Why does sbt fail with NoClassDefFoundError: play/Play$ in Play 2.2.x projects after sbt compile in Play 2.3 project?

时光怂恿深爱的人放手 提交于 2019-11-29 06:07:28
Once I run 'sbt compile' on a 2.3 play project, I can't use 'sbt compile' to compile any Play 2.2.x projects anymore. This is the error when I run sbt command. [info] Loading project definition from /Users/macbookpro/playproject/project [error] java.lang.NoClassDefFoundError: play/Play$ [error] Use 'last' for the full log. Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore? I just had this same issue. In my case I was using Play 2.4, but it's probably the same cause. I had run activator ui in my project directory accidentally. It created a project/play-fork-run.sbt file which is for

Restarting Play application Docker container results in 'This application is already running' - RUNNING_PID is not deleted

二次信任 提交于 2019-11-28 23:23:22
Edit: There is a related issue being discussed on Github but in another mode of deployment (Typesafe Activator UI and not Docker). I was trying to simulate a system reboot in order to verify the Docker restart policy which declares to be able to re-run containers in the correct order. I have a Play framework application written in Java. The Dockerfile looks like this: FROM ubuntu:14.04 # # [Java8, ...] # RUN chmod +x /opt/bin/playapp CMD ["/bin/bash"] I start it using $ docker run --restart=always -d --name playappcontainer "./opt/bin/playapp" . When I $ service docker stop && service docker

Was asynchronous jobs removed from the Play framework? What is a better alternative?

試著忘記壹切 提交于 2019-11-28 05:47:12
问题 I wanted to use Job so I can kick them off on the start of application. Now it seems like it has been removed from Play completely? I saw some samples where people create a Global class, but not entirely sure if/how I should use that to replace Job . Any suggestions? Edit: If you gonna downvote, give a reason. Maybe I'm missing something in the question, maybe this doesn't belong here. At least something... 回答1: The Job class was removed in Play 2.0. You have some alternatives though

22 fields limit in Scala 2.11 + Play Framework 2.3 Case classes and functions

北城以北 提交于 2019-11-28 04:40:01
Scala 2.11 is out and the 22 fields limit for case classes seems to be fixed ( Scala Issue , Release Notes ). This has been an issue for me for a while because I use case classes to model database entities that have more than 22 fields in Play + Postgres Async . My solution in Scala 2.10 was to break the models into multiple case classes, but I find this solution hard to maintain and extend, and I was hoping I could implement something as described below after switching to Play 2.3.0-RC1 + Scala 2.11.0: package entities case class MyDbEntity( id: String, field1: String, field2: Boolean, field3

assets are not loaded in functional test mode

浪尽此生 提交于 2019-11-28 00:54:54
问题 The answer to my problem is probably very simple and stupid but, can't find it by myself so far. Using Play Framework, emberjs and FluentLenium, I wrote a very simple functional test but can't make it works under IntelliJ IDEA 13 . For some reason, every assets located in the public/ and app/ folders are not found when I run the test with IntelliJ. Here's my code : import org.junit.Test; import play.libs.F.Callback; import play.test.TestBrowser; import play.test.WithApplication; import static

Scala case having 22 fields but having issue with play-json in scala 2.11.5

为君一笑 提交于 2019-11-27 19:21:17
With Scala 2.11, we are allowed to have more then 22 fields in a case class right?? case class SomeResponse( var compositeKey: String, var id1: String, var id2: String, var firstName: String, var lastName: String, var email: String, var email2: String, var birth: Long, var gender: String, var phone: Phone, var city: String, var zip: String, var carriage: Boolean, var carriage2: Boolean, var fooLong: Long, var fooLong2: Long, var suspended: Boolean, var foo: Foo, var address: String, var suite: String, var state: String, var instructions: String) implicit val formatSomeResponse = Json.format

Restarting Play application Docker container results in 'This application is already running' - RUNNING_PID is not deleted

一个人想着一个人 提交于 2019-11-27 14:55:52
问题 Edit: There is a related issue being discussed on Github but in another mode of deployment (Typesafe Activator UI and not Docker). I was trying to simulate a system reboot in order to verify the Docker restart policy which declares to be able to re-run containers in the correct order. I have a Play framework application written in Java. The Dockerfile looks like this: FROM ubuntu:14.04 # # [Java8, ...] # RUN chmod +x /opt/bin/playapp CMD ["/bin/bash"] I start it using $ docker run --restart

22 fields limit in Scala 2.11 + Play Framework 2.3 Case classes and functions

陌路散爱 提交于 2019-11-27 05:24:34
问题 Scala 2.11 is out and the 22 fields limit for case classes seems to be fixed (Scala Issue, Release Notes). This has been an issue for me for a while because I use case classes to model database entities that have more than 22 fields in Play + Postgres Async. My solution in Scala 2.10 was to break the models into multiple case classes, but I find this solution hard to maintain and extend, and I was hoping I could implement something as described below after switching to Play 2.3.0-RC1 + Scala

Scala case having 22 fields but having issue with play-json in scala 2.11.5

China☆狼群 提交于 2019-11-26 22:47:48
问题 With Scala 2.11, we are allowed to have more then 22 fields in a case class right?? case class SomeResponse( var compositeKey: String, var id1: String, var id2: String, var firstName: String, var lastName: String, var email: String, var email2: String, var birth: Long, var gender: String, var phone: Phone, var city: String, var zip: String, var carriage: Boolean, var carriage2: Boolean, var fooLong: Long, var fooLong2: Long, var suspended: Boolean, var foo: Foo, var address: String, var suite