sql文件太大,导致flyway迁移失败

时间:2015-11-05 04:45:15

标签: flyway

1)我创建了数据库测试 2)在sql目录中有文件和文件大小的时候运行flyway migrate -rw-r - r-- 1 root root 5822832804 11月5日15:14 V1__Base_version.sql

数据库:jdbc:mysql:// localhost:3306 /(MySQL 5.6)

Exception in thread "main" java.lang.OutOfMemoryError: Java heap `enter code here`space
        at java.util.Arrays.copyOf(Arrays.java:3236)
        at java.io.ByteArrayOutputStream.grow(ByteArrayOutputStream.java:118)
        at java.io.ByteArrayOutputStream.ensureCapacity(ByteArrayOutputStream.java:93)
        at java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:153)
        at org.flywaydb.core.internal.util.FileCopyUtils.copy(FileCopyUtils.java:117)
        at org.flywaydb.core.internal.util.FileCopyUtils.copyToByteArray(FileCopyUtils.java:68)
        at org.flywaydb.core.internal.util.scanner.filesystem.FileSystemResource.loadAsBytes(FileSystemResource.java:90)
        at org.flywaydb.core.internal.resolver.sql.SqlMigrationResolver.extractMigrationInfo(SqlMigrationResolver.java:140)
        at org.flywaydb.core.internal.resolver.sql.SqlMigrationResolver.resolveMigrations(SqlMigrationResolver.java:112)
        at org.flywaydb.core.internal.resolver.sql.SqlMigrationResolver.resolveMigrations(SqlMigrationResolver.java:41)
        at org.flywaydb.core.internal.resolver.CompositeMigrationResolver.collectMigrations(CompositeMigrationResolver.java:126)
        at org.flywaydb.core.internal.resolver.CompositeMigrationResolver.doFindAvailableMigrations(CompositeMigrationResolver.java:108)
        at org.flywaydb.core.internal.resolver.CompositeMigrationResolver.resolveMigrations(CompositeMigrationResolver.java:94)
        at org.flywaydb.core.internal.resolver.CompositeMigrationResolver.resolveMigrations(CompositeMigrationResolver.java:42)
        at org.flywaydb.core.internal.info.MigrationInfoServiceImpl.refresh(MigrationInfoServiceImpl.java:96)
        at org.flywaydb.core.internal.command.DbValidate$2.doInTransaction(DbValidate.java:136)
        at org.flywaydb.core.internal.command.DbValidate$2.doInTransaction(DbValidate.java:131)
        at org.flywaydb.core.internal.util.jdbc.TransactionTemplate.execute(TransactionTemplate.java:72)
        at org.flywaydb.core.internal.command.DbValidate.validate(DbValidate.java:131)
        at org.flywaydb.core.Flyway.doValidate(Flyway.java:1102)
        at org.flywaydb.core.Flyway.access$300(Flyway.java:62)
        at org.flywaydb.core.Flyway$1.execute(Flyway.java:1012)
        at org.flywaydb.core.Flyway$1.execute(Flyway.java:1006)
        at org.flywaydb.core.Flyway.execute(Flyway.java:1418)
        at org.flywaydb.core.Flyway.migrate(Flyway.java:1006)
        at org.flywaydb.commandline.Main.executeOperation(Main.java:122)
        at org.flywaydb.commandline.Main.main(Main.java:91)

0 个答案:

没有答案