playframework-2.2

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

懵懂的女人 提交于 2019-12-29 06:43:06
问题 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? 回答1: 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

Play Framework 2.2 : Error: This exception has been logged with id

谁都会走 提交于 2019-12-25 07:58:50
问题 I am completed building a website in Play framework. The website is deployed at server. But, I am facing some random occurring issue like this one.. This exception has been logged with id 6ilmmm0fk. I got the same error previously as well. So, I restarted the complete application and it was gone. But, again I am facing the same error. Why is this error occurring? I got the stack trace that looks like this play.api.Application$$anon$1: Execution exception[[SQLException: Timed out waiting for a

Why is Eclipse not able to resolve Guice import in Play 2.2.x application?

谁说我不能喝 提交于 2019-12-25 07:06:56
问题 I'm trying to use Google Guice Injections in my Play 2.2.2 project. My build.sbt file contains this: libraryDependencies ++= Seq( javaJdbc, javaEbean, cache, "com.google.inject" % "guice" % "4.0-beta", "ws.securesocial" %% "securesocial" % "2.1.4", "postgresql" % "postgresql" % "9.1-901-1.jdbc4" ) When running play dependencies , I can see that the guice dependency is being resolved correctly. However, when trying to make the import com.google.inject.* statement it seems that the library is

Nested form in Play! Scala 2.2

不羁的心 提交于 2019-12-25 01:55:43
问题 I have read several times the documentation but I still have problems with my nested form in Play! Scala 2.2 (detailed further). Here is my form : <form method="post" action="/admin/test2"> first name : <input type="text" name="firstname"> <br> info 0 : <input type="text" name="label[0]"> <br> info 1 : <input type="text" name="label[1]"> <br> <input type="submit" value="test nested form" /> </form> And the case classes corresponding : case class Contact(firstname: String, informations: Seq

Play Framework Ebean two ManyToMany relations return same data

流过昼夜 提交于 2019-12-24 13:42:36
问题 My code looks like this: @Entity public class Document extends Model { @Id private Long id; @ManyToMany(cascade = CascadeType.ALL) @JoinTable(name = "developers") private Set<Tester> developers = new HashSet<>(); @ManyToMany(cascade = CascadeType.ALL) @JoinTable(name = "testers") private Set<Tester> testers = new HashSet<>(); } I am using the JoinTable annotation otherwise I end up with the same join table for the many-to-many relation. This works well and I get two tables generated

Run scala console with play 2.2 jars

a 夏天 提交于 2019-12-24 12:42:32
问题 I saw people using play apis in the scala console. How can I import multiple play's jars to scala console? https://stackoverflow.com/a/17684559/772481 I tried this command, but it didn't work. $ scala -cp /usr/local/Cellar/play/2.2.0/libexec/repository/local/com.typesafe.play/play_2.10/2.2.0/jars/*.jar 回答1: Your approach was right. scala REPL understands all scalac options, so scala -cp is the right option. However, you'll have to list all jars separately in the classpath separated by colon

Questions about installing Deadbolt on Play 2.2.1

不羁岁月 提交于 2019-12-24 05:10:25
问题 As stated here if I put the resolvers in plugins.sbt Play doesn't see them. But it works if I move them in build.sbt . Is there a reason? Another problem: if there isn't the file play.plugins I get this error: "**Exception:** The Deadbolt Java plugin was not registered, or is disabled. Please check your conf/play.plugins file." But it isn't written in any installation guide that play.plugins is needed to install Deadbolt (maybe it was needed for older version). source 1 source 2 In conclusion

why play framework project in intellij taking too much time to load in browser

无人久伴 提交于 2019-12-24 04:50:25
问题 I have a play framework project in my Intellij IDE when I reload page in browser Its takes 6 minutes to completely reload page in browser and in my console it starts the server and stops it and so on for six minutes My Console ouput --- (RELOAD) --- INFO - Shutting down connection pool... DEBUG - Terminating pool watch thread INFO - Connection pool has been shutdown. DEBUG - Connection pool has been shut down INFO - datasource [jdbc:postgresql://localhost:5432/portaljob] bound to JNDI as

AspectJ in Play Framework 2.2.1 (Java)

我的梦境 提交于 2019-12-23 20:45:06
问题 I would like to include AspectJ-Weaving in a Play (2.2.1) project. I only found one answer explaining how to add AspectJ to Play (2.1.1) projects. In version 2.2.1 however the project layout changed and there is no Build.scala anymore. In its place build.sbt files are used in newer projects. Can anyone tell me how to add AspectJ to new Play projects? Update: I tried using AspectJ in a Play 2.1.3 project using the configuration provided in the link above. I did in fact get play to compile and

Defining and referencing a generic type bound in Play template signature

房东的猫 提交于 2019-12-23 18:45:58
问题 I have a number of sorted maps, keyed by a time and with a value of some type . For illustration, consider that I have 3 maps (in Java): SortedMap<OffsetDateTime, Foo> foo; SortedMap<OffsetDateTime, Boo> bar; SortedMap<OffsetDateTime, Baz> baz; I wish to write a generic Play template that accepts a map, and a renderer function, and outputs each pair. Within a template, I can define a local function with the following signature: @renderTrace[T <: Any](trace: ImmutableSortedMap[OffsetDateTime,