详情错误日志

  .   ____          _            __ _ _/\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \\\/  ___)| |_)| | | | | || (_| |  ) ) ) )'  |____| .__|_| |_|_| |_\__, | / / / /=========|_|==============|___/=/_/_/_/:: Spring Boot ::                (v2.6.3)2022-11-02 09:54:21.609  INFO 11444 --- [           main] com.flyway.FlaywayApplication            : Starting FlaywayApplication using Java 1.8.0_71 on HYT211145187-01 with PID 11444 (G:\WorkSpace\springboot-test\flyway-test\target\classes started by 211145187 in G:\WorkSpace\springboot-test)
2022-11-02 09:54:21.613  INFO 11444 --- [           main] com.flyway.FlaywayApplication            : No active profile set, falling back to default profiles: default
2022-11-02 09:54:22.684  INFO 11444 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 8015 (http)
2022-11-02 09:54:22.694  INFO 11444 --- [           main] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
2022-11-02 09:54:22.694  INFO 11444 --- [           main] org.apache.catalina.core.StandardEngine  : Starting Servlet engine: [Apache Tomcat/9.0.56]
2022-11-02 09:54:22.781  INFO 11444 --- [           main] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
2022-11-02 09:54:22.781  INFO 11444 --- [           main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 1124 ms
2022-11-02 09:54:23.171  INFO 11444 --- [           main] o.f.c.internal.license.VersionPrinter    : Flyway Community Edition 6.5.7 by Redgate
2022-11-02 09:54:23.176  INFO 11444 --- [           main] com.zaxxer.hikari.HikariDataSource       : HikariCP - Starting...
2022-11-02 09:54:33.502  INFO 11444 --- [           main] com.zaxxer.hikari.HikariDataSource       : HikariCP - Start completed.
2022-11-02 09:54:33.519  INFO 11444 --- [           main] o.f.c.internal.database.DatabaseFactory  : Database: jdbc:mysql://10.110.13.86:3306/flyway (MySQL 5.7)
2022-11-02 09:54:33.585  WARN 11444 --- [           main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'flywayInitializer' defined in class path resource [org/springframework/boot/autoconfigure/flyway/FlywayAutoConfiguration$FlywayConfiguration.class]: Invocation of init method failed; nested exception is java.lang.reflect.InvocationTargetException
2022-11-02 09:54:33.585  INFO 11444 --- [           main] com.zaxxer.hikari.HikariDataSource       : HikariCP - Shutdown initiated...
2022-11-02 09:54:33.589  INFO 11444 --- [           main] com.zaxxer.hikari.HikariDataSource       : HikariCP - Shutdown completed.
2022-11-02 09:54:33.592  INFO 11444 --- [           main] o.apache.catalina.core.StandardService   : Stopping service [Tomcat]
2022-11-02 09:54:33.602  INFO 11444 --- [           main] ConditionEvaluationReportLoggingListener : Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2022-11-02 09:54:33.632 ERROR 11444 --- [           main] o.s.boot.SpringApplication               : Application run failedorg.springframework.beans.factory.BeanCreationException: Error creating bean with name 'flywayInitializer' defined in class path resource [org/springframework/boot/autoconfigure/flyway/FlywayAutoConfiguration$FlywayConfiguration.class]: Invocation of init method failed; nested exception is java.lang.reflect.InvocationTargetExceptionat org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1804) ~[spring-beans-5.3.15.jar:5.3.15]at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:620) ~[spring-beans-5.3.15.jar:5.3.15]at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542) ~[spring-beans-5.3.15.jar:5.3.15]at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) ~[spring-beans-5.3.15.jar:5.3.15]at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-5.3.15.jar:5.3.15]at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) ~[spring-beans-5.3.15.jar:5.3.15]at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) ~[spring-beans-5.3.15.jar:5.3.15]at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:322) ~[spring-beans-5.3.15.jar:5.3.15]at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) ~[spring-beans-5.3.15.jar:5.3.15]at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:953) ~[spring-beans-5.3.15.jar:5.3.15]at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:918) ~[spring-context-5.3.15.jar:5.3.15]at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583) ~[spring-context-5.3.15.jar:5.3.15]at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:145) ~[spring-boot-2.6.3.jar:2.6.3]at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:732) [spring-boot-2.6.3.jar:2.6.3]at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:414) [spring-boot-2.6.3.jar:2.6.3]at org.springframework.boot.SpringApplication.run(SpringApplication.java:302) [spring-boot-2.6.3.jar:2.6.3]at org.springframework.boot.SpringApplication.run(SpringApplication.java:1303) [spring-boot-2.6.3.jar:2.6.3]at org.springframework.boot.SpringApplication.run(SpringApplication.java:1292) [spring-boot-2.6.3.jar:2.6.3]at com.flyway.FlaywayApplication.main(FlaywayApplication.java:14) [classes/:na]
Caused by: java.lang.reflect.InvocationTargetException: nullat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_71]at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_71]at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_71]at java.lang.reflect.Method.invoke(Method.java:497) ~[na:1.8.0_71]at org.springframework.boot.autoconfigure.flyway.FlywayMigrationInitializer.afterPropertiesSet(FlywayMigrationInitializer.java:70) ~[spring-boot-autoconfigure-2.6.3.jar:2.6.3]at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1863) ~[spring-beans-5.3.15.jar:5.3.15]at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1800) ~[spring-beans-5.3.15.jar:5.3.15]... 18 common frames omitted
Caused by: org.flywaydb.core.api.FlywayException: Validate failed:
Detected resolved migration not applied to database: 20221103.10000at org.flywaydb.core.Flyway.doValidate(Flyway.java:292) ~[flyway-core-6.5.7.jar:na]at org.flywaydb.core.Flyway.access$100(Flyway.java:73) ~[flyway-core-6.5.7.jar:na]at org.flywaydb.core.Flyway$1.execute(Flyway.java:166) ~[flyway-core-6.5.7.jar:na]at org.flywaydb.core.Flyway$1.execute(Flyway.java:158) ~[flyway-core-6.5.7.jar:na]at org.flywaydb.core.Flyway.execute(Flyway.java:527) ~[flyway-core-6.5.7.jar:na]at org.flywaydb.core.Flyway.migrate(Flyway.java:158) ~[flyway-core-6.5.7.jar:na]... 25 common frames omittedProcess finished with exit code 1

错误原因:sql版本校验没过,正常情况一般是版本命名不规范,修改sql版本即可。

场景复现:我先创建个V20221103_10001__add_flyway_test_table.sql的文件,执行版本迁移成功,然后我创建个V20221103_10000__add_flyway_test_table.sql发下失败,明显是双下划线前面的版本不规范造成的。

详情请看我的博客:↓

springboot使用flyway,使用介绍、个人总结及报错场景如何修改

flywa报错Detected resolved migration not applied to database: 20221103.10000相关推荐

  1. Flyway 报错:Detected applied migration not resolved locally:2和执行脚本错误

    目录 一.前言 1.Flyway简介 2.flyway依赖包 3.使用flyway的好处 二.问题分析 1.Flyway 报错:Detected applied migration not resol ...

  2. ORACLE报错(5)ORA-01102: cannot mount database in EXCLUSIVE mode

    ORACLE报错(5)ORA-01102: cannot mount database in EXCLUSIVE mode SQL> conn /as sysdba Connected to a ...

  3. SecureCRT连接服务器报错Failed to open the host key database file解决方法

    1.打开SecureCRT后报错截图: 点击文件---->显示快速连接 ---->单击. 进入快速连接的界面后,将主机名和用户名填写后---->点击连接. 点击连接后--->页 ...

  4. SQL注入中的报错注入,updatexml(1,concat(0x7e,database(),0x7e),1)

    (此文章是记录本人对知识理解的随手笔记,内容不肯定百分百正确,如有错误望指出并谅解) 先看一个通俗易懂的例子: select updatexml("abc","//div ...

  5. Spark报错:The pivot column feature has more than 10000 distinct values

    (作者:陈玓玏 data-master) 用pyspark做窄表转宽表的时候,出现报错: pyspark.sql.utils.AnalysisException: u'The pivot column ...

  6. SpringBoot报错:If you want an embedded database (H2, HSQL or Derby), please put it on the classpath.

    一.Source roots (or source folders)通过这个类指定一个文件夹,你告诉IntelliJ IDEA,这个文件夹及其子文件夹中包含的源代码,可以编译为构建过程的一部分.2. ...

  7. linux启动redis报错Failed to start Redis persistent key-value database

    systemctl status redis.service启动redis,启动失败, 提示:Failed to start Redis persistent key-value database. ...

  8. IDEA 连接数据库报错(IDEA cannot connect to a database)

    目录 问题描述: 问题原因: 解决办法:

  9. springboot使用flyway,使用介绍、个人总结及报错场景如何修改

    文章目录 一.背景 二.为什么要使用flyway 三.flyway工作流程 四.文件命名规范 五.Flyway 的迁移类型 六.sql迁移文件执行的迁移流程 七.注意事项 八.SpringBoot 项 ...

最新文章

  1. Qt中使用的工程文件(.pro文件)
  2. 读书笔记:《HTML5开发手册》--figure、time、details、mark
  3. 监控系统常见的故障及解决方法.
  4. 在ISA 2006标准版上定制带宽和限制流量(测试)
  5. Java Queue 使用总结
  6. JavaScript中的[]和{}
  7. 21. 包含min函数的栈(C++版本)
  8. 双非计算机考研复试怎么办,【计算机考研】985、211VS双非,复试时导师会有歧视吗?...
  9. [POI2006]ORK-Ploughing
  10. 抓linux肉鸡教程视频,抓肉鸡的教程和软件免费分享(2018一天抓1000只电脑肉鸡视频)...
  11. MATLAB卷积conv、conv2、convn详解
  12. 浅谈打印机驱动安装的常见方法及安全防护
  13. 使用Python连接阿里云物联网
  14. scrapy抓斗鱼主播的图片
  15. 江民KV2008离线包和安装包下载 2007-12-24
  16. 使用ivx中表格组件的经验总结
  17. 野生程序员的折腾— 从包工头到程序猿(一)
  18. Scratch等级考试编程题操作指南
  19. 3000字梳理大数据开发流程及规范(建议收藏)
  20. 计算机生成全息投影代码,常见的投影控制代码 汇总 1

热门文章

  1. FUI- 我离钢铁侠还差几步?
  2. Mac卸载pkg程序
  3. 每个人心中的那一首歌
  4. ssm框架实现文件上传(上传头像)
  5. Linux中的两个虚拟机之间的密钥验证
  6. python量化交易:Joinquant_量化交易基础【四】:下单、函数、API
  7. PX4/Pixhawk---uORB深入理解和应用(最新版)
  8. 新买的路由器怎么设置(收藏)
  9. 2023华为od机试真题【恢复数字序列】Java
  10. 数据分析概述excel