Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Sharon (Sean) Rolel
    @Mosho1
    would it be possible to redirect any and all requests into my running app to another url?
    no matter if it's GET, POST etc.
    Henri Cook
    @henricook
    @AlbaroPereyra yes all of those
    Henri Cook
    @henricook
    I've also replicated it on CI, which starts from a base image with nothing cached, and uses sbt 1.2.8
    Henri Cook
    @henricook
    It looks like it's a zinc/gatling dependency that's blocking our adoption of 2.13 :-(
    sbt/zinc#697
    gatling/gatling#3566
    Henri Cook
    @henricook
    and gatling basically say they're not going to upgrade for a very long time
    Abhishek Srivastava
    @abhishes_twitter
    What's wrong with this piece of code?
    package tests
    
    import play.api.routing.Router
    import services.WeatherService
    import play.filters.components.NoHttpFiltersComponents
    import play.api.libs.ws.ahc.AhcWSComponents
    import com.softwaremill.macwire._
    import play.api.ApplicationLoader.Context
    import play.api.BuiltInComponentsFromContext
    
    class TestAppComponents(context: Context) 
        extends BuiltInComponentsFromContext(context)
        with NoHttpFiltersComponents
        with AhcWSComponents {
        lazy val router: Router = Router.empty
        lazy val weatherService = wire[WeatherService]
    }
    It gives compile errors
    [error] /Users/srabh/code/scala-web-project/test/TestAppComponents.scala:17:23: overriding method httpFilters in trait NoHttpFiltersComponents of type ()java.util.List[play.mvc.EssentialFilter];
    [error]  lazy value httpFilters has incompatible type
    [error]     override lazy val httpFilters = Seq()
    [error]                       ^
    [error] /Users/srabh/code/scala-web-project/test/TestAppComponents.scala:11:7: overriding method httpRequestHandler in trait HttpComponents of type ()play.http.HttpRequestHandler;
    [error]  lazy value httpRequestHandler in trait BuiltInComponents of type play.api.http.HttpRequestHandler has incompatible type
    [error] class TestAppComponents(context: Context) 
    [error]       ^
    [error] two errors found
    I wonder if I'm importing something wrong?
    Tim Moore
    @TimMoore

    @abhishes_twitter it looks like you've imported the Java API for NoHttpFiltersComponents rather than the Scala one. The difference is subtle: Scala is play.api.NoHttpFiltersComponents and Java is play.filters.components.NoHttpFiltersComponents.

    https://www.playframework.com/documentation/2.7.x/Filters#Disabling-Compile-Time-Default-Filters

    Abhishek Srivastava
    @abhishes_twitter
    @TimMoore thanks that resolved the issue.
    Rok Kralj
    @strelec
    QQ: Play 2.8 claims official Java 11 support. How is that, I thought that JVM versions are supposed to be backwards compatible? You should always be able to run something old on a newer JVM.
    Tim Moore
    @TimMoore
    @strelec More recent Java versions have not always been so forgiving. What it means in practice is that Play 2.8 is tested with Java 11 in automated CI.
    Andres Jaimes
    @ajaimesv

    hi there, is anyone having issues with sbt new playframework/play-scala-seed.g8 ? I keep getting an exception:

    [info] Loading global plugins from /Users/andres/.sbt/0.13/plugins
    java.lang.NullPointerException

    My env:
    OSX Catalina
    openjdk version "11" 2018-09-25
    sbt script version: 1.3.3
    Scala code runner version 2.13.1

    I created a project about a week ago and worked fine. brew has applied the latest updates.
    hmm, there must be something in the directory where I was trying to create it. Switched to a new one and worked fine. Thanks.
    David Roon
    @adridadou
    hi everyone, I have an issue that I don’t fully understand and maybe someone has an idea of what might be wrong / what I could do.
    so I have a websocket connection. I have an actor sending messages back to the websocket actor so it can notify my frontend
    it looks like if the messages are too close together, I tend to lose one message. But if I add a « println » before processing the message and send a response back, then suddenly it works
    so that leads me to believe that the issue is not with my own actor sending the notifications but something with the websocket actor
    is it possible that the messages are coming too fast and therefore a message is being skipped ?
    craftsman.codes
    @joostheijkoop
    Hello. Is it possible to configure the play plug-in to eagerly compile on file change (like ~compile) instead only when I hit an end-point, which make me wait? I have tried ~run, but not sure that works as I expect. It also seems to make sbt die very fast, by running out of available memory
    Igmar Palsenberg
    @igmar
    It only does that in dev mode
    prog20901
    @prog20901

    I want to create my own embedded server - so that my web application would be portable....My web application would be standalone, but have search and few request to be served from the user.

    Please help me how we can create a own embedded server in few steps

    Harry Laoulakos
    @harrylaou
    Hi,
    in the official documentation, it says to use markers/marker contexts instead of MDC in logging. How can we achieve the logging of a value in the logback pattern?
    If I were using MDC, I could just write %mdc{mykey}. Is there a way to do something similar with markers?
    Harry Laoulakos
    @harrylaou
    actully it is %X{mykey}
    Andres Jaimes
    @ajaimesv

    Hi @prog20901 , play comes with an embedded server. See deploying your application.

    If this does not work for you, could you please ellaborate more about your use case?

    Alexis Hernandez
    @AlexITC
    @harrylaou I'm not sure how that works with lots of futures involved, I did an experiment for something like MDC long time ago: https://github.com/AlexITC/play-request-tracer
    I remember to have saw custom execution contexts that propagate the MDC when switching threads
    Thomas Bergheim
    @bergheim
    I am currently at Play Framework 2.6 with Java. I have a big controller with lots of views, something like 15. They all use another function to render the main template, so I am injecting it using "@this" to make them inject that template themselves. Now, do I have to inject all these templates in the constructor as well? I guess so, it just seems a bit verbose and I was wondering if there is a smarter way. Thanks.
    prog20901
    @prog20901
    any good reference for apache lucene with latest play framework?
    Kasper Kondzielski
    @ghostbuster91
    Hi, we are trying to add support for play in tapir, but we are struggling with some things. I've opened a PR which contains already some work (https://github.com/softwaremill/tapir/pull/291/files). It would be awesome if somebody could take a look at it and maybe shed some light on our problems
    Alexandre DUVAL
    @KannarFr
    @marcospereira :)
    Alexis Hernandez
    @AlexITC
    take a look to the way playsonify handles authentication, you may be able to just reuse that logic
    Justin Reeves
    @justinallenreeves
    I get the basic idea of Akka Streaming but I look at the play-scala-websocket-example and my head starts spinning around. I've tried debugging it but the socket disconnects and times out. I tried setting akka.http.server.idle-timeout = 200 seconds akka.http.client.idle-timeout = 200 seconds in application.conf but that didn't seem to do anything
    Alexis Hernandez
    @AlexITC
    I have faced that disconnection issue before, the only thing has worked for me is to send a ping message once per minute (from server to client or from client to server, it doesn't matter), the ping is a msg supported by the backed (instead of the ws protocol ping)
    Justin Reeves
    @justinallenreeves
    @AlexITC how would you manage that, considering I'm in the tutorial so what is the client and what is the server isn't particularly clear.
    is the akka client in this case the browser?
    Justin Reeves
    @justinallenreeves
    Specifically, it's this timeout Aborting tcp connection to /0:0:0:0:0:0:0:1:53380 because of upstream failure: akka.http.impl.engine.HttpIdleTimeoutException: HTTP idle-timeout encountered, no bytes passed in the last 75 seconds. This is configurable by akka.http.[server|client].idle-timeout.
    Alexis Hernandez
    @AlexITC
    The client is the one connecting to your web socket server (possibly written in js or something else), the server is what's written in play
    just schedule something that keeps sending a ping-like message, that's it
    I have tried lots of configs regarding that timeout and nothing worked for me
    patientplatypus
    @patientplatypus
    question
    when i do multipart upload my session check is eating dogshit
    why?
    Raul Rodriguez
    @raul782
    Hi Guys, is there a best practice for play-framework to do a blue/green deploy, I've been looking. but most articles are about boxfuse. Currently everytime I do a deploy on my app (3 instances in cluster + varnish + LB) I experience 50s-120s of downtime, while varnish serves cached content, new content starts returning 500s
    I'm using jenkins+ansible for the deploy, but restarting the app sometimes is slow