Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Alexandre Chatiron
@xael-fry
@robotiv problem is fixed, ou can download it now
Peter
@weenaak
@xael-fry @robotiv FYI the documentation and release notes do not yet appear to be available on playframework.com.
robotiv
@robotiv
cheers!
Suman Saurabh
@sumansaurabh

I want to create scala forms simiar to this

val conditionMapping = mapping(
    "rkey" -> optional(text),
    "rflag" -> optional(of(EnumUtils.enumFormatter(InplaceNotifyFlag))),
    "rval" -> optional(of[Any])
  )(InplaceNotifyOnCondition.apply)(InplaceNotifyOnCondition.unapply)

but the formatter for Any is not available, how to solve this problem ?

ank26oct
@ank26oct
@ank26oct
hello everyone,I am new to play framwork.Anyone help me that how to take form with a single label field in play framework 2.6x controller
val taskForm = Form(
"name" -> nonEmptyText
)
This is not working in play 2.6x
I am getting this error:
"An implicit MessagesProvider instance was not found"
Alexandre Chatiron
@xael-fry
@ank26oct use https://gitter.im/playframework/playframework for question related to play 2
Chris Webb
@tazmaniax
Hey, has anyone created a generic CORS filter as a plugin, something like this Tomat filter, https://github.com/apache/tomcat/blob/trunk/java/org/apache/catalina/filters/CorsFilter.java ? I was about to build one but wondering if one already existed. thx
Andrei Solntsev
@asolntsev
As I know, there is no such filter in Play 1 yet.
Chris Webb
@tazmaniax
ok :)
Prince Jain
@Prince_Hello_twitter
How can i download play 2.1
Chris Webb
@tazmaniax
@asolntsev I saw you’ve updated your play-fastergt with the changes to support Java9 but when I’m testing it with Play v1.5.1 I’m getting the following exception, any idea?
~ Server is up and running
21:44:26,651 [play-thread-1] ERROR ~ 

@79l662a0p
Internal Server Error (500) for request GET /

Template execution error (In {module:fastergt}/app/views/tags/crud/types.tag around line 3)
Execution error occurred in template {module:fastergt}/app/views/tags/crud/types.tag. Exception raised was MissingMethodException : No signature of method: play.template2.generated_templates.GTTemplate__module_fastergt__app_views_tags_crud_types_tagG.__loadClass() is applicable for argument types: (String) values: [controllers.CRUD].

play.exceptions.TemplateExecutionException: No signature of method: play.template2.generated_templates.GTTemplate__module_fastergt__app_views_tags_crud_types_tagG.__loadClass() is applicable for argument types: (String) values: [controllers.CRUD]
    at play.modules.gtengineplugin.GTTemplate.renderGTTemplate(GTTemplate.java:106)
    at play.modules.gtengineplugin.GTTemplate.internalGTRender(GTTemplate.java:70)
    at play.modules.gtengineplugin.GTTemplate.internalRender(GTTemplate.java:49)
    at play.modules.gtengineplugin.GTTemplate.render(GTTemplate.java:123)
    at play.mvc.Router.parse(Router.java:268)
    at play.mvc.Router.parse(Router.java:296)
    at play.mvc.Router.parse(Router.java:270)
    at play.mvc.Router.load(Router.java:52)
    at play.mvc.Router.detectChanges(Router.java:330)
    at Invocation.HTTP Request(Play!)
Andrei Solntsev
@asolntsev
Hm.. I cannot answer without a deeper investigation. :(
Chris Webb
@tazmaniax
no probs, I’m having a bit of look but its convoluted
just wondered if you’d had a chance to test it
ok I think I might have found the issue
Chris Webb
@tazmaniax
@asolntsev fixed and sent a pull request your way
Andrei Solntsev
@asolntsev
cool, thank you!
Chris Webb
@tazmaniax
I’m pulling the module from your repo so if you package up a release of play-fastergt that would be fab
Andrei Solntsev
@asolntsev
ok, I can do it
Chris Webb
@tazmaniax
thx!
James Broadshaw
@jamesbroadshaw

Hi guys - thanks for the new play 1.5.2 release!

Is the existing default postgres driver (org.postgresql.Driver), doing any kind of connection pooling? I see random "org.postgresql.util.PSQLException: An I/O error occurred while sending to the backend" with HikariCP even though my connection timeouts are well below any network limits. I saw in the HikariCP docs that they recommend using org.postgresql.ds.PGSimpleDataSource as the driver but using 'db.driver=' to set it is not having the desired effect. Does anyone have an example of how to properly do that?

Fraserhardy
@Fraserhardy
Hey everyone, We're attempting to get Play running a bit nicer in the IDE and with some more modern tooling. One of the big issues is the dependency management which is blocking us doing what we want to. I know its using Ivy underneath but it seems Play's dependency management is hiding a lot of the configurable options. Ideally we'd like to use Maven or Gradle. I found that its possible to generate POM files from Ivy (http://ant.apache.org/ivy/history/2.4.0/use/makepom.html), however we're not using Ivy directly so it doesn't seem that this is possible as there isn't actually an Ivy file but the Play yml version instead.
Has anyone had any success with something similar. I've found https://github.com/play1-maven-plugin/play1-maven-plugin but this is very reliant on the author updating some scripts to then publish play to maven. If this could be a step within the main play1 project then that could help, as currently its only supporting 1.5.0
Andrei Solntsev
@asolntsev
@Fraserhardy We also wanted to use Gradle to fetch dependencies (instead of Play built-in mechanism).
And it’s very simple. You don’t need to generate pom, either any pla1 plugins.
Just add file build.gradle or pom.xml to your project, declare all dependencies there. And run mvn dependency:copy-dependencies (or similar gradle task) instead of play deps.
Fraserhardy
@Fraserhardy
How about to import Play though? Ideally we don't want to have to download play framework and install in a separate folder. Would be nice to just pull all of Play's actual dependencies and the Play.jar too.
Andrei Solntsev
@asolntsev
@Fraserhardy Yes, we also wanted to import Play’s dependencies. Finally, we forked Play (https://github.com/codeborne/replay), and it’s built with Gradle, and all its dependencies are fetch by gradle.
Chris Webb
@tazmaniax
@asolntsev very interesting, I wasn’t aware of your fork and looks like it started at the end of 2017. Are you tracking the improvements made to Play?
Andrei Solntsev
@asolntsev
@tazmaniax yes, sure. :)
Matt Hall
@megamattron
Is there documentation anywhere for running all the framework tests? I see some in the framework test-src folder, but also lots in the samples-and-tests. Just want to make sure I'm running everything if I make any changes. Thanks!
Andrei Solntsev
@asolntsev
@megamattron You just need to run ant test inside folder framework. It runs both unit-tests and all tests from samples-and-tests.
Matt Hall
@megamattron

Thanks @asolntsev - is it normal that some of the tests might fail currently? I'm seeing:

     [exec] ~ list...                                              PASSED     1s
     [exec] ~ mailer...                                            PASSED     2s
     [exec] ~ routing...                                           ERROR   ?  8s
     [exec] ~ secure/login...                                      PASSED     1s
     [exec] ~ security/XssAttempts/xssAttempts...                  PASSED     1s

For example.

I don't see any output in the test-result folder for that failed test though.
It ultimately gets down to:
     [exec] 09:37:54,759 INFO  ~ Listening for HTTP on port 9003 (Waiting a first request to start) ...
     [exec] ~ Server is up and running
     [exec] ~
     [exec] ~ Starting FirePhoque...
     [exec] ~
     [exec] ~ Some tests have failed. See file:///Users/matt/code/play/play1/samples-and-tests/just-test-cases/test-result for results
     [exec] ~

BUILD FAILED
/Users/matt/code/play/play1/framework/build.xml:279: The following error occurred while executing this line:
/Users/matt/code/play/play1/framework/build.xml:335: exec returned: 1
Andrei Solntsev
@asolntsev
@megamattron yes, unfortunately they are flaky (fail sometimes without a good reason). :(
1 reply
Lucky Rastogi
@luckyrastogi91_twitter
@luckyrastogi91_twitter
hi everyone,
i am trying to integrate apache javamelody with my play application but unable to apply web.xml file filters into my play scala application. Does there anyway to achieve this? How to apply filters in my play app? In java app, we have used this <filter>
<filter-name>monitoring</filter-name>
<filter-class>net.bull.javamelody.MonitoringFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>monitoring</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<listener>
<listener-class>net.bull.javamelody.SessionListener</listener-class>
</listener>
, how to use such mapping in play scala app? Thanks in advance
Cies Breijs
@cies
Hi all! I wanted to try to modernize the play1 cli tool (the python tool) and came up with this: https://github.com/Stager-Software/play1-cli
It's python code is ported to python3, and it uses gradle to fetch dependencies (instead of storing them in the source tree)
There's a README in the project from which you can learn more about this little proof of concept. Curious what y'all think of it!
Fraserhardy
@Fraserhardy
Hi Cies, Sounds interesting. The link you shared is private though. Could you make the repo public so we can check it out?
Chris Webb
@tazmaniax
Yes also sounds interesting!
Cies Breijs
@cies
stupid me
its public now
(tested with some incognito browser) :)
Curious to learn what y'all think of it: feel free to provide feedback here, raise an issue, or just change it in a fork and send a PR!
Cies Breijs
@cies
@Fraserhardy and @tazmaniax ^^^
Cies Breijs
@cies
anyone had a look?
Manish Bansal
@manishbansal8843
Hi All. Just wanted to know if any future releases are planned or not. By looking at github project, i am not able to ascertain whether this project is dead or still active.
Cies Breijs
@cies
@manishbansal8843 Some project still use play1, I'm not sure of the exact number. When updates are required to stay up to date with new Hibernate/JDK/Netty/etc then this may be addressed by the community (see previous updates). There's also RePlay, which is a fork and is maintained better (yet by a smaller community). RePlay is more in line with modern Java development (just Gradle, no dependency op Python, updated dependencies) https://github.com/codeborne/replay