请教一下jfinal-demo的数据库初始化问题?报错-问答-阿里云开发者社区-阿里云

开发者社区> 问答> 正文

请教一下jfinal-demo的数据库初始化问题?报错

2020-06-12 15:40:42 489 1

@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


数据库已正常连接.这是哪有问题了?

取消 提交回答
全部回答(1)
  • 爱吃鱼的程序员
    2020-06-12 15:41:00

    clean再执行migrate

    你执行的flyway:clean还是mvn:clean已经这样操作了还是没用clean可以正常执行jfinal-demo下面已经是空的
    0 0
相关问答

1

回答

Jfinal 获取post请求体中的数据? 400 报错

2020-06-02 13:38:16 373浏览量 回答数 1

0

回答

深入理解Magento - 第二章 - Magento请求分发与控制器 400 请求报错 

2020-05-28 16:31:47 272浏览量 回答数 0

1

回答

请问JFinal框架如何给数据表插入当前系统时间?报错

2020-06-22 13:42:52 208浏览量 回答数 1

1

回答

继 JFinal demo 后的实际应用? 400 报错

2020-06-03 15:11:06 271浏览量 回答数 1

1

回答

JFinal插入数据忽略出错

2016-03-11 08:41:42 2091浏览量 回答数 1

1

回答

JFinal更新数据库表中数据:报错

2020-06-06 18:08:27 230浏览量 回答数 1

1

回答

JFinal更新数据库表中数据?报错

2020-06-15 19:33:21 317浏览量 回答数 1

1

回答

PowerDesigner配置数据库报错:ORA-28040: 没有匹配的身份验证协议

2021-10-22 01:22:45 216浏览量 回答数 1

1

回答

关于jfinal提交多行list数据到服务端:报错

2020-06-06 14:38:37 250浏览量 回答数 1

6

回答

rds导出sql导入自己的数据库时总是报错

2015-06-08 18:11:11 6040浏览量 回答数 6
+关注
爱吃鱼的程序员
https://developer.aliyun.com/profile/5yerqm5bn5yqg?spm=a2c6h.12873639.0.0.6eae304abcjaIB
2
文章
21564
问答
问答排行榜
最热
最新
相关电子书
更多
低代码开发师(初级)实战教程
立即下载
阿里巴巴DevOps 最佳实践手册
立即下载
冬季实战营第三期:MySQL数据库进阶实战
立即下载