@Dreampie 你好,想跟你请教个问题:
我在jfinal-demo中使用cn.dreampie:flyway-maven-plugin:1.0:migrate启动,结果报错:
[info] location:filesystem:D:\WorkZone\GitHub\jfinal-demo/src/main/resources/db/migration/default
七月 20, 2015 5:07:25 下午 org.flywaydb.core.internal.dbsupport.DbSupportFactory createDbSupport
INFO: Database: jdbc:mysql://localhost:3306/jfinal_demo?useUnicode=true&characterEncoding=UTF-8 (MySQL 5.5)
七月 20, 2015 5:07:25 下午 org.flywaydb.core.internal.command.DbValidate validate
INFO: Validated 5 migrations (execution time 00:00.057s)
七月 20, 2015 5:07:25 下午 org.flywaydb.core.internal.command.DbMigrate migrate
INFO: Current version of schema `jfinal_demo`: 1
[ERROR] Failed to execute goal cn.dreampie:flyway-maven-plugin:1.0:migrate (default-cli) on project jfinal-demo: Execution default-cli of goal cn.dreampie:flyway-maven-plugin:1.0:migrate failed: Schema `jfinal_demo` contains a failed migration to version 1 ! -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal cn.dreampie:flyway-maven-plugin:1.0:migrate (default-cli) on project jfinal-demo: Execution default-cli of goal cn.dreampie:flyway-maven-plugin:1.0:migrate failed: Schema `jfinal_demo` contains a failed migration to version 1 !
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:224)
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:317)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:152)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:555)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
at org.codehaus.classworlds.Launcher.main(Launcher.java:46)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default-cli of goal cn.dreampie:flyway-maven-plugin:1.0:migrate failed: Schema `jfinal_demo` contains a failed migration to version 1 !
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:115)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
... 20 more
Caused by: org.flywaydb.core.api.FlywayException: Schema `jfinal_demo` contains a failed migration to version 1 !
at org.flywaydb.core.internal.command.DbMigrate$2.doInTransaction(DbMigrate.java:196)
at org.flywaydb.core.internal.command.DbMigrate$2.doInTransaction(DbMigrate.java:156)
at org.flywaydb.core.internal.util.jdbc.TransactionTemplate.execute(TransactionTemplate.java:72)
at org.flywaydb.core.internal.command.DbMigrate.migrate(DbMigrate.java:156)
at org.flywaydb.core.Flyway$1.execute(Flyway.java:864)
at org.flywaydb.core.Flyway$1.execute(Flyway.java:811)
at org.flywaydb.core.Flyway.execute(Flyway.java:1171)
at org.flywaydb.core.Flyway.migrate(Flyway.java:811)
at cn.dreampie.AbstractFlywayMojo.migrateAutomatically(AbstractFlywayMojo.java:140)
at cn.dreampie.AbstractFlywayMojo.migrate(AbstractFlywayMojo.java:96)
at cn.dreampie.MigrateMojo.execute(MigrateMojo.java:28)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:106)
... 21 more
[ERROR]
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException
数据库已正常连接.这是哪有问题了?
clean再执行migrate
你执行的flyway:clean还是mvn:clean已经这样操作了还是没用clean可以正常执行jfinal-demo下面已经是空的版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。