awferreira / c5-db-migration

Automatically exported from code.google.com/p/c5-db-migration
0 stars 0 forks source link

Error while running migration on SQLite database #51

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. set up simple migration script
2. run mvn db-migration:migrate -e

What is the expected output? What do you see instead?

[ERROR] Failed to execute goal 
com.carbonfive.db-support:db-migration-maven-plugin:0.9.9-m5:migrate 
(default-cli) on project smartcv: Failed to migrate 
jdbc:sqlite:/var/www/SmartCV.db: Migration for version 001 failed, rolling back 
and terminating migration. Error while executing migration script. no ResultSet 
available -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal 
com.carbonfive.db-support:db-migration-maven-plugin:0.9.9-m5:migrate 
(default-cli) on project smartcv: Failed to migrate 
jdbc:sqlite:/var/www/SmartCV.db
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
    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.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.MojoExecutionException: Failed to migrate 
jdbc:sqlite:/var/www/SmartCV.db
    at com.carbonfive.db.migration.maven.MigrateMojo.executeMojo(MigrateMojo.java:23)
    at com.carbonfive.db.migration.maven.AbstractMigrationMojo.execute(AbstractMigrationMojo.java:72)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
    ... 19 more
Caused by: com.carbonfive.db.migration.MigrationException: Migration for 
version 001 failed, rolling back and terminating migration.
    at com.carbonfive.db.migration.DataSourceMigrationManager$1.doInConnection(DataSourceMigrationManager.java:112)
    at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:341)
    at com.carbonfive.db.migration.DataSourceMigrationManager.migrate(DataSourceMigrationManager.java:80)
    at com.carbonfive.db.migration.maven.MigrateMojo.executeMojo(MigrateMojo.java:19)
    ... 22 more
Caused by: com.carbonfive.db.migration.MigrationException: Error while 
executing migration script.
    at com.carbonfive.db.migration.SQLScriptMigration.migrate(SQLScriptMigration.java:41)
    at com.carbonfive.db.migration.DataSourceMigrationManager$1.doInConnection(DataSourceMigrationManager.java:100)
    ... 25 more
Caused by: java.sql.SQLException: no ResultSet available
    at com.carbonfive.db.jdbc.ScriptRunner.doExecute(ScriptRunner.java:127)
    at com.carbonfive.db.jdbc.ScriptRunner.execute(ScriptRunner.java:38)
    at com.carbonfive.db.migration.SQLScriptMigration.migrate(SQLScriptMigration.java:32)
    ... 26 more

What version of the product are you using? On what operating system?
Running 0.9.9-m5 migration plugin on Max OS X with SQLite 3.7.7 and Xerial 
SQLIte drive version 3.7.2

Please provide any additional information below.
Although SQLIte is not officially supported, perhaps this issue could be easily 
addressed.

Original issue reported on code.google.com by BTekiel...@gmail.com on 21 May 2012 at 9:22