Questions tagged [playframework-2.1]

Play is based on a lightweight, stateless, web-friendly architecture and features predictable and minimal resource consumption (CPU, memory, threads) for highly-scalable applications.

Play is based on a lightweight, stateless, web-friendly architecture and features predictable and minimal resource consumption (CPU, memory, threads) for highly-scalable applications.

999 questions
166
votes
2 answers

Build.scala, % and %% symbols meaning

I'm new to Play! Framework 2.1 (java version) and have no experience with scala. I don't understand what are and what does % and %% mean in Build.scala. I googled about them but couldn't find their meaning. In my Build.scala file I…
Franco
  • 8,739
  • 7
  • 25
  • 32
47
votes
5 answers

Adding Play JSON Library to sbt

How can I add the Play JSON library (play.api.libs.json) to my sbt project? When I added the following to my plugins.sbt file: addSbtPlugin("play" % "sbt-plugin" % "2.1.0") I faced this error: [warn] …
Kevin Meredith
  • 38,251
  • 58
  • 190
  • 340
37
votes
2 answers

What is a Boxed Error in Scala?

When I run my application, the browser shows [ExecutionException: Boxed Error] It doesn't say anything about the line number, etc. In the console, I have the following ! @6elaah0c8 - Internal server error, for (GET) [/testlearn]…
yzernik
  • 1,050
  • 2
  • 12
  • 18
36
votes
4 answers

How to turn json to case class when case class has only one field

In play 2.1 reads are used to marshall Json to objects. But how can I do this when the case class has only one field. The ideom that works for more fields does not work, as with one field 'and' is not used. Thus I do not get a FunctionBuilder. The…
nebenmir
  • 871
  • 2
  • 8
  • 16
32
votes
3 answers

IllegalStateException: impossible to get artifacts when data has not been loaded for Guava 12.0?

In a Java Play 2.1.1 app I get the following error: [myproject] $ update [info] Updating {file:/C:/path/myproject/}myproject... [info] Resolving ... [error] impossible to get artifacts when data has not been loaded. IvyNode =…
Gonfi den Tschal
  • 1,666
  • 1
  • 20
  • 26
28
votes
2 answers

Play Framework 2: JavaScript gets duplicated as a result of minification (google closure compiler)

I have a weird issue related to JavaScript minification, the problem is that when placing JavaScript files such as test1.js, test2.js inside /assets/javascript/test folder and using following options for closure compiler: val defaultOptions = new…
26
votes
4 answers

How to hash password in play framework (maybe with BCrypt)

I'm a bit new to play framework and password hashing. I tried to find some solutions for hashing my passwords and I found BCrypt. Do you think that's good enough to hashing passwords. And if it's good, how can I get it working in the play framework?…
26
votes
1 answer

Play error: value and is not a member of play.api.libs.json

This is the code I am using: (__ \ "fields").read( (__ \ "key").readNullable[String] and (__ \ "summary").readNullable[String] and (__ \ "description").readNullable[String] tupled ) The complete error in this case is: value and is not a…
EECOLOR
  • 11,034
  • 3
  • 38
  • 72
25
votes
1 answer

How to write Reads[T] and Writes[T] in scala Enumeration (play framework 2.1)

I'm a little bit lost with the new ScalaJson Feature in Play Framework 2.1. I would like to write Reads and Writes in my Enumeration. Here is my code : object EnumA extends Enumeration { type EnumA = Value val VAL1, VAL2, VAL3 = Value def…
victorlambrt
  • 263
  • 3
  • 5
24
votes
8 answers

BCrypt.checkpw() Invalid salt version exception

I'm trying to implement authentication using BCrypt, in my Play 2.1. Java application, but I'm getting Invalid salt version exception when I'm trying to authenticate the user. This is my stack trace play.api.Application$$anon$1: Execution…
ziky90
  • 2,347
  • 4
  • 27
  • 46
21
votes
1 answer

Why do my MongoDB simultaneous $push updates fail?

I'm performing a number of updates of the form update( { "uuid": someUuid, "revision.versionNumber": someVersionNumber}, { "$set": { "meta.someId": someId }, "$push": { "meta.someMessages": someMessage } } ) occasionally I see when this is…
soldier.moth
  • 17,709
  • 14
  • 71
  • 88
21
votes
4 answers

scala.concurrent.Future wrapper for java.util.concurrent.Future

I'm using Play Framework 2.1.1 with an external java library that produces a java.util.concurrent.Future result. I'm using the scala future's as opposed to Akka which I think is the right thing to do as of Play 2.1. How can I wrap the…
Mark Sivill
  • 785
  • 1
  • 7
  • 18
21
votes
6 answers

How do I configure Logback to print out the class name

I'm using Play 2.1. I'm using the default logger play.api.Logger. I'm confused about how it works. In my scala code, a line in class "com.myapp.tickets" in the method "getPayment()" like this Logger.info("getTickets") generates a log message like…
user2141729
  • 243
  • 1
  • 2
  • 6
21
votes
1 answer

Scala to JSON in Play Framework 2.1

I'm trying to convert Scala to JSON in the 2.1RC Play Framework. I can do the following and get JSON: import play.api.libs.json._ val a1=Map("val1"->"a", "val2"->"b") Json.toJSon(a1) Because a1 is just Map[String,String] that works OK. But if I…
George Hernando
  • 2,320
  • 6
  • 30
  • 51
19
votes
2 answers

Simple Websocket in scala / akka / play

I would like to create a simple Websocket application using Scala / Akka / Play. What I see from the examples (such as the webchat or the recent talk at the Scala Days), is a blend between JavaScript / Coffeescript, html templates and so on. The…
ticofab
  • 7,169
  • 11
  • 44
  • 81
1
2 3
66 67