#865 new
Nicholas C. Zakas

Testing error (HSQL) while using evolutions

Reported by Nicholas C. Zakas | May 25th, 2011 @ 01:15 AM

Please include as much relevant information as possible including the exact framework version you're using and a code snippet that reproduces the problem.

Framework version: 1.2.1
Platform you're using: Java

Reproduction steps:

Run play auto-test for a test uses Fixtures.loadModels() in setUp() and Fixtures.clearModel() in tearDown().


Whenever I run tests using YAML data and play auto-test, it exits with this error:

18:00:23,792 INFO ~ Automatically applying evolutions in in-memory database
@KILLED 18:00:50,549 ERROR ~ schema export unsuccessful
org.h2.jdbc.JdbcSQLException: Database is already closed (to disable automatic closing at VM shutdown, add ";DB_CLOSE_ON_EXIT=FALSE" to the db URL) [90121-149]

    at org.h2.message.DbException.getJdbcSQLException(DbException.java:327)
    at org.h2.message.DbException.get(DbException.java:167)
    at org.h2.message.DbException.get(DbException.java:144)
    at org.h2.message.DbException.get(DbException.java:133)
    at org.h2.jdbc.JdbcConnection.checkClosed(JdbcConnection.java:1333)
    at org.h2.jdbc.JdbcConnection.checkClosed(JdbcConnection.java:1308)
    at org.h2.jdbc.JdbcConnection.getAutoCommit(JdbcConnection.java:380)
    at com.mchange.v2.c3p0.impl.NewProxyConnection.getAutoCommit(NewProxyConnection.java:985)
    at org.hibernate.tool.hbm2ddl.SuppliedConnectionProviderConnectionHelper.prepare(SuppliedConnectionProviderConnectionHelper.java:52)
    at org.hibernate.tool.hbm2ddl.SchemaExport.execute(SchemaExport.java:263)
    at org.hibernate.tool.hbm2ddl.SchemaExport.drop(SchemaExport.java:229)
    at org.hibernate.impl.SessionFactoryImpl.close(SessionFactoryImpl.java:961)
    at org.hibernate.ejb.EntityManagerFactoryImpl.close(EntityManagerFactoryImpl.java:127)
    at play.db.jpa.JPAPlugin.onApplicationStop(JPAPlugin.java:289)
    at play.plugins.PluginCollection.onApplicationStop(PluginCollection.java:420)
    at play.Play.stop(Play.java:502)
    at play.Play$1.run(Play.java:410)

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2>Play framework</h2>

Play makes it easier to build Web applications with Java. It is a clean alternative to bloated Enterprise Java stacks. It focuses on developer productivity and targets RESTful architectures. Learn more on the <a href="http://www.playframework.org">http://www.playframework.org</a> website.<br><br>

<h2>Source code is hosted on github</h2>Check out our repository at <a href="http://github.com/playframework/play">http://github.com/playframework/play</a><br><br>

<h2>Contributing, creating a patch</h2> Please read the <a href="http://play.lighthouseapp.com/projects/57987/contributor-guide">contributor guide</a><br><br>

<h2>Reporting Security Vulnerabilities</h2> Since all bug reports are public, please report any security vulnerability directly to <em>guillaume dot bort at gmail dot com</em>.<br><br>

<h2>Creating a bug report</h2> Bug reports are incredibly helpful, so take time to report bugs and request features in our ticket tracker. We’re always grateful for patches to Play’s code. Indeed, bug reports with attached patches will get fixed far quickly than those without any.<br><br>

Please include as much relevant information as possible including the exact framework version you're using and a code snippet that reproduces the problem.<br><br>

Don't have too much expectations. Unless the bug is really a serious "everything is broken" thing, you're creating a ticket to start a discussion. Having a patch (or a branch on Github we can pull from) is better, but then again we'll only pull high quality branches that make sense to be in the core of Play.

People watching this ticket

Referenced by