problem about playframework-2.2-Collection of common programming errors


  • user1136342
    unit-testing ssl junit ssl-certificate playframework-2.2
    Is it possible to write a test with Play’s built-in testing for an SSL page? I use the example Integration test:import org.junit.*;import play.mvc.*; import play.test.*; import play.libs.F.*;import static play.test.Helpers.*; import static org.fest.assertions.Assertions.*;import static org.fluentlenium.core.filter.FilterConstructor.*;public class IntegrationTest {/*** add your integration test here* in this example we just check if the welcome page is being shown*/@Testpublic void test() {runnin

  • Chafik
    mysql validation ebean playframework-2.2
    I am developing an app with Play 2.2.0 and Ebean. I have a problem when creating directly entities by code, not using a form. Let’s say this is my entity :import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.Table; import javax.validation.constraints.NotNull;import models.SuperEntity;import com.avaje.ebean.validation.Length;@Entity @Table(name = “foos”) public class Foo extends SuperEntity {@Column(unique = true)@NotNull@Length(min = 2, max = 2)public String

  • ticofab
    scala playframework akka actor playframework-2.2
    The context.parent reference does not do it, for me. In a Play project, I launch a new actor to deal with each incoming request:val myActor: ActorRef = system.actorOf(Props(classOf[MyActor])val future: Future[String] = (myActor ? Hello)(5.seconds).mapTo[String]future.map(result => Ok(result)).recover {case ex: AskTimeoutException => Ok(“timeout expired”)case _ => Ok(“error”) }This triggers more actor messaging in the receive method of myActor: when anotherActor responds to myActor, the

  • Robin Green
    json scala generics playframework playframework-2.2
    Is it possible to create a generic function in Scala, using Play Framework 2.2, that will serialize an arbitrary object to JSON, without having to be supplied a writer or formatter?For instance, this non-generic code will create a JSON response given a Customer:import play.api.libs.json._ import play.api.libs.functional.syntax._case class Customer(id: Int, name: String)object scratch {val p = Customer(1, “n”) //> p : Customer = Customer(1,n)def createJsonResponseCustom

  • Chris
    playframework newrelic playframework-2.2
    With previous version of the Java Play framework, we could provide a command line argent to load monitoring agents. For example, NewRelic could be loaded as./path/to/start -javaagent:/path/to/newrelic.jarWith the release of the 2.2, the Play team has significantly changed the start script. From what I can tell, it no longer supports javaagents. Has any else gotten NewRelic running with Java Play 2.2+? Play is great, but its useless tech if you can’t monitor it in a production environment…

  • Petro Verheles
    heroku playframework-2.2
    I’m trying to deploy java computer-database example from play 2.2.0 framework. The steps I do in the root of the project:git init git add . git commit -m “init” heroku create git push heroku masterAfter the step 5 the app is deployed to heroku and tries to start, but fails with unclear java.lang.NullPointerException. Here are the last few lines of build log:[SUCCESSFUL ] org.fusesource.jansi#jansi;1.4!jansi.jar (363ms):: retrieving :: org.scala-sbt#boot-scalaconfs: [default]5 artifacts copied, 0

  • Carla
    scala heroku deployment scala-2.10 playframework-2.2
    I’ve been fighting with this for hours and I can’t figure out why after deploying my Scala Play 2.2 application in Heroku I get this stacktrace:2013-09-30T01:05:09.413177+00:00 heroku[web.1]: Starting process with command `target/start -Dhttp.port=18174 $PLAY_OPTS` 2013-09-30T01:05:10.931893+00:00 app[web.1]: bash: target/start: No such file or directory 2013-09-30T01:05:12.382399+00:00 heroku[web.1]: Process exited with status 127 2013-09-30T01:05:12.414050+00:00 heroku[web.1]: State changed fr

  • user2924344
    javascript jquery requirejs playframework-2.2 webjars
    After upgrade to play 2.2, I cannot make requirejs work as before.It seems to me that the requirejs is not initialized or configured correctly. I tried to follow https://github.com/mariussoutier/play-angular-require-seed, but I cannot even make the simplest case to work.jquery can be located correctly in main.js, but require([‘jquery’]…..) does not work in tag.If someone could help me with this, it would be appreciated a lot.webjars definitionlibraryDependencies ++= Seq(javaJdbc,javaEbean,cac

Web site is in building