playframework-1.x

Play! Framework 1.2.4 — C3P0 settings to avoid Communications link failure do to idle time

烈酒焚心 提交于 2019-12-07 15:09:50
问题 I'm trying to customize my C3P0 settings to avoid the error shown at the bottom of this post. It was suggested at this url --- http://make-it-open.blogspot.com/2008/12/sql-error-0-sqlstate-08s01.html --- to adjust the settings as follows: In hibernate.cfg.xml, write <property name="c3p0.min_size">5</property> <property name="c3p0.max_size">20</property> <property name="c3p0.timeout">1800</property> <property name="c3p0.max_statements">50</property> Then create "c3p0.properties" in your root

Connection hanging occasionally with Amazon RDS MySQL & Play Framework 1.2.5 (c3p0 default settings)

我只是一个虾纸丫 提交于 2019-12-07 11:08:47
问题 We're having problems with Amazon-hosted Play application with RDS Mysql. Sometimes the application ends up unresponsive. Today I checked the thread status with jstack -F and there were multiple threads stuck in native code for c3p0 connection : Thread 14060: (state = IN_NATIVE) - java.net.SocketInputStream.socketRead0(java.io.FileDescriptor, byte[], int, int, int) @bci=0 (Compiled frame; information may be imprecise) - java.net.SocketInputStream.read(byte[], int, int, int) @bci=79, line=150

Create and use a stored procedure with Play Framework and JPA

我的未来我决定 提交于 2019-12-07 10:29:40
问题 I'm using Play framework 1.2.5 and I would like to optimize my SQL queries by creating stored procedures and using them but I don't know how to do. To create the stored procedure via the Java code how should I do ? Also, should I do it in an @OnApplicationStart job so that I'm sure the procedures are created and stored when the application starts ? After, how can I use my stored procedures ? Using which function ? How can I pass the parameters to my procedure ? How can I retrieve the result

Play 1.2.x UnexpectedException ContinuationEnhancer on helpers.CheatSheetHelper$2 invalid constant type: 15

让人想犯罪 __ 提交于 2019-12-07 01:41:00
问题 Play framework 1.2.x starts with the following error: Oops: UnexpectedException An unexpected error occured caused by exception UnexpectedException: While applying class play.classloading.enhancers.ContinuationEnhancer on helpers.CheatSheetHelper$2 play.exceptions.UnexpectedException: While applying play.CorePlugin@3444d69d on helpers.CheatSheetHelper$2 at play.plugins.PluginCollection.enhance(PluginCollection.java:556) at play.classloading.ApplicationClasses$ApplicationClass.enhance

Play! framework CRUD module: adding default values and change date format?

試著忘記壹切 提交于 2019-12-06 16:13:31
问题 I'm using Play! frameworks CRUD module but I can't figure something out: my database table has a created field which is basically the time that a row was created. I don't want my user to set this, I want to do it in the backend, simply add the current time. I can't figure out how to do this though. I have made the field invisible using @Hidden but obviously now I can't create new rows because it's value simply isn't set. So where do I do this? And another question I have: my table also has a

Play framework 1.x with java 8

爷,独闯天下 提交于 2019-12-06 03:22:17
问题 How can I make play framework 1.x work with Java 8? Play framework version 1.2.5.3 Java version "1.8.0" Java(TM) SE Runtime Environment (build 1.8.0-b132) Java HotSpot(TM) Server VM (build 25.0-b70, mixed mode) I have an error: play.exceptions.CompilationException: java.util.stream.Collectors cannot be resolved at play.classloading.ApplicationCompiler$2.acceptResult(ApplicationCompiler.java:246) at org.eclipse.jdt.internal.compiler.Compiler.handleInternalException(Compiler.java:676) at org

Connection hanging occasionally with Amazon RDS MySQL & Play Framework 1.2.5 (c3p0 default settings)

不羁的心 提交于 2019-12-05 17:28:00
We're having problems with Amazon-hosted Play application with RDS Mysql . Sometimes the application ends up unresponsive. Today I checked the thread status with jstack -F and there were multiple threads stuck in native code for c3p0 connection : Thread 14060: (state = IN_NATIVE) - java.net.SocketInputStream.socketRead0(java.io.FileDescriptor, byte[], int, int, int) @bci=0 (Compiled frame; information may be imprecise) - java.net.SocketInputStream.read(byte[], int, int, int) @bci=79, line=150 (Compiled frame) - java.net.SocketInputStream.read(byte[], int, int) @bci=11, line=121 (Compiled frame

Create and use a stored procedure with Play Framework and JPA

妖精的绣舞 提交于 2019-12-05 15:10:39
I'm using Play framework 1.2.5 and I would like to optimize my SQL queries by creating stored procedures and using them but I don't know how to do. To create the stored procedure via the Java code how should I do ? Also, should I do it in an @OnApplicationStart job so that I'm sure the procedures are created and stored when the application starts ? After, how can I use my stored procedures ? Using which function ? How can I pass the parameters to my procedure ? How can I retrieve the result of my procedure ? (generally the result will be a SELECT query) And finally, is it possible to bind the

ManyToMany Relation with Play Framework 1.2.5 JPA

删除回忆录丶 提交于 2019-12-05 02:44:44
问题 I have 2 Models Article.java and Tags.java . An Article can have many Tags , and a Tags can be belonged to many Article . I am really in trouble to make this relation using JPA and Play Framework 1.2.5. Below are my codes (without setter-getter), and actually it works even throwing exception but I can not get the Tags ( getTagname() ) of an Article Article article = Article.findById((long)id); List<Tags> tags = article.getTags(); for (Tags tags2 : tags) { System.out.println(tags2.getTagname()

Playframework [1.2.7] dependencies failing

会有一股神秘感。 提交于 2019-12-04 05:31:50
问题 We're experiencing a problem with play frameworks dependency management which was working fine a couple of days ago. We haven't made any configuration changes or changes to the dependency file but are getting the following errors on both our build server and locally (both located on different networks and ISP's). :: problems summary :: :::: WARNINGS module not found: vsvr1#minifymod;1.0.9 ==== vsvr1: tried -- artifact vsvr1#minifymod;1.0.9!minifymod.jar: https://github.com/maklemenz/minifymod