1.2RC1 is available for testing

337 views
Skip to first unread message

Guillaume Bort

unread,
Apr 4, 2011, 11:41:24 AM4/4/11
to play-fr...@googlegroups.com
Hi all,

We just released the first release candidate for Play 1.2.

You can download it at: http://www.playframework.org/download

It would be great if you could test this pre-release on your existing
Play applications to check that there are no regressions.

Also, please take a look at the release notes and give a try to the
new features to be sure that all work as expected.

If you feel that we missed something please report on this group.

Happy testing!

--
Guillaume Bort, http://guillaume.bort.fr

Daniel Guryca

unread,
Apr 4, 2011, 12:18:52 PM4/4/11
to play-fr...@googlegroups.com
Hi,

@Before suspendable bug is stil not fixed and causes forever loop.

Daniel


--
You received this message because you are subscribed to the Google Groups "play-framework" group.
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.


traigo

unread,
Apr 4, 2011, 1:05:19 PM4/4/11
to play-fr...@googlegroups.com
Looks great! Can't wait to play with /@db and transactional contexts!

Guillaume Bort

unread,
Apr 4, 2011, 1:36:29 PM4/4/11
to play-fr...@googlegroups.com
Yes thank you, just fixed it.

For anything work-related, use g...@zenexity.fr; for everything else,
write guillau...@gmail.com

Alexander Strebkov

unread,
Apr 4, 2011, 2:03:38 PM4/4/11
to play-framework
I've problem with functional tests in one of my applications. I've
extracted some minimum required to repeat it here:

https://github.com/alexanderstrebkov/play12bug

It works with play 1.1.1 but with 1.2RC1 I have "Timeout trying to
lock table" error.
Looks like a problem happens only if I use fixtures, maybe it is also
related to relations between models.
I've a different error in original application but it is probably
because I use postgres.

Alexander

Alex Jarvis

unread,
Apr 4, 2011, 3:16:11 PM4/4/11
to play-framework

Alexander Reelsen

unread,
Apr 4, 2011, 5:52:51 PM4/4/11
to play-fr...@googlegroups.com
Hi

Guillaume Bort wrote:
> It would be great if you could test this pre-release on your existing
> Play applications to check that there are no regressions.
>
> Also, please take a look at the release notes and give a try to the
> new features to be sure that all work as expected.
>
> If you feel that we missed something please report on this group.
>
> Happy testing!

Cool!

Running two applications in testing mode with standard db=mem settings
seems to result in problems due to the H2 database runnung on port 8082.

I'm not sure how to solve this. Grails for example runs it internally in
the application, but I guess grails has the luxury to run some servlet
app there...

Will try to check the grails part further, perhaps we can copy a little,
but not before the weekend.


--Alexander

Olivier Refalo

unread,
Apr 4, 2011, 11:17:44 PM4/4/11
to play-fr...@googlegroups.com

Charles Silva

unread,
Apr 4, 2011, 10:46:30 PM4/4/11
to play-fr...@googlegroups.com
Multi DB  Access native, please! I need access two databases in my application, i had many problems.

2011/4/4 Alexander Reelsen <a...@emplify.de>

Morten Kjetland

unread,
Apr 5, 2011, 3:51:35 AM4/5/11
to play-fr...@googlegroups.com
I'm almost complete with multi db support, But I don't think we can release it until 2.1.1 .. sry.. :)

-morten

Morten Kjetland

unread,
Apr 5, 2011, 3:52:19 AM4/5/11
to play-fr...@googlegroups.com
that would be 1.2.1 :)

-morten

Guillaume Bort

unread,
Apr 5, 2011, 4:59:01 AM4/5/11
to play-fr...@googlegroups.com, Morten Kjetland
By the way, I've pushed a new 1.2RC2 release that fixes annoying
problems already reported.

--

svenkubiak

unread,
Apr 5, 2011, 5:35:52 AM4/5/11
to play-framework
Hey Guillaume,

the feature list for 1.2 looks awesome. I've been really looking
forward for this release, specially the db-migration mechanism.

Thank you a lot!

Regards
Sven

Alexander Strebkov

unread,
Apr 5, 2011, 8:03:32 AM4/5/11
to play-framework
Issue 654 mentioned above seems to be solved now but I still have
problems running functional tests with postgresql. Sometimes (if I run
unit tests before functional) I do not get results of execution of
GET's and POST's stored in database. For example if I have 3 countries
loaded as Fixtures, and run:
POST(Router.reverse("Country.create").add("name",
"Kalimdor"));
assertEquals(4, Country.count());
assertion will fail in 1.2RC2 because Country.count() will be 3. So
results of Country.create method are missing. Method works perfectly
in selenium tests or in production or with play 1.1.

Sometimes (on a "play clean / play test" and running only functional
test) I get a 30 seconds delay instead and after that
java.util.concurrent.TimeoutException in test runner. And in logs
something like this:
15:44:51,379 ERROR ~ Batch entry 0 insert into
"Account" ("address", ...) values ('Somestreet 1, 2', ...) was
aborted.
15:44:51,380 ERROR ~ ERROR: insert or update on table "Account"
violates foreign key constraint "fk1d0c220d9b84a56"
Detail: Key (country_id)=(US) is not present in table "Country".
15:44:51,382 ERROR ~ Could not synchronize database state with session
org.hibernate.exception.ConstraintViolationException: Could not
execute JDBC batch update

country_id US is surely present in database (were loaded from fixtures
and works in other kinds of tests)

It is also impossible to switch postgres to Read Uncommitted... so I
can't test if that helps.

On Apr 5, 12:59 pm, Guillaume Bort <guillaume.b...@gmail.com> wrote:
> By the way, I've pushed a new 1.2RC2 release that fixes annoying
> problems already reported.
>
>
>
>
>
> On Tue, Apr 5, 2011 at 9:52 AM, Morten Kjetland <m...@kjetland.com> wrote:
> > that would be 1.2.1 :)
> > -morten
>
> > On Tue, Apr 5, 2011 at 9:51 AM, Morten Kjetland <m...@kjetland.com> wrote:
>
> >> I'm almost complete with multi db support, But I don't think we can
> >> release it until 2.1.1 .. sry.. :)
> >> -morten
>
> >> On Tue, Apr 5, 2011 at 4:46 AM, Charles Silva <charles.el...@gmail.com>
> Guillaume Bort,http://guillaume.bort.fr
>
> For anything work-related, use g...@zenexity.fr; for everything else,
> write guillaume.b...@gmail.com

svenkubiak

unread,
Apr 5, 2011, 11:31:28 AM4/5/11
to play-framework
When your /lib Folder is under Version Controle, the command "play
deps ---sync" also deletes the svn folder (.svn).

On 4 Apr., 17:41, Guillaume Bort <guillaume.b...@gmail.com> wrote:

tschundeee

unread,
Apr 5, 2011, 4:27:02 PM4/5/11
to play-fr...@googlegroups.com, Morten Kjetland
Hey Guillaume,
you guys are really doing a great job here!

Maybe some little improvements:
- Play 1.2 isn't out as final, so why not include the newest stable jQuery version 1.5.2 instead of 1.5.1.
- Use Fixtures.loadYaml("data.yml"); instead of the deprecated Fixtures.load("data.yml"); in the yabe guide.

As beeing new to play I am now working through the guides and documentation and if I find errors I'll of course post them here.

:)

sas

unread,
Apr 5, 2011, 11:13:18 PM4/5/11
to play-framework
do you have some example we can have a look at?

On Apr 5, 4:51 am, Morten Kjetland <m...@kjetland.com> wrote:
> I'm almost complete with multi db support, But I don't think we can release
> it until 2.1.1 .. sry.. :)
>
> -morten
>

stefaan luckermans

unread,
Apr 6, 2011, 1:13:31 AM4/6/11
to play-framework
OK, I don't know if this has to do with the new version, or not and I
also don't know if it also occurs in version 1.1.1

I have a bootstrap method getRoutes.

In this I fetch
models.sweetthasteadmin.SweetThasteRoutes.all().fetch() and this
returns a List<SweetThasteRoute> routes.

after that I have a for-each loop

for (SweetThasteRoute route : routes){
}

The first time I tried this, I got a null exception, which I corrected



the next times I got the error that route could not be cast to
SweetThasteRoute ?!?!?

So, I stopped the play server 'Ctrl+c' and restarted it.

After that, my bootstrap worked …


figure it out ...

stefaan luckermans

unread,
Apr 6, 2011, 2:54:07 AM4/6/11
to play-framework
Update: problem not related to version 1.2 … also in 1.1.1

the problem appears to be solved, but isn't …

I know get :StringIndexOutOfBoundsException occured : String index out
of range: -1

if I look in the console:

@662p9g16d
Internal Server Error (500) for request GET /favicon.ico

Execution exception (In /app/jobs/SweetThasteStart.java around line
23)
ClassCastException occured : models.sweetthasteadmin.SweetThasteRoute
cannot be cast to models.sweetthasteadmin.SweetThasteRoute

play.exceptions.JavaExecutionException:
models.sweetthasteadmin.SweetThasteRoute cannot be cast to
models.sweetthasteadmin.SweetThasteRoute
at play.jobs.Job.call(Job.java:119)
at Invocation.Job(Play!)
Caused by: java.lang.ClassCastException:
models.sweetthasteadmin.SweetThasteRoute cannot be cast to
models.sweetthasteadmin.SweetThasteRoute
at jobs.SweetThasteStart.doJob(SweetThasteStart.java:23)
at play.jobs.Job.doJobWithResult(Job.java:37)
at play.jobs.Job.call(Job.java:110)
... 1 more

why does a cast SweetThasteRoute to SweetThasteRoute doesn't work ???

I guess I better open a new thread ?!?

On Apr 6, 7:13 am, stefaan luckermans <stefaan.luckerm...@thaste.org>
wrote:

Guillaume Bort

unread,
Apr 6, 2011, 3:23:30 AM4/6/11
to play-fr...@googlegroups.com
If you use dependencies management, you shouldn't commit your lib
directory, right?

> --
> You received this message because you are subscribed to the Google Groups "play-framework" group.
> 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.
>
>

--
Guillaume Bort, http://guillaume.bort.fr

For anything work-related, use g...@zenexity.fr; for everything else,
write guillau...@gmail.com

Guillaume Bort

unread,
Apr 6, 2011, 3:25:15 AM4/6/11
to play-fr...@googlegroups.com
> - Play 1.2 isn't out as final, so why not include the newest stable jQuery
> version 1.5.2 instead of 1.5.1.

Yes.

> - Use Fixtures.loadYaml("data.yml"); instead of the
> deprecated Fixtures.load("data.yml"); in the yabe guide.

You must use loadModels() and not loadYaml()

Guillaume Bort

unread,
Apr 6, 2011, 5:14:21 AM4/6/11
to play-fr...@googlegroups.com
Ok I've changed the way we handle transactions in test cases. The
in-memory H2 use proper transaction isolation again, but test cases
are run using auto-commit. It allows to properly access results from
other invocations.

Can you check the latest version from the 1.2.x branch?

--
Guillaume Bort, http://guillaume.bort.fr

For anything work-related, use g...@zenexity.fr; for everything else,

write guillau...@gmail.com

Alexander Strebkov

unread,
Apr 6, 2011, 8:10:28 AM4/6/11
to play-framework
Sounds like it could help but with postgres I'm getting this with
every test now (also unit tests):

16:03:46,449 ERROR ~ JDBC commit failed
org.postgresql.util.PSQLException: Cannot commit when autoCommit is
enabled.
at
org.postgresql.jdbc2.AbstractJdbc2Connection.commit(AbstractJdbc2Connection.java:
705)
at
com.mchange.v2.c3p0.impl.NewProxyConnection.commit(NewProxyConnection.java:
803)
at
org.hibernate.transaction.JDBCTransaction.commitAndResetAutoCommit(JDBCTransaction.java:
166)
at
org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:
142)
at org.hibernate.ejb.TransactionImpl.commit(TransactionImpl.java:76)
at play.db.jpa.JPAPlugin.closeTx(JPAPlugin.java:365)
at play.db.jpa.JPAPlugin.afterInvocation(JPAPlugin.java:314)
at
play.plugins.PluginCollection.afterInvocation(PluginCollection.java:
361)
at play.Invoker$Invocation.after(Invoker.java:193)
at play.Invoker$Invocation.run(Invoker.java:245)
at play.server.PlayHandler$NettyInvocation.run(PlayHandler.java:215)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:
441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ScheduledThreadPoolExecutor
$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98)
at java.util.concurrent.ScheduledThreadPoolExecutor
$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:206)
at java.util.concurrent.ThreadPoolExecutor
$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor
$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:680)
16:03:46,551 ERROR ~

@6630p094n
Internal Server Error (500) for request GET /@tests/init

JPA error
A JPA error occurred (Cannot commit):
org.hibernate.TransactionException: JDBC commit failed

play.exceptions.JPAException: Cannot commit
at play.db.jpa.JPAPlugin.closeTx(JPAPlugin.java:378)
at play.db.jpa.JPAPlugin.afterInvocation(JPAPlugin.java:314)
at
play.plugins.PluginCollection.afterInvocation(PluginCollection.java:
361)
at play.Invoker$Invocation.after(Invoker.java:193)
at play.Invoker$Invocation.run(Invoker.java:245)
at Invocation.HTTP Request(Play!)
Caused by: javax.persistence.PersistenceException:
org.hibernate.TransactionException: JDBC commit failed
at
org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:
1214)
at
org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:
1147)
at org.hibernate.ejb.TransactionImpl.commit(TransactionImpl.java:81)
at play.db.jpa.JPAPlugin.closeTx(JPAPlugin.java:365)
... 5 more
Caused by: org.hibernate.TransactionException: JDBC commit failed
at
org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:
157)
at org.hibernate.ejb.TransactionImpl.commit(TransactionImpl.java:76)
... 6 more
Caused by: org.postgresql.util.PSQLException: Cannot commit when
autoCommit is enabled.
at
org.postgresql.jdbc2.AbstractJdbc2Connection.commit(AbstractJdbc2Connection.java:
705)
at
org.hibernate.transaction.JDBCTransaction.commitAndResetAutoCommit(JDBCTransaction.java:
166)
at
org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:
142)
... 7 more
> > For more options, visit this group athttp://groups.google.com/group/play-framework?hl=en.

Guillaume Bort

unread,
Apr 6, 2011, 8:27:05 AM4/6/11
to play-fr...@googlegroups.com
Ok, seems logical. Can you try again with the latest?

--
Guillaume Bort, http://guillaume.bort.fr

For anything work-related, use g...@zenexity.fr; for everything else,

write guillau...@gmail.com

Alexander Strebkov

unread,
Apr 6, 2011, 9:43:19 AM4/6/11
to play-framework
I'm doing Fixtures.deleteAllModels(); before every test and it now
causes the following in log:

17:40:11,810 WARN ~ SQL Error: 0, SQLState: 42P01
17:40:11,810 ERROR ~ ERROR: relation "ht_transaction" does not exist
Position: 13
17:40:11,812 WARN ~ unable to drop temporary id table after use
[ERROR: table "ht_transaction" does not exist]

and following in test runner (sorry for long posts):

javax.persistence.PersistenceException:
org.hibernate.exception.SQLGrammarException: could not insert/select
ids for bulk delete
at
org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:
1214)
at
org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:
1147)
at
org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:
1224)
at
org.hibernate.ejb.AbstractQueryImpl.executeUpdate(AbstractQueryImpl.java:
108)
at play.db.jpa.JPAPlugin$JPAModelLoader.deleteAll(JPAPlugin.java:475)
at play.test.Fixtures.delete(Fixtures.java:67)
at play.test.Fixtures.delete(Fixtures.java:83)
at play.test.Fixtures.deleteAllModels(Fixtures.java:95)
at controllers.AccountsTest.before(AccountsTest.java:22)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.junit.runners.model.FrameworkMethod
$1.runReflectiveCall(FrameworkMethod.java:44)
at
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:
15)
at
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:
41)
at
org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:
27)
at play.test.PlayJUnitRunner$StartPlay
$2$1.evaluate(PlayJUnitRunner.java:91)
at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:
76)
at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:
50)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
at play.test.PlayJUnitRunner.run(PlayJUnitRunner.java:46)
at org.junit.runners.Suite.runChild(Suite.java:128)
at org.junit.runners.Suite.runChild(Suite.java:24)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
at org.junit.runner.JUnitCore.run(JUnitCore.java:157)
at org.junit.runner.JUnitCore.run(JUnitCore.java:136)
at org.junit.runner.JUnitCore.run(JUnitCore.java:117)
at play.test.TestEngine.run(TestEngine.java:101)
at controllers.TestRunner.run(TestRunner.java:69)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
25)
at java.lang.reflect.Method.invoke(Method.java:597)
at play.mvc.ActionInvoker.invokeWithContinuation(ActionInvoker.java:
536)
at play.mvc.ActionInvoker.invoke(ActionInvoker.java:494)
at play.mvc.ActionInvoker.invokeControllerMethod(ActionInvoker.java:
470)
at play.mvc.ActionInvoker.invokeControllerMethod(ActionInvoker.java:
465)
at play.mvc.ActionInvoker.invoke(ActionInvoker.java:153)
at play.server.PlayHandler$NettyInvocation.execute(PlayHandler.java:
235)
at play.Invoker$Invocation.run(Invoker.java:244)
at play.server.PlayHandler$NettyInvocation.run(PlayHandler.java:215)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:
441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ScheduledThreadPoolExecutor
$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98)
at java.util.concurrent.ScheduledThreadPoolExecutor
$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:206)
at java.util.concurrent.ThreadPoolExecutor
$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor
$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:680)
Caused by: org.hibernate.exception.SQLGrammarException: could not
insert/select ids for bulk delete
at
org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:
92)
at
org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:
66)
at
org.hibernate.hql.ast.exec.MultiTableDeleteExecutor.execute(MultiTableDeleteExecutor.java:
125)
at
org.hibernate.hql.ast.QueryTranslatorImpl.executeUpdate(QueryTranslatorImpl.java:
421)
at
org.hibernate.engine.query.HQLQueryPlan.performExecuteUpdate(HQLQueryPlan.java:
283)
at org.hibernate.impl.SessionImpl.executeUpdate(SessionImpl.java:
1288)
at org.hibernate.impl.QueryImpl.executeUpdate(QueryImpl.java:117)
at org.hibernate.ejb.QueryImpl.internalExecuteUpdate(QueryImpl.java:
188)
at
org.hibernate.ejb.AbstractQueryImpl.executeUpdate(AbstractQueryImpl.java:
99)
... 56 more
Caused by: org.postgresql.util.PSQLException: ERROR: relation
"ht_transaction" does not exist
Position: 13
at
org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:
2102)
at
org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:
1835)
at
org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:
257)
at
org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:
500)
at
org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:
388)
at
org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:
334)
at
com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeUpdate(NewProxyPreparedStatement.java:
105)
at
org.hibernate.hql.ast.exec.MultiTableDeleteExecutor.execute(MultiTableDeleteExecutor.java:
116)
... 62 more
> ...
>
> read more »

Guillaume Bort

unread,
Apr 7, 2011, 3:55:59 AM4/7/11
to play-fr...@googlegroups.com
Can you try again with the latest master? (commit 4c2e05a)

--
Guillaume Bort, http://guillaume.bort.fr

For anything work-related, use g...@zenexity.fr; for everything else,

write guillau...@gmail.com

Alexander Strebkov

unread,
Apr 7, 2011, 7:27:57 AM4/7/11
to play-framework
Same as above: org.hibernate.exception.SQLGrammarException: could not
insert/select ids for bulk delete.
Also with unit test, but selenium tests are fine.

On Apr 7, 11:55 am, Guillaume Bort <guillaume.b...@gmail.com> wrote:
> Can you try again with the latest master? (commit 4c2e05a)
>
> On Wed, Apr 6, 2011 at 3:43 PM, Alexander Strebkov
>
>
>
>
>
> <alexanderstreb...@gmail.com> wrote:
> > I'm doing Fixtures.deleteAllModels(); before every test and it now
> > causes the following in log:
>
> > 17:40:11,810 WARN  ~ SQL Error: 0, SQLState: 42P01
> > 17:40:11,810 ERROR ~ ERROR: relation "ht_transaction" does not exist
> >  Position: 13
> > 17:40:11,812 WARN  ~ unable to drop temporary id table after use
> > [ERROR: table "ht_transaction" does not exist]
>
> > and following in test runner (sorry for long posts):
>
> > javax.persistence.PersistenceException:
> > org.hibernate.exception.SQLGrammarException: could not insert/select
> > ids for bulk delete
> >        at
> > org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerIm pl.java:
> > 1214)
> >        at
> > org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerIm pl.java:
> > 1147)
> >        at
> > org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(Abstr actEntityManagerImpl.java:

Guillaume Bort

unread,
Apr 7, 2011, 8:36:25 AM4/7/11
to play-fr...@googlegroups.com
Can you try using deleteDatabase() instead deleteAllModels()?

--
Guillaume Bort, http://guillaume.bort.fr

For anything work-related, use g...@zenexity.fr; for everything else,

write guillau...@gmail.com

Alexander Strebkov

unread,
Apr 7, 2011, 9:39:35 AM4/7/11
to play-framework
I can't use deleteDatabase() because it doesn't respect hibernate's
globally_quoted_identifiers=true setting... =\ I also can't run
truncates manually because idCache will not be cleared... But if I
replace Fixtures.deleteAllModels() with following:
Fixtures.delete(models.Account.class);
Fixtures.delete(models.Country.class);
- unit tests will work again. And functional tests will run but will
not see changes made by POST/GETs again.
> ...
>
> read more »

Guillaume Bort

unread,
Apr 7, 2011, 10:10:01 AM4/7/11
to play-fr...@googlegroups.com
Ok, anyway I reverted back the autoCommit stuff as it conflicts with
the JPA specification and will eventually break Hibernate internals.

The problem is that when you call a controller from a FunctionalTest,
the action invocation now runs in its own transaction. Because the
test itself also run in its own transaction, deadlocks can occur (and
anyway transactions can't see the result of the other transactions).

And there is absolutely no way to run JPA outside a transaction. So
the only ways to deal with this problem is to set your database
transactions isolation level to
READ_UNCOMMITED while running your tests, or to manage JPA
transactions by hand (using JPA.em().getTransaction() or by spawning
invocations using Jobs).

For example, to insert Fixtures in a transaction:

new Job() {

public void doJob() {
Fixtures.loadModels(…);
}

}.now().get()

Alexander Strebkov

unread,
Apr 7, 2011, 10:25:04 AM4/7/11
to play-framework
I see... I think I will try to run tests on H2 database when... Not
sure why I used postgres instead of hsql, but a reason is probably
gone already. Thanks for the efforts!
> ...
>
> read more »

sas

unread,
Apr 7, 2011, 11:33:21 PM4/7/11
to play-framework
oops

my answer got mixed up with other messages

to Morten Kjetland about multi-db access

do you have some sample code to see how would it be like???

saludos

sas

On 5 abr, 04:51, Morten Kjetland <m...@kjetland.com> wrote:
> I'm almost complete with multi db support, But I don't think we can release
> it until 2.1.1 .. sry.. :)
>
> -morten
>

Morten Kjetland

unread,
Apr 8, 2011, 1:23:35 AM4/8/11
to play-fr...@googlegroups.com
to sas:

Have a look at the ticket "Multiple database/JPA support" (http://play.lighthouseapp.com/projects/57987/tickets/706).

Please test it if you like. Use the branch found in the ticket. The branch is up to date with 1.2.x.

Please comment on the ticket instead of this forum if you have any comments or problems.

-morten

Dirk

unread,
Apr 8, 2011, 9:38:26 AM4/8/11
to play-fr...@googlegroups.com
It would be nice if @ManyToMany were supported in YAMLs in 1.1.2. I implemented it and made a pull request on the 1.1.x branch, including unit tests :)
http://play.lighthouseapp.com/projects/57987-play-framework/tickets/636-fixturesload-fails-for-yaml-with-manytomany
https://github.com/playframework/play/pull/131

Olivier Refalo

unread,
Apr 9, 2011, 10:02:53 AM4/9/11
to play-fr...@googlegroups.com
Other issue, Play 1.2 only sets cookies when needed... meaning that we (developers) don't do an explicit session.set() in our code, a call to session.getId() will always return a different value.

Kind of confusing and not inline which what the documentation says.



Onur

unread,
Apr 9, 2011, 11:42:49 AM4/9/11
to play-framework
Hi,
First of all, thank you for this great framework.
We'll launch a chat application (which will be a killer application!)
at the end of this month, we implemented the long polling
implementation in the chat sample application. Main reason is the new
feature that returns the request, as soon as a new message arrived.
The main difference is that, we added a concurrenthashmap of
ArchivedEventStream<ChatRoom.Event> so that each user gets the
specific message that is sent to himself. Firstly, could you please
comment on this implementation?

My second question is regarding the stability of version 1.2RC2 that
is posted on play framework web site. Do you suggest us use this
version for our launch release? We are trying to handle 5.000
concurrent
online users in one medium server.

My last question is about the timeout feature. When are you planning
to add, timeout feature to await method that is used in chat
application?

best

Onur

mobassist.com

On Apr 4, 6:41 pm, Guillaume Bort <guillaume.b...@gmail.com> wrote:
> Hi all,
>
> We just released the first release candidate for Play 1.2.
>
> You can download it at:http://www.playframework.org/download
>
> It would be great if you could test this pre-release on your existing
> Play applications to check that there are no regressions.
>
> Also, please take a look at the release notes and give a try to the
> new features to be sure that all work as expected.
>
> If you feel that we missed something please report on this group.
>
> Happy testing!
>
> --
> Guillaume Bort,http://guillaume.bort.fr

Guillaume Bort

unread,
Apr 10, 2011, 2:03:43 PM4/10/11
to play-fr...@googlegroups.com
Yes you are right, it shouldn't be the case. I'll fix it

Reply all
Reply to author
Forward
0 new messages