--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To view this discussion on the web visit https://groups.google.com/d/msg/play-framework/-/8XDBAiax3rkJ.
To post to this group, send email to play-fr...@googlegroups.com.
To unsubscribe from this group, send email to play-framewor...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/play-framework?hl=en.
// Delete a task by ID
Task.find.ref(34L).delete();
is a manual closing needed in this case? and if yes how is it done? What is the trick if I do a DB query in a async task?
Greetings,
Thomas
--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to play-framewor...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
You can add the dependency to your project and sbt will use that instead of the default one.
db.default.idleMaxAge=10 minutes
db.default.idleConnectionTestPeriod=35 seconds
db.default.connectionTimeout=20 second
db.default.connectionTestStatement="SELECT 1"
db.default.maxConnectionAge=30 minutes
"com.typesafe.play" %% "play-jdbc" % "2.2.0" exclude("com.jolbox", "bonecp")
play.api.Application$$anon$1: Execution exception[[PersistenceException: Query threw SQLException:An I/O error occured while sending to the backend.
Bind values:[3]
Query was:
select t0.id as c0, t0.tag as c1, t0.region_id as c2 from country t0 where t0.id = ?
]]
at play.api.Application$class.handleError(Application.scala:293) ~[play_2.10.jar:2.2.0]
at play.api.DefaultApplication.handleError(Application.scala:399) ~[play_2.10.jar:2.2.0]
at play.core.server.netty.PlayDefaultUpstreamHandler$$anonfun$2$$anonfun$applyOrElse$3.apply(PlayDefaultUpstreamHandler.scala:261) ~[play_2.10.jar:2.2.0]
at play.core.server.netty.PlayDefaultUpstreamHandler$$anonfun$2$$anonfun$applyOrElse$3.apply(PlayDefaultUpstreamHandler.scala:261) ~[play_2.10.jar:2.2.0]
at scala.Option.map(Option.scala:145) ~[scala-library-2.10.1.jar:na]
at play.core.server.netty.PlayDefaultUpstreamHandler$$anonfun$2.applyOrElse(PlayDefaultUpstreamHandler.scala:261) ~[play_2.10.jar:2.2.0]
Caused by: javax.persistence.PersistenceException: Query threw SQLException:An I/O error occured while sending to the backend.
Bind values:[3]
Query was:
select t0.id as c0, t0.tag as c1, t0.region_id as c2 from country t0 where t0.id = ?
at com.avaje.ebeaninternal.server.query.CQuery.createPersistenceException(CQuery.java:790) ~[avaje-ebeanorm.jar:na]
at com.avaje.ebeaninternal.server.query.CQuery.createPersistenceException(CQuery.java:767) ~[avaje-ebeanorm.jar:na]
at com.avaje.ebeaninternal.server.query.CQueryEngine.findMany(CQueryEngine.java:202) ~[avaje-ebeanorm.jar:na]
at com.avaje.ebeaninternal.server.query.DefaultOrmQueryEngine.findMany(DefaultOrmQueryEngine.java:77) ~[avaje-ebeanorm.jar:na]
at com.avaje.ebeaninternal.server.core.OrmQueryRequest.findList(OrmQueryRequest.java:265) ~[avaje-ebeanorm.jar:na]
at com.avaje.ebeaninternal.server.core.DefaultServer.findList(DefaultServer.java:1460) ~[avaje-ebeanorm.jar:na]
Caused by: org.postgresql.util.PSQLException: An I/O error occured while sending to the backend.
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:283) ~[postgresql-8.4-703.jdbc4.jar:na]
at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:510) ~[postgresql-8.4-703.jdbc4.jar:na]
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:386) ~[postgresql-8.4-703.jdbc4.jar:na]
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:271) ~[postgresql-8.4-703.jdbc4.jar:na]
at com.jolbox.bonecp.PreparedStatementHandle.executeQuery(PreparedStatementHandle.java:174) ~[bonecp-0.8.0-SNAPSHOT.jar:0.8.0-SNAPSHOT]
at com.avaje.ebeaninternal.server.query.CQuery.prepareBindExecuteQuery(CQuery.java:377) ~[avaje-ebeanorm.jar:na]
Caused by: java.io.IOException: Stream closed
at sun.nio.cs.StreamEncoder.ensureOpen(StreamEncoder.java:45) ~[na:1.7.0_25]
at sun.nio.cs.StreamEncoder.flush(StreamEncoder.java:140) ~[na:1.7.0_25]
at java.io.OutputStreamWriter.flush(OutputStreamWriter.java:229) ~[na:1.7.0_25]
at org.postgresql.core.PGStream.flush(PGStream.java:522) ~[postgresql-8.4-703.jdbc4.jar:na]
at org.postgresql.core.v3.QueryExecutorImpl.sendSync(QueryExecutorImpl.java:1136) ~[postgresql-8.4-703.jdbc4.jar:na]
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:256) ~[postgresql-8.4-703.jdbc4.jar:na]