All Questions
Tagged with scala playframework
7,319
questions
-1
votes
0
answers
19
views
How to run MySQL scripts when I run docker compose? [duplicate]
I have a Scala backend and Javascript frontend applications and MySQL database. I want to create docker images for every one of them with one docker-compose.yml file and I want to run the scripts for ...
-1
votes
0
answers
59
views
Scala/SBT/Java - When running app locally with java 21 getting InaccessibleObjectException
Hi all I am using scala version 2.12.18, sbt version 1.9.0 and java jdk 21.0.3. When trying to run my application locally through
sbt run -Dconfig.resource=local-qa.conf
I am getting this error:
[...
0
votes
1
answer
32
views
Comparing impact of Scala PlayFramework's db.withConnection and db.withTransaction methods on the underlying postgres database
Given that there is just one simple SQL statement (example: select id from foo) that I need to execute on my Postgres 15 database, I am curious to know the performance impact of executing it using ...
0
votes
2
answers
69
views
Compilation Error: Instance not found: Conversion[models.Errorcode, _ <: Product] on Scala 3 Playframework
I've been recently migrating a playframework project from scala2 to scala3, and I found this error that only happens in scala 3 but it doesnt happen in scala 2:
play.sbt.PlayExceptions$...
1
vote
0
answers
54
views
Can I disable default Marker Context (NoMarker) passed implicitly when using play.api.Logger and require a different MarkerContext is always provided?
I am trying to add a unique request id to logs for each request that is made to a rest api. For that I want to pass implicitly a MarkerContext to each logger method called. Currently the NoMarker ...
0
votes
0
answers
70
views
How to parse large JSON Strings(>5,000,000) using Play JSON?
I'm using Play JSON 2.9.4 in Scala.
implementation group: 'com.typesafe.play', name: 'play-json_2.12', version: '2.9.4
I'm unable to parse JSON Strings larger than 5,000,000 characters.
The exception ...
1
vote
0
answers
23
views
How to pass a value down the call stack in Scala Play app
I need to pass some information down the call stack in a Scala Play application.
For example:
class FooController: play.api.mvc.BaseController {
...
def method1(request: play.mvc.Http.Request) = {
...
0
votes
1
answer
56
views
Is there any way to access a RequestContext in a play framework endpoint?
Is there any function or a way to work around the RequestContext in PlayFramework, that works similarly to Pekko's extractRequestContext?
I'm migrating an old Akka rest API to Play3.0, and I need to ...
0
votes
1
answer
49
views
Send data from a Post Request to the output of a Websocket in Play Framework (Scala)
I need some help with the Play Framework. I have this Websocket that immediately responds with a message to a client. My API has to be able to receive messages from another API, that sends them via ...
0
votes
0
answers
67
views
java.lang.IllegalStateException Sink.asPublisher(fanout = false) only supports one subscriber when using custom Playframework body parser as stream
After looking around stackoverflow and github issues, it seems this happened several times already in different contexts but never received any real help nor solutions so I try my luck once again.
We ...
0
votes
1
answer
131
views
Play! 3.0 NoSuchMethodError: 'com.google.inject.Provider com.google.inject.util.Providers.guicify(javax.inject.Provider)'
I just returned to an old Play! framework project of mine which started in version 2.6.0 and has been updated to version 3.0.2
After fixing errors and updating the project to compile, I got it running!...
0
votes
0
answers
31
views
How to use play framework macros to parse and process json?
I am trying to convert json from one structure to another. In the process I would like to add a prefix to one of the string fields (if it exists). I need to use the play framework.
How would I add-to/...
0
votes
0
answers
29
views
Current User in Models scala playframework 2.8
I'm currently working on a web application using Play Framework 2.8 with Scala. In this application, I need to log which user is performing updates in the models or repositories. However, the system ...
1
vote
1
answer
26
views
Converting JsObjects in Scala: how to use optional fields?
I'm trying to create a scala function that converts a JsObject to one with a different structure.
All values are optional and so the function shouldn't throw an error if they don't appear on the input ...
0
votes
0
answers
17
views
Handling of WebSocket Client Messages in Play Framework
I have a case where my client opens a WebSocket connection upon which I subscribe to a MQTT topic and fetch the messages that I need to publish to this client. It could be that in-between the client ...