Re: [m2] sql-maven-plugin, derby, and test cases -> failed to start database
Including the jdbc:derby:;shutdown with the true parameter in the 1.1-SNAPSHOT did the trick. Thanks for the help. For the benefit of others, I've added the following execution: shutdown-database-so-that-test-can-run process-test-resources execute jdbc:derby:;shutdown=true true Thanks again. -- View this message in context: http://www.nabble.com/sql-maven-plugin%2C-derby%2C-and-test-cases--%3E-failed-to-start-database-tf3263205s177.html#a9081501 Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [m2] sql-maven-plugin, derby, and test cases -> failed to start database
Dan, thanks for the quick reply. I'll look at your posts. Prior to getting your reply, I was trying to start the derby network server using the exec-maven-plugin. I ran into issues with this that I need to research and may require another post. Do you still need me to file a JIRA on this? Brian dan tran wrote: > > I added the suggested fix in > > http://jira.codehaus.org/browse/MOJO-619 > > you will need to use the already deployed 1.1-SNAPSHOT, and shutdown derby > dabase before running your test. > > see this > > http://svn.codehaus.org/mojo/trunk/mojo/sql-maven-plugin/src/it/derby > > for detailed example > > -D > > > On 2/20/07, Dan Tran <[EMAIL PROTECTED]> wrote: >> >> It is confirmed that sql-maven-plugin locks the embeded database and >> prevent other java tests to run, please file a JIRA. >> >> I am able to reproduce it via an integration test case. >> >> -D >> >> >> On 2/20/07, Dan Tran <[EMAIL PROTECTED]> wrote: >> > >> > It sounds like your test case does not try to recreate database again. >> > >> > -D >> > >> > >> > >> > >> > >> > On 2/20/07, bkbonner <[EMAIL PROTECTED] > wrote: >> > > >> > > >> > > I'm trying to use the sql-maven-plugin with derby. >> > > >> > > My pom is as follows: >> > > >> > > >> > >org.apache.maven.plugins >> > > >> > > >> > > maven-surefire-plugin >> > > >> > >false >> > > >> > > >> > > >> > > org.codehaus.mojo >> > > >> > > sql-maven-plugin >> > > >> > > >> > > >> > > >> > > org.apache.derby >> > > >> > > derby >> > >10.2.2.0 >> > > >> > > >> > > >> > > >> > >me >> > >mine >> > > >> > > >> > > org.apache.derby.jdbc.EmbeddedDriver >> > > >> > > >> > > jdbc:derby:testdb;create=true >> > > >> > > >> ${maven.test.skip} >> > > >> > > >> > > >> > > >> > >drop tables and >> > > recreate >> > > >> > > process-test-resources >> > > >> > > >> > > execute >> > > >> > > >> > > >> > > true >> > > >> > > >> > > >> > > >> > > datamodel/pid-snapshot.sql >> > > >> > > >> > > >> > > >> > > continue >> > > >> > > >> > > >> > > >> > > >> > > When my test cases try to run and connect to the derby instance, they >> > > receive the following failure: >> > > >> > > >> > > >> > > >> --- >> > > Test set: com.test.pid.model.PidpdtcaPidSnapshotTest >> > > >> --- >> > > >> > > Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: >> 3.635sec >> > > <<< FAILURE! >> > > testGetPidpdtca(com.test.pid.model.PidpdtcaPidSnapshotTest) Time >> > > elapsed: >> > > 3.585 sec <<< ERROR! >> > > org.springframework.transaction.CannotCreateTransactionException : >> > > Could not >> > > open JDBC Connection for transaction; nested exception is >> > > java.sql.SQLException: Failed to start database 'testdb', see the >> next >> > > exception for details. >> > > Caused by: java.sql.SQLException: Failed to start database 'testdb', >> > > see the >> > > next exception for details. >> > >at >> > > org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException >> > > (Unknown >> > > Source) >> > >at >> org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown >> > > Source) >> > >at >> org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown >> > > Source) >> > >at >> org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown >> > > Source) >> > >at >> org.apache.derby.impl.jdbc.EmbedConnection.newSQLException(Unknown >> > > Source) >> > >at >> org.apache.derby.impl.jdbc.EmbedConnection.bootDatabase(Unknown >> > > Source) >> > >at org.apache.derby.impl.jdbc.EmbedConnection.(U
Re: sql-maven-plugin, derby, and test cases -> failed to start database
I added the suggested fix in http://jira.codehaus.org/browse/MOJO-619 you will need to use the already deployed 1.1-SNAPSHOT, and shutdown derby dabase before running your test. see this http://svn.codehaus.org/mojo/trunk/mojo/sql-maven-plugin/src/it/derby for detailed example -D On 2/20/07, Dan Tran <[EMAIL PROTECTED]> wrote: It is confirmed that sql-maven-plugin locks the embeded database and prevent other java tests to run, please file a JIRA. I am able to reproduce it via an integration test case. -D On 2/20/07, Dan Tran <[EMAIL PROTECTED]> wrote: > > It sounds like your test case does not try to recreate database again. > > -D > > > > > > On 2/20/07, bkbonner <[EMAIL PROTECTED] > wrote: > > > > > > I'm trying to use the sql-maven-plugin with derby. > > > > My pom is as follows: > > > > > >org.apache.maven.plugins > > > > > > maven-surefire-plugin > > > >false > > > > > > > > org.codehaus.mojo > > > > sql-maven-plugin > > > > > > > > > > org.apache.derby > > > > derby > >10.2.2.0 > > > > > > > > > >me > >mine > > > > > > org.apache.derby.jdbc.EmbeddedDriver > > > > > > jdbc:derby:testdb;create=true > > > >${maven.test.skip} > > > > > > > > > >drop tables and > > recreate > > > > process-test-resources > > > > > > execute > > > > > > > > true > > > > > > > > > > datamodel/pid-snapshot.sql > > > > > > > > > > continue > > > > > > > > > > > > When my test cases try to run and connect to the derby instance, they > > receive the following failure: > > > > > > > > --- > > Test set: com.test.pid.model.PidpdtcaPidSnapshotTest > > --- > > > > Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 3.635sec > > <<< FAILURE! > > testGetPidpdtca(com.test.pid.model.PidpdtcaPidSnapshotTest) Time > > elapsed: > > 3.585 sec <<< ERROR! > > org.springframework.transaction.CannotCreateTransactionException : > > Could not > > open JDBC Connection for transaction; nested exception is > > java.sql.SQLException: Failed to start database 'testdb', see the next > > exception for details. > > Caused by: java.sql.SQLException: Failed to start database 'testdb', > > see the > > next exception for details. > >at > > org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException > > (Unknown > > Source) > >at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown > > Source) > >at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown > > Source) > >at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown > > Source) > >at org.apache.derby.impl.jdbc.EmbedConnection.newSQLException(Unknown > > Source) > >at org.apache.derby.impl.jdbc.EmbedConnection.bootDatabase(Unknown > > Source) > >at org.apache.derby.impl.jdbc.EmbedConnection.(Unknown > > Source) > >at org.apache.derby.impl.jdbc.EmbedConnection30 .(Unknown > > Source) > >at org.apache.derby.impl.jdbc.EmbedConnection40.(Unknown > > Source) > >at org.apache.derby.jdbc.Driver40.getNewEmbedConnection(Unknown > > Source) > >at org.apache.derby.jdbc.InternalDriver.connect (Unknown > > Source) > >at org.apache.derby.jdbc.AutoloadedDriver.connect(Unknown > > Source) > >at java.sql.DriverManager.getConnection(DriverManager.java:582) > >at java.sql.DriverManager.getConnection(DriverManager.java:154) > >at > > > > org.springframework.jdbc.datasource.DriverManagerDataSource.getConnectionFromDriverManager > > (DriverManagerDataSource.java:291) > >at > > > > org.spri
Re: sql-maven-plugin, derby, and test cases -> failed to start database
It is confirmed that sql-maven-plugin locks the embeded database and prevent other java tests to run, please file a JIRA. I am able to reproduce it via an integration test case. -D On 2/20/07, Dan Tran <[EMAIL PROTECTED]> wrote: It sounds like your test case does not try to recreate database again. -D On 2/20/07, bkbonner <[EMAIL PROTECTED]> wrote: > > > I'm trying to use the sql-maven-plugin with derby. > > My pom is as follows: > > >org.apache.maven.plugins > > > maven-surefire-plugin > >false > > > > org.codehaus.mojo >sql-maven-plugin > > > >org.apache.derby > > > derby >10.2.2.0 > > > > >me >mine > > > org.apache.derby.jdbc.EmbeddedDriver > > > jdbc:derby:testdb;create=true > >${maven.test.skip} > > > > >drop tables and > recreate > > process-test-resources > > > execute > > > > true > > > > datamodel/pid-snapshot.sql > > > > > continue > > > > > > When my test cases try to run and connect to the derby instance, they > receive the following failure: > > > > --- > Test set: com.test.pid.model.PidpdtcaPidSnapshotTest > --- > > Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 3.635sec > <<< FAILURE! > testGetPidpdtca(com.test.pid.model.PidpdtcaPidSnapshotTest) Time > elapsed: > 3.585 sec <<< ERROR! > org.springframework.transaction.CannotCreateTransactionException : Could > not > open JDBC Connection for transaction; nested exception is > java.sql.SQLException: Failed to start database 'testdb', see the next > exception for details. > Caused by: java.sql.SQLException: Failed to start database 'testdb', see > the > next exception for details. >at > org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown > Source) >at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown > Source) >at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown > Source) >at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown > Source) >at org.apache.derby.impl.jdbc.EmbedConnection.newSQLException(Unknown > Source) >at org.apache.derby.impl.jdbc.EmbedConnection.bootDatabase(Unknown > Source) >at org.apache.derby.impl.jdbc.EmbedConnection.(Unknown > Source) >at org.apache.derby.impl.jdbc.EmbedConnection30 .(Unknown > Source) >at org.apache.derby.impl.jdbc.EmbedConnection40.(Unknown > Source) >at org.apache.derby.jdbc.Driver40.getNewEmbedConnection(Unknown > Source) >at org.apache.derby.jdbc.InternalDriver.connect (Unknown Source) >at org.apache.derby.jdbc.AutoloadedDriver.connect(Unknown Source) >at java.sql.DriverManager.getConnection(DriverManager.java:582) >at java.sql.DriverManager.getConnection(DriverManager.java :154) >at > > org.springframework.jdbc.datasource.DriverManagerDataSource.getConnectionFromDriverManager > (DriverManagerDataSource.java:291) >at > > org.springframework.jdbc.datasource.DriverManagerDataSource.getConnectionFromDriverManager( > DriverManagerDataSource.java:277) >at > > org.springframework.jdbc.datasource.DriverManagerDataSource.getConnectionFromDriverManager > (DriverManagerDataSource.java:259) >at > > org.springframework.jdbc.datasource.DriverManagerDataSource.getConnection( > DriverManagerDataSource.java:240) >at > org.springframework.jdbc.datasource.DataSourceTransactionManager.doBegin > (DataSourceTransactionManager.java:182) >
Re: sql-maven-plugin, derby, and test cases -> failed to start database
It sounds like your test case does not try to recreate database again. -D On 2/20/07, bkbonner <[EMAIL PROTECTED]> wrote: I'm trying to use the sql-maven-plugin with derby. My pom is as follows: org.apache.maven.plugins maven-surefire-plugin false org.codehaus.mojo sql-maven-plugin org.apache.derby derby 10.2.2.0 me mine org.apache.derby.jdbc.EmbeddedDriver jdbc:derby:testdb;create=true ${maven.test.skip} drop tables and recreate process-test-resources execute true datamodel/pid-snapshot.sql continue When my test cases try to run and connect to the derby instance, they receive the following failure: --- Test set: com.test.pid.model.PidpdtcaPidSnapshotTest --- Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 3.635 sec <<< FAILURE! testGetPidpdtca(com.test.pid.model.PidpdtcaPidSnapshotTest) Time elapsed: 3.585 sec <<< ERROR! org.springframework.transaction.CannotCreateTransactionException: Could not open JDBC Connection for transaction; nested exception is java.sql.SQLException: Failed to start database 'testdb', see the next exception for details. Caused by: java.sql.SQLException: Failed to start database 'testdb', see the next exception for details. at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException (Unknown Source) at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source) at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source) at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source) at org.apache.derby.impl.jdbc.EmbedConnection.newSQLException (Unknown Source) at org.apache.derby.impl.jdbc.EmbedConnection.bootDatabase(Unknown Source) at org.apache.derby.impl.jdbc.EmbedConnection.(Unknown Source) at org.apache.derby.impl.jdbc.EmbedConnection30.(Unknown Source) at org.apache.derby.impl.jdbc.EmbedConnection40.(Unknown Source) at org.apache.derby.jdbc.Driver40.getNewEmbedConnection(Unknown Source) at org.apache.derby.jdbc.InternalDriver.connect(Unknown Source) at org.apache.derby.jdbc.AutoloadedDriver.connect(Unknown Source) at java.sql.DriverManager.getConnection(DriverManager.java:582) at java.sql.DriverManager.getConnection(DriverManager.java:154) at org.springframework.jdbc.datasource.DriverManagerDataSource.getConnectionFromDriverManager (DriverManagerDataSource.java:291) at org.springframework.jdbc.datasource.DriverManagerDataSource.getConnectionFromDriverManager (DriverManagerDataSource.java:277) at org.springframework.jdbc.datasource.DriverManagerDataSource.getConnectionFromDriverManager (DriverManagerDataSource.java:259) at org.springframework.jdbc.datasource.DriverManagerDataSource.getConnection( DriverManagerDataSource.java:240) at org.springframework.jdbc.datasource.DataSourceTransactionManager.doBegin( DataSourceTransactionManager.java:182) at org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction (AbstractPlatformTransactionManager.java:349) at org.springframework.test.AbstractTransactionalSpringContextTests.startNewTransaction (AbstractTransactionalSpringContextTests.java:313) at org.springframework.test.AbstractTransactionalSpringContextTests.onSetUp( AbstractTransactionalSpringContextTests.java:168)
sql-maven-plugin, derby, and test cases -> failed to start database
I'm trying to use the sql-maven-plugin with derby. My pom is as follows: org.apache.maven.plugins maven-surefire-plugin false org.codehaus.mojo sql-maven-plugin org.apache.derby derby 10.2.2.0 me mine org.apache.derby.jdbc.EmbeddedDriver jdbc:derby:testdb;create=true ${maven.test.skip} drop tables and recreate process-test-resources execute true datamodel/pid-snapshot.sql continue When my test cases try to run and connect to the derby instance, they receive the following failure: --- Test set: com.test.pid.model.PidpdtcaPidSnapshotTest --- Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 3.635 sec <<< FAILURE! testGetPidpdtca(com.test.pid.model.PidpdtcaPidSnapshotTest) Time elapsed: 3.585 sec <<< ERROR! org.springframework.transaction.CannotCreateTransactionException: Could not open JDBC Connection for transaction; nested exception is java.sql.SQLException: Failed to start database 'testdb', see the next exception for details. Caused by: java.sql.SQLException: Failed to start database 'testdb', see the next exception for details. at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown Source) at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source) at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source) at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source) at org.apache.derby.impl.jdbc.EmbedConnection.newSQLException(Unknown Source) at org.apache.derby.impl.jdbc.EmbedConnection.bootDatabase(Unknown Source) at org.apache.derby.impl.jdbc.EmbedConnection.(Unknown Source) at org.apache.derby.impl.jdbc.EmbedConnection30.(Unknown Source) at org.apache.derby.impl.jdbc.EmbedConnection40.(Unknown Source) at org.apache.derby.jdbc.Driver40.getNewEmbedConnection(Unknown Source) at org.apache.derby.jdbc.InternalDriver.connect(Unknown Source) at org.apache.derby.jdbc.AutoloadedDriver.connect(Unknown Source) at java.sql.DriverManager.getConnection(DriverManager.java:582) at java.sql.DriverManager.getConnection(DriverManager.java:154) at org.springframework.jdbc.datasource.DriverManagerDataSource.getConnectionFromDriverManager(DriverManagerDataSource.java:291) at org.springframework.jdbc.datasource.DriverManagerDataSource.getConnectionFromDriverManager(DriverManagerDataSource.java:277) at org.springframework.jdbc.datasource.DriverManagerDataSource.getConnectionFromDriverManager(DriverManagerDataSource.java:259) at org.springframework.jdbc.datasource.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:240) at org.springframework.jdbc.datasource.DataSourceTransactionManager.doBegin(DataSourceTransactionManager.java:182) at org.springframework.transaction.support.AbstractPla