17,266 questions
Score of 3
1 answer
65 views
Play Framework's Json.format not working with our models after upgrading to Scala 3?
We're updating to update a pretty large codebase to Scala 3, but are having issues with Play Framework (3.0.11) and more specifically the JSON library (3.0.6). We get a ton of errors like these:
[...
Score of 0
1 answer
85 views
In a Play JSON JsObject, recursively replace the values of each JSON key containing a given substring
I am working with some code that uses Play JSON. It is currently doing some simple password masking of JSON of a known structure for logging purposes.
For instance, given the following JSON:
{
&...
Score of 2
2 answers
160 views
Read JSON in UpperCamelCase (Pascal case) using Jsonx.formatCaseClass from play-json-extensions
I am working on some code which reads from an external REST API that uses UpperCamelCase (a.k.a. Pascal case) for the keys in its JSON responses:
{"FirstKey": "a", "SecondKey&...
Score of 0
1 answer
82 views
Default URL redirection after login
When logging in with a FormClient how can I change the default URL I get redirected to ?
It seems to be "/" by default. Is this the same thing as "callback URL" ?
Score of 0
0 answers
46 views
Play Framework 2.9 upgrade: getMinKeyLength method not found due to io.jsonwebtoken version conflict
I am upgrading my Play Framework project from version 2.8 to 2.9. As part of this, I upgraded my Java version to OpenJDK 17 and updated my build.sbt and plugins.sbt files accordingly.
The project ...
Score of 0
1 answer
126 views
Migration to playframework 3.0 - Error while emitting Routes.scala
I try to migrate old playframework 2.8 to 3.0.8 (jdk 11 -> jdk 21).
And when try to compile: ./sbt clean compile see this error:
[error] Error while emitting Routes.scala
[error] assertion failed: ...
Score of 0
1 answer
113 views
play-pac4j: keep track of active sessions
What's the difference between PlayCacheSessionStore and PlayCookieSessionStore. I mean I understand that one stores data with play cache and the other stores data in cookie but I'm not sure to ...
Score of 0
1 answer
70 views
play.api.UnexpectedException: Unexpected exception[NoClassDefFoundError: javax/validation/ConstraintValidatorFactory]
Title:
Migration Issue to Play Framework 3.0.0: NoClassDefFoundError: javax/validation/ConstraintValidatorFactory
Body:
I'm migrating a Play Framework application from 2.9.4 to 3.0.0 to adopt Jakarta ...
Score of 1
3 answers
287 views
How to write for play framework scala 3 enums reads, writes and format
I could see many threads pointing to solutions for Playframework json to work with scala 2 enums but none I could get working for scala 3 enums. Tried below solutions but not working
case class A(freq:...
Score of 0
1 answer
68 views
Testing play framework controller with multipartdata
He guys,
I'm having issues with testing play controller that handles multipart form data. It expects text field and some files.
The controller uses temporary files def insert(): Action[...
Score of 1
1 answer
97 views
Storing secrets in Play Framework
I am currently migrating all my auth related microservices from Node.js to Scala 2.13 and Play.
Where do you actually store your various password (like DB login, JWT secret, etc.) in your play ...
Score of 0
0 answers
120 views
Play Framework 3.0.5 and jackson-databind version 2.17.0
I have a Play Framework 3.0.5 project on which I needed to update a module which has a requirement for jackson-databind version 2.17.0.
Since get the following error, and don't seem to be able to find ...
Score of 0
1 answer
68 views
Scala/Play cant find custom library
I am a Scala beginner, having some initial issues with classpaths which I think may stem from sbt.
play.api.PlayException: Execution exception[[InjectionException: Injection error, interface my....
Score of 0
1 answer
95 views
Sbt FlywayMigrate Command Hanging after Upgrading Flyway Sbt
After upgrading flyway-sbt from 7.4.0 to 9.22.0 the sbt flywayMigrate command now hangs, e.g. | => root / flywayMigrate {x}s . In our migration scripts, we are creating the indexes concurrently.
...
Score of 1
0 answers
98 views
SAXParseException Being Thrown When Attempting to Upgrade From Scala 2.12.20 to 2.13.0
We're attempting to upgrade our Scala app from 2.12.20 to 2.13.0 but as soon as we do, we get the following error when trying to compile:
[error] (update) org.xml.sax.SAXParseException; lineNumber: 1; ...