java.sql.SQLException

Flyway migration error occurred

Samebug tips0

There are no available Samebug tips for this exception. If you know how to solve this issue, help other users by writing a short tip.

Don't give up yet. Paste your full stack trace to get a solution.

Solutions on the web5107

  • via Sakai JIRA by Terry Brady, 4 months ago
    Flyway migration error occurred
  • via Google Groups by Sean Carte, 10 months ago
    Flyway migration error occurred
  • via Sakai JIRA by Terry Brady, 1 year ago
    Flyway migration error occurred
  • Stack trace

    • java.sql.SQLException: Flyway migration error occurred at org.dspace.storage.rdbms.DatabaseUtils.updateDatabase(DatabaseUtils.java:430) at org.dspace.storage.rdbms.DatabaseUtils.updateDatabase(DatabaseUtils.java:338) at org.dspace.storage.rdbms.DatabaseManager.initialize(DatabaseManager.java:1373) at org.dspace.storage.rdbms.DatabaseManager.getDataSource(DatabaseManager.java:650) at org.dspace.storage.rdbms.DatabaseManager.getConnection(DatabaseManager.java:629) at org.dspace.core.Context.init(Context.java:121) at org.dspace.core.Context.<init>(Context.java:95) at org.dspace.AbstractUnitTest.init(AbstractUnitTest.java:139) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27) at org.junit.runners.ParentRunner.run(ParentRunner.java:309) at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:264) at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153) at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:124) at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:200) at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153) at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103) Caused by: org.flywaydb.core.api.FlywayException: Migration failed ! at org.flywaydb.core.internal.resolver.jdbc.JdbcMigrationExecutor.execute(JdbcMigrationExecutor.java:47) at org.flywaydb.core.internal.command.DbMigrate$5.doInTransaction(DbMigrate.java:287) at org.flywaydb.core.internal.command.DbMigrate$5.doInTransaction(DbMigrate.java:285) at org.flywaydb.core.internal.util.jdbc.TransactionTemplate.execute(TransactionTemplate.java:72) at org.flywaydb.core.internal.command.DbMigrate.applyMigration(DbMigrate.java:285) at org.flywaydb.core.internal.command.DbMigrate.access$800(DbMigrate.java:46) at org.flywaydb.core.internal.command.DbMigrate$2.doInTransaction(DbMigrate.java:207) 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 org.dspace.storage.rdbms.DatabaseUtils.updateDatabase(DatabaseUtils.java:419) ... 33 more Caused by: org.flywaydb.core.api.FlywayException: Unable to obtain inputstream for resource: org/dspace/storage/rdbms/xmlworkflow/h2/xml_workflow_migration.sql at org.flywaydb.core.internal.util.scanner.classpath.ClassPathResource.loadAsString(ClassPathResource.java:83) at org.dspace.storage.rdbms.xmlworkflow.V5_0_2014_11_04__Enable_XMLWorkflow_Migration.migrate(V5_0_2014_11_04__Enable_XMLWorkflow_Migration.java:70) at org.flywaydb.core.internal.resolver.jdbc.JdbcMigrationExecutor.execute(JdbcMigrationExecutor.java:45) ... 47 more

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    You’re the first here who have seen this exception.