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 org.flywaydb.core.api.FlywayException: Unable to scan for SQL migrations in location: classpath:db/migration

GitHub | philwebb | 2 months ago
  1. 0

    GitHub comment 7079#254861387

    GitHub | 2 months ago | philwebb
    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 org.flywaydb.core.api.FlywayException: Unable to scan for SQL migrations in location: classpath:db/migration
  2. 0

    GitHub comment 2#249957193

    GitHub | 2 months ago | ceizner
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userEnableFilter': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: com.draios.storage.services.UserService com.draios.security.UserEnableFilter.userService; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userService': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.draios.storage.services.TeamService com.draios.storage.services.UserService.teamService; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'teamService': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.draios.storage.services.SupportedMetricsService com.draios.storage.services.TeamService.supportedMetricsService; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'supportedMetricsService': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.draios.storage.dao.SupportedMetricsDAO com.draios.storage.services.SupportedMetricsService.supportedMetricsDAO; nested exception is 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 org.flywaydb.core.api.FlywayException: Found non-empty schema `draios` without metadata table! Use baseline() or set baselineOnMigrate to true to initialize the metadata table.
  3. 0

    使用mysql和tomcat时遇到下面错误

    GitHub | 2 years ago | TonyLuo
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'databaseMigrator': Invocation of init method failed; nested exception is org.flywaydb.core.api.FlywayException: Validate failed. Found differences between applied migrations and available migrations: Migration Checksum mismatch for migration V0_0_2__cms_article.sql: DB=1509820152, Classpath=1977030717
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Fresh install won't work with 0.0.3.Alpha2 (Migration Exception)

    GitHub | 4 months ago | mozzbozz
    org.flywaydb.core.api.FlywayException: Found non-empty schema "PUBLIC" without metadata table! Use baseline() or set baselineOnMigrate to true to initialize the metadata table.
  6. 0

    PostgreSQL: 'SET client_encoding = ...' causes IOException

    GitHub | 2 years ago | marksievers
    org.flywaydb.core.api.FlywayException: Error setting current schema to "public"
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. org.flywaydb.core.api.FlywayException

    Unable to determine URL for classpath location: db/migration (ClassLoader: sun.misc.Launcher$AppClassLoader@4aa298b7)

    at org.flywaydb.core.internal.util.scanner.classpath.ClassPathScanner.getLocationUrlsForPath()
  2. ${project.artifactId}
    Flyway.migrate
    1. org.flywaydb.core.internal.util.scanner.classpath.ClassPathScanner.getLocationUrlsForPath(ClassPathScanner.java:192)[flyway-core-3.2.1.jar:na]
    2. org.flywaydb.core.internal.util.scanner.classpath.ClassPathScanner.findResourceNames(ClassPathScanner.java:148)[flyway-core-3.2.1.jar:na]
    3. org.flywaydb.core.internal.util.scanner.classpath.ClassPathScanner.scanForResources(ClassPathScanner.java:73)[flyway-core-3.2.1.jar:na]
    4. org.flywaydb.core.internal.util.scanner.Scanner.scanForResources(Scanner.java:53)[flyway-core-3.2.1.jar:na]
    5. org.flywaydb.core.internal.resolver.sql.SqlMigrationResolver.resolveMigrations(SqlMigrationResolver.java:110)[flyway-core-3.2.1.jar:na]
    6. org.flywaydb.core.internal.resolver.sql.SqlMigrationResolver.resolveMigrations(SqlMigrationResolver.java:41)[flyway-core-3.2.1.jar:na]
    7. org.flywaydb.core.internal.resolver.CompositeMigrationResolver.collectMigrations(CompositeMigrationResolver.java:126)[flyway-core-3.2.1.jar:na]
    8. org.flywaydb.core.internal.resolver.CompositeMigrationResolver.doFindAvailableMigrations(CompositeMigrationResolver.java:108)[flyway-core-3.2.1.jar:na]
    9. org.flywaydb.core.internal.resolver.CompositeMigrationResolver.resolveMigrations(CompositeMigrationResolver.java:94)[flyway-core-3.2.1.jar:na]
    10. org.flywaydb.core.internal.resolver.CompositeMigrationResolver.resolveMigrations(CompositeMigrationResolver.java:42)[flyway-core-3.2.1.jar:na]
    11. org.flywaydb.core.internal.info.MigrationInfoServiceImpl.refresh(MigrationInfoServiceImpl.java:96)[flyway-core-3.2.1.jar:na]
    12. org.flywaydb.core.internal.command.DbValidate$2.doInTransaction(DbValidate.java:136)[flyway-core-3.2.1.jar:na]
    13. org.flywaydb.core.internal.command.DbValidate$2.doInTransaction(DbValidate.java:131)[flyway-core-3.2.1.jar:na]
    14. org.flywaydb.core.internal.util.jdbc.TransactionTemplate.execute(TransactionTemplate.java:72)[flyway-core-3.2.1.jar:na]
    15. org.flywaydb.core.internal.command.DbValidate.validate(DbValidate.java:131)[flyway-core-3.2.1.jar:na]
    16. org.flywaydb.core.Flyway.doValidate(Flyway.java:1102)[flyway-core-3.2.1.jar:na]
    17. org.flywaydb.core.Flyway.access$300(Flyway.java:62)[flyway-core-3.2.1.jar:na]
    18. org.flywaydb.core.Flyway$1.execute(Flyway.java:1012)[flyway-core-3.2.1.jar:na]
    19. org.flywaydb.core.Flyway$1.execute(Flyway.java:1006)[flyway-core-3.2.1.jar:na]
    20. org.flywaydb.core.Flyway.execute(Flyway.java:1418)[flyway-core-3.2.1.jar:na]
    21. org.flywaydb.core.Flyway.migrate(Flyway.java:1006)[flyway-core-3.2.1.jar:na]
    21 frames
  3. Spring Boot AutoConfigure
    FlywayMigrationInitializer.afterPropertiesSet
    1. org.springframework.boot.autoconfigure.flyway.FlywayMigrationInitializer.afterPropertiesSet(FlywayMigrationInitializer.java:66)[spring-boot-autoconfigure-1.4.1.RELEASE.jar:1.4.1.RELEASE]
    1 frame
  4. Spring Beans
    AbstractBeanFactory.getBean
    1. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1642)[spring-beans-4.3.3.RELEASE.jar:4.3.3.RELEASE]
    2. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1579)[spring-beans-4.3.3.RELEASE.jar:4.3.3.RELEASE]
    3. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:545)[spring-beans-4.3.3.RELEASE.jar:4.3.3.RELEASE]
    4. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)[spring-beans-4.3.3.RELEASE.jar:4.3.3.RELEASE]
    5. org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)[spring-beans-4.3.3.RELEASE.jar:4.3.3.RELEASE]
    6. org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)[spring-beans-4.3.3.RELEASE.jar:4.3.3.RELEASE]
    7. org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)[spring-beans-4.3.3.RELEASE.jar:4.3.3.RELEASE]
    8. org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)[spring-beans-4.3.3.RELEASE.jar:4.3.3.RELEASE]
    9. org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:296)[spring-beans-4.3.3.RELEASE.jar:4.3.3.RELEASE]
    10. org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)[spring-beans-4.3.3.RELEASE.jar:4.3.3.RELEASE]
    10 frames
  5. Spring Context
    AbstractApplicationContext.refresh
    1. org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1076)[spring-context-4.3.3.RELEASE.jar:4.3.3.RELEASE]
    2. org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:851)[spring-context-4.3.3.RELEASE.jar:4.3.3.RELEASE]
    3. org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:541)[spring-context-4.3.3.RELEASE.jar:4.3.3.RELEASE]
    3 frames
  6. Spring Boot
    SpringApplication.run
    1. org.springframework.boot.SpringApplication.refresh(SpringApplication.java:761)[spring-boot-1.4.1.RELEASE.jar:1.4.1.RELEASE]
    2. org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:371)[spring-boot-1.4.1.RELEASE.jar:1.4.1.RELEASE]
    3. org.springframework.boot.SpringApplication.run(SpringApplication.java:315)[spring-boot-1.4.1.RELEASE.jar:1.4.1.RELEASE]
    3 frames
  7. org.springframework.boot
    SpringBootContextLoader.loadContext
    1. org.springframework.boot.test.context.SpringBootContextLoader.loadContext(SpringBootContextLoader.java:111)[spring-boot-test-1.4.1.RELEASE.jar:1.4.1.RELEASE]
    1 frame
  8. org.springframework.test
    DefaultCacheAwareContextLoaderDelegate.loadContext
    1. org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContextInternal(DefaultCacheAwareContextLoaderDelegate.java:98)[spring-test-4.3.3.RELEASE.jar:4.3.3.RELEASE]
    2. org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:116)[spring-test-4.3.3.RELEASE.jar:4.3.3.RELEASE]
    2 frames
  9. Spring TestContext
    DependencyInjectionTestExecutionListener.prepareTestInstance
    1. org.springframework.test.context.support.DefaultTestContext.getApplicationContext(DefaultTestContext.java:83)[spring-test-4.3.3.RELEASE.jar:4.3.3.RELEASE]
    2. org.springframework.test.context.support.DependencyInjectionTestExecutionListener.injectDependencies(DependencyInjectionTestExecutionListener.java:117)[spring-test-4.3.3.RELEASE.jar:4.3.3.RELEASE]
    3. org.springframework.test.context.support.DependencyInjectionTestExecutionListener.prepareTestInstance(DependencyInjectionTestExecutionListener.java:83)[spring-test-4.3.3.RELEASE.jar:4.3.3.RELEASE]
    3 frames
  10. org.springframework.boot
    SpringBootDependencyInjectionTestExecutionListener.prepareTestInstance
    1. org.springframework.boot.test.autoconfigure.SpringBootDependencyInjectionTestExecutionListener.prepareTestInstance(SpringBootDependencyInjectionTestExecutionListener.java:44)[spring-boot-test-autoconfigure-1.4.1.RELEASE.jar:1.4.1.RELEASE]
    1 frame
  11. Spring TestContext
    SpringJUnit4ClassRunner$1.runReflectiveCall
    1. org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:230)[spring-test-4.3.3.RELEASE.jar:4.3.3.RELEASE]
    2. org.springframework.test.context.junit4.SpringJUnit4ClassRunner.createTest(SpringJUnit4ClassRunner.java:228)[spring-test-4.3.3.RELEASE.jar:4.3.3.RELEASE]
    3. org.springframework.test.context.junit4.SpringJUnit4ClassRunner$1.runReflectiveCall(SpringJUnit4ClassRunner.java:287)[spring-test-4.3.3.RELEASE.jar:4.3.3.RELEASE]
    3 frames
  12. JUnit
    ReflectiveCallable.run
    1. org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)[junit-4.12.jar:4.12]
    1 frame
  13. Spring TestContext
    SpringJUnit4ClassRunner.runChild
    1. org.springframework.test.context.junit4.SpringJUnit4ClassRunner.methodBlock(SpringJUnit4ClassRunner.java:289)[spring-test-4.3.3.RELEASE.jar:4.3.3.RELEASE]
    2. org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:247)[spring-test-4.3.3.RELEASE.jar:4.3.3.RELEASE]
    3. org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:94)[spring-test-4.3.3.RELEASE.jar:4.3.3.RELEASE]
    3 frames
  14. JUnit
    ParentRunner$2.evaluate
    1. org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)[junit-4.12.jar:4.12]
    2. org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)[junit-4.12.jar:4.12]
    3. org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)[junit-4.12.jar:4.12]
    4. org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)[junit-4.12.jar:4.12]
    5. org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)[junit-4.12.jar:4.12]
    5 frames
  15. Spring TestContext
    RunAfterTestClassCallbacks.evaluate
    1. org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)[spring-test-4.3.3.RELEASE.jar:4.3.3.RELEASE]
    2. org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70)[spring-test-4.3.3.RELEASE.jar:4.3.3.RELEASE]
    2 frames
  16. JUnit
    ParentRunner.run
    1. org.junit.runners.ParentRunner.run(ParentRunner.java:363)[junit-4.12.jar:4.12]
    1 frame
  17. Spring TestContext
    SpringJUnit4ClassRunner.run
    1. org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:191)[spring-test-4.3.3.RELEASE.jar:4.3.3.RELEASE]
    1 frame
  18. JUnit4 Provider
    JUnit4Provider.invoke
    1. org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:283)[surefire-junit4-2.18.1.jar:2.18.1]
    2. org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:173)[surefire-junit4-2.18.1.jar:2.18.1]
    3. org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153)[surefire-junit4-2.18.1.jar:2.18.1]
    4. org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:128)[surefire-junit4-2.18.1.jar:2.18.1]
    4 frames
  19. SureFire
    ForkedBooter.main
    1. org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:203)[surefire-booter-2.18.1.jar:2.18.1]
    2. org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:155)[surefire-booter-2.18.1.jar:2.18.1]
    3. org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)[surefire-booter-2.18.1.jar:2.18.1]
    3 frames