teavmac Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled. 2020-03-31 14:14:29.225 ERROR 12445 --- [ main] o.s.boot.SpringApplication : Application run failed org.flywaydb.core.internal.command.DbMigrate$FlywayMigrateException: Migration V3__migrate_1.3.0-beta.1_to_1.3.0-beta.2.sql failed ------------------------------------------------------------- SQL State : 42000 Error Code : 1071 Message : Specified key was too long; max key length is 767 bytes Location : migration/V3__migrate_1.3.0-beta.1_to_1.3.0-beta.2.sql (/usr/local/halo/file:/usr/local/halo/halo-latest.jar!/BOOT-INF/classes!/migration/V3__migrate_1.3.0-beta.1_to_1.3.0-beta.2.sql) Line : 12 Statement : alter table categories modify name varchar(255) not null at org.flywaydb.core.internal.command.DbMigrate.doMigrateGroup(DbMigrate.java:369) ~[flyway-core-6.3.1.jar!/:na] at org.flywaydb.core.internal.command.DbMigrate.access$200(DbMigrate.java:54) ~[flyway-core-6.3.1.jar!/:na] at org.flywaydb.core.internal.command.DbMigrate$3.call(DbMigrate.java:282) ~[flyway-core-6.3.1.jar!/:na] at org.flywaydb.core.internal.jdbc.TransactionalExecutionTemplate.execute(TransactionalExecutionTemplate.java:66) ~[flyway-core-6.3.1.jar!/:na] at org.flywaydb.core.internal.command.DbMigrate.applyMigrations(DbMigrate.java:279) ~[flyway-core-6.3.1.jar!/:na] at org.flywaydb.core.internal.command.DbMigrate.migrateGroup(DbMigrate.java:244) ~[flyway-core-6.3.1.jar!/:na] at org.flywaydb.core.internal.command.DbMigrate.access$100(DbMigrate.java:54) ~[flyway-core-6.3.1.jar!/:na] at org.flywaydb.core.internal.command.DbMigrate$2.call(DbMigrate.java:162) ~[flyway-core-6.3.1.jar!/:na] at org.flywaydb.core.internal.command.DbMigrate$2.call(DbMigrate.java:159) ~[flyway-core-6.3.1.jar!/:na] at org.flywaydb.core.internal.database.mysql.MySQLNamedLockTemplate.execute(MySQLNamedLockTemplate.java:60) ~[flyway-core-6.3.1.jar!/:na] at org.flywaydb.core.internal.database.mysql.MySQLConnection.lock(MySQLConnection.java:161) ~[flyway-core-6.3.1.jar!/:na] at org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory.lock(JdbcTableSchemaHistory.java:140) ~[flyway-core-6.3.1.jar!/:na] at org.flywaydb.core.internal.command.DbMigrate.migrateAll(DbMigrate.java:159) ~[flyway-core-6.3.1.jar!/:na] at org.flywaydb.core.internal.command.DbMigrate.migrate(DbMigrate.java:137) ~[flyway-core-6.3.1.jar!/:na] at org.flywaydb.core.Flyway$1.execute(Flyway.java:193) ~[flyway-core-6.3.1.jar!/:na] at org.flywaydb.core.Flyway$1.execute(Flyway.java:153) ~[flyway-core-6.3.1.jar!/:na] at org.flywaydb.core.Flyway.execute(Flyway.java:523) ~[flyway-core-6.3.1.jar!/:na] at org.flywaydb.core.Flyway.migrate(Flyway.java:153) ~[flyway-core-6.3.1.jar!/:na] at run.halo.app.listener.StartedListener.migrate(StartedListener.java:100) ~[classes!/:na] at run.halo.app.listener.StartedListener.onApplicationEvent(StartedListener.java:66) ~[classes!/:na] at run.halo.app.listener.StartedListener.onApplicationEvent(StartedListener.java:40) ~[classes!/:na] at run.halo.app.listener.StartedListener$$EnhancerBySpringCGLIB$$2ae67d6a.onApplicationEvent(<generated>) ~[classes!/:na] at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172) ~[spring-context-5.2.4.RELEASE.jar!/:5.2.4.RELEASE] at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165) ~[spring-context-5.2.4.RELEASE.jar!/:5.2.4.RELEASE] at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139) ~[spring-context-5.2.4.RELEASE.jar!/:5.2.4.RELEASE] at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:403) ~[spring-context-5.2.4.RELEASE.jar!/:5.2.4.RELEASE] at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:360) ~[spring-context-5.2.4.RELEASE.jar!/:5.2.4.RELEASE] at org.springframework.boot.context.event.EventPublishingRunListener.started(EventPublishingRunListener.java:98) ~[spring-boot-2.2.5.RELEASE.jar!/:2.2.5.RELEASE] at org.springframework.boot.SpringApplicationRunListeners.started(SpringApplicationRunListeners.java:71) ~[spring-boot-2.2.5.RELEASE.jar!/:2.2.5.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:321) [spring-boot-2.2.5.RELEASE.jar!/:2.2.5.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226) [spring-boot-2.2.5.RELEASE.jar!/:2.2.5.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1215) [spring-boot-2.2.5.RELEASE.jar!/:2.2.5.RELEASE] at run.halo.app.Application.main(Application.java:35) [classes!/:na] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_242] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_242] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_242] at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_242] at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48) [halo-latest.jar:na] at org.springframework.boot.loader.Launcher.launch(Launcher.java:87) [halo-latest.jar:na] at org.springframework.boot.loader.Launcher.launch(Launcher.java:51) [halo-latest.jar:na] at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:52) [halo-latest.jar:na] Caused by: org.flywaydb.core.internal.sqlscript.FlywaySqlScriptException: Migration V3__migrate_1.3.0-beta.1_to_1.3.0-beta.2.sql failed ------------------------------------------------------------- SQL State : 42000 Error Code : 1071 Message : Specified key was too long; max key length is 767 bytes Location : migration/V3__migrate_1.3.0-beta.1_to_1.3.0-beta.2.sql (/usr/local/halo/file:/usr/local/halo/halo-latest.jar!/BOOT-INF/classes!/migration/V3__migrate_1.3.0-beta.1_to_1.3.0-beta.2.sql) Line : 12 Statement : alter table categories modify name varchar(255) not null at org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor.handleException(DefaultSqlScriptExecutor.java:274) ~[flyway-core-6.3.1.jar!/:na] at org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor.executeStatement(DefaultSqlScriptExecutor.java:220) ~[flyway-core-6.3.1.jar!/:na] at org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor.execute(DefaultSqlScriptExecutor.java:127) ~[flyway-core-6.3.1.jar!/:na] at org.flywaydb.core.internal.resolver.sql.SqlMigrationExecutor.executeOnce(SqlMigrationExecutor.java:88) ~[flyway-core-6.3.1.jar!/:na] at org.flywaydb.core.internal.resolver.sql.SqlMigrationExecutor.access$000(SqlMigrationExecutor.java:33) ~[flyway-core-6.3.1.jar!/:na] at org.flywaydb.core.internal.resolver.sql.SqlMigrationExecutor$1.call(SqlMigrationExecutor.java:77) ~[flyway-core-6.3.1.jar!/:na] at org.flywaydb.core.internal.resolver.sql.SqlMigrationExecutor$1.call(SqlMigrationExecutor.java:74) ~[flyway-core-6.3.1.jar!/:na] at org.flywaydb.core.internal.database.DefaultExecutionStrategy.execute(DefaultExecutionStrategy.java:28) ~[flyway-core-6.3.1.jar!/:na] at org.flywaydb.core.internal.resolver.sql.SqlMigrationExecutor.execute(SqlMigrationExecutor.java:74) ~[flyway-core-6.3.1.jar!/:na] at org.flywaydb.core.internal.command.DbMigrate.doMigrateGroup(DbMigrate.java:366) ~[flyway-core-6.3.1.jar!/:na] ... 40 common frames omitted Caused by: java.sql.SQLSyntaxErrorException: Specified key was too long; max key length is 767 bytes at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:120) ~[mysql-connector-java-8.0.19.jar!/:8.0.19] at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97) ~[mysql-connector-java-8.0.19.jar!/:8.0.19] at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122) ~[mysql-connector-java-8.0.19.jar!/:8.0.19] at com.mysql.cj.jdbc.StatementImpl.executeInternal(StatementImpl.java:764) ~[mysql-connector-java-8.0.19.jar!/:8.0.19] at com.mysql.cj.jdbc.StatementImpl.execute(StatementImpl.java:648) ~[mysql-connector-java-8.0.19.jar!/:8.0.19] at org.flywaydb.core.internal.jdbc.JdbcTemplate.executeStatement(JdbcTemplate.java:244) ~[flyway-core-6.3.1.jar!/:na] at org.flywaydb.core.internal.sqlscript.ParsedSqlStatement.execute(ParsedSqlStatement.java:111) ~[flyway-core-6.3.1.jar!/:na] at org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor.executeStatement(DefaultSqlScriptExecutor.java:208) ~[flyway-core-6.3.1.jar!/:na] ... 48 common frames omitted 2020-03-31 14:14:29.230 INFO 12445 --- [ main] o.s.s.c.ThreadPoolTaskScheduler : Shutting down ExecutorService 'taskScheduler' 2020-03-31 14:14:29.245 INFO 12445 --- [ main] j.LocalContainerEntityManagerFactoryBean : Closing JPA EntityManagerFactory for persistence unit 'default' 2020-03-31 14:14:29.248 INFO 12445 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown initiated... 2020-03-31 14:14:29.261 INFO 12445 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown completed. 2020-03-31 14:14:29.271 INFO 12445 --- [ main] io.undertow : stopping server: Undertow - 2.0.29.Final
teavmac 贴好一点方便大佬帮我看 Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled. 2020-03-31 14:14:29.225 ERROR 12445 --- [ main] o.s.boot.SpringApplication : Application run failed org.flywaydb.core.internal.command.DbMigrate$FlywayMigrateException: Migration V3__migrate_1.3.0-beta.1_to_1.3.0-beta.2.sql failed ------------------------------------------------------------- SQL State : 42000 Error Code : 1071 Message : Specified key was too long; max key length is 767 bytes Location : migration/V3__migrate_1.3.0-beta.1_to_1.3.0-beta.2.sql (/usr/local/halo/file:/usr/local/halo/halo-latest.jar!/BOOT-INF/classes!/migration/V3__migrate_1.3.0-beta.1_to_1.3.0-beta.2.sql) Line : 12 Statement : alter table categories modify name varchar(255) not null at org.flywaydb.core.internal.command.DbMigrate.doMigrateGroup(DbMigrate.java:369) ~[flyway-core-6.3.1.jar!/:na] at org.flywaydb.core.internal.command.DbMigrate.access$200(DbMigrate.java:54) ~[flyway-core-6.3.1.jar!/:na] at org.flywaydb.core.internal.command.DbMigrate$3.call(DbMigrate.java:282) ~[flyway-core-6.3.1.jar!/:na] at org.flywaydb.core.internal.jdbc.TransactionalExecutionTemplate.execute(TransactionalExecutionTemplate.java:66) ~[flyway-core-6.3.1.jar!/:na] at org.flywaydb.core.internal.command.DbMigrate.applyMigrations(DbMigrate.java:279) ~[flyway-core-6.3.1.jar!/:na] at org.flywaydb.core.internal.command.DbMigrate.migrateGroup(DbMigrate.java:244) ~[flyway-core-6.3.1.jar!/:na] at org.flywaydb.core.internal.command.DbMigrate.access$100(DbMigrate.java:54) ~[flyway-core-6.3.1.jar!/:na] at org.flywaydb.core.internal.command.DbMigrate$2.call(DbMigrate.java:162) ~[flyway-core-6.3.1.jar!/:na] at org.flywaydb.core.internal.command.DbMigrate$2.call(DbMigrate.java:159) ~[flyway-core-6.3.1.jar!/:na] at org.flywaydb.core.internal.database.mysql.MySQLNamedLockTemplate.execute(MySQLNamedLockTemplate.java:60) ~[flyway-core-6.3.1.jar!/:na] at org.flywaydb.core.internal.database.mysql.MySQLConnection.lock(MySQLConnection.java:161) ~[flyway-core-6.3.1.jar!/:na] at org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory.lock(JdbcTableSchemaHistory.java:140) ~[flyway-core-6.3.1.jar!/:na] at org.flywaydb.core.internal.command.DbMigrate.migrateAll(DbMigrate.java:159) ~[flyway-core-6.3.1.jar!/:na] at org.flywaydb.core.internal.command.DbMigrate.migrate(DbMigrate.java:137) ~[flyway-core-6.3.1.jar!/:na] at org.flywaydb.core.Flyway$1.execute(Flyway.java:193) ~[flyway-core-6.3.1.jar!/:na] at org.flywaydb.core.Flyway$1.execute(Flyway.java:153) ~[flyway-core-6.3.1.jar!/:na] at org.flywaydb.core.Flyway.execute(Flyway.java:523) ~[flyway-core-6.3.1.jar!/:na] at org.flywaydb.core.Flyway.migrate(Flyway.java:153) ~[flyway-core-6.3.1.jar!/:na] at run.halo.app.listener.StartedListener.migrate(StartedListener.java:100) ~[classes!/:na] at run.halo.app.listener.StartedListener.onApplicationEvent(StartedListener.java:66) ~[classes!/:na] at run.halo.app.listener.StartedListener.onApplicationEvent(StartedListener.java:40) ~[classes!/:na] at run.halo.app.listener.StartedListener$$EnhancerBySpringCGLIB$$2ae67d6a.onApplicationEvent(<generated>) ~[classes!/:na] at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172) ~[spring-context-5.2.4.RELEASE.jar!/:5.2.4.RELEASE] at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165) ~[spring-context-5.2.4.RELEASE.jar!/:5.2.4.RELEASE] at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139) ~[spring-context-5.2.4.RELEASE.jar!/:5.2.4.RELEASE] at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:403) ~[spring-context-5.2.4.RELEASE.jar!/:5.2.4.RELEASE] at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:360) ~[spring-context-5.2.4.RELEASE.jar!/:5.2.4.RELEASE] at org.springframework.boot.context.event.EventPublishingRunListener.started(EventPublishingRunListener.java:98) ~[spring-boot-2.2.5.RELEASE.jar!/:2.2.5.RELEASE] at org.springframework.boot.SpringApplicationRunListeners.started(SpringApplicationRunListeners.java:71) ~[spring-boot-2.2.5.RELEASE.jar!/:2.2.5.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:321) [spring-boot-2.2.5.RELEASE.jar!/:2.2.5.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226) [spring-boot-2.2.5.RELEASE.jar!/:2.2.5.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1215) [spring-boot-2.2.5.RELEASE.jar!/:2.2.5.RELEASE] at run.halo.app.Application.main(Application.java:35) [classes!/:na] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_242] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_242] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_242] at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_242] at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48) [halo-latest.jar:na] at org.springframework.boot.loader.Launcher.launch(Launcher.java:87) [halo-latest.jar:na] at org.springframework.boot.loader.Launcher.launch(Launcher.java:51) [halo-latest.jar:na] at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:52) [halo-latest.jar:na] Caused by: org.flywaydb.core.internal.sqlscript.FlywaySqlScriptException: Migration V3__migrate_1.3.0-beta.1_to_1.3.0-beta.2.sql failed ------------------------------------------------------------- SQL State : 42000 Error Code : 1071 Message : Specified key was too long; max key length is 767 bytes Location : migration/V3__migrate_1.3.0-beta.1_to_1.3.0-beta.2.sql (/usr/local/halo/file:/usr/local/halo/halo-latest.jar!/BOOT-INF/classes!/migration/V3__migrate_1.3.0-beta.1_to_1.3.0-beta.2.sql) Line : 12 Statement : alter table categories modify name varchar(255) not null at org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor.handleException(DefaultSqlScriptExecutor.java:274) ~[flyway-core-6.3.1.jar!/:na] at org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor.executeStatement(DefaultSqlScriptExecutor.java:220) ~[flyway-core-6.3.1.jar!/:na] at org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor.execute(DefaultSqlScriptExecutor.java:127) ~[flyway-core-6.3.1.jar!/:na] at org.flywaydb.core.internal.resolver.sql.SqlMigrationExecutor.executeOnce(SqlMigrationExecutor.java:88) ~[flyway-core-6.3.1.jar!/:na] at org.flywaydb.core.internal.resolver.sql.SqlMigrationExecutor.access$000(SqlMigrationExecutor.java:33) ~[flyway-core-6.3.1.jar!/:na] at org.flywaydb.core.internal.resolver.sql.SqlMigrationExecutor$1.call(SqlMigrationExecutor.java:77) ~[flyway-core-6.3.1.jar!/:na] at org.flywaydb.core.internal.resolver.sql.SqlMigrationExecutor$1.call(SqlMigrationExecutor.java:74) ~[flyway-core-6.3.1.jar!/:na] at org.flywaydb.core.internal.database.DefaultExecutionStrategy.execute(DefaultExecutionStrategy.java:28) ~[flyway-core-6.3.1.jar!/:na] at org.flywaydb.core.internal.resolver.sql.SqlMigrationExecutor.execute(SqlMigrationExecutor.java:74) ~[flyway-core-6.3.1.jar!/:na] at org.flywaydb.core.internal.command.DbMigrate.doMigrateGroup(DbMigrate.java:366) ~[flyway-core-6.3.1.jar!/:na] ... 40 common frames omitted Caused by: java.sql.SQLSyntaxErrorException: Specified key was too long; max key length is 767 bytes at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:120) ~[mysql-connector-java-8.0.19.jar!/:8.0.19] at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97) ~[mysql-connector-java-8.0.19.jar!/:8.0.19] at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122) ~[mysql-connector-java-8.0.19.jar!/:8.0.19] at com.mysql.cj.jdbc.StatementImpl.executeInternal(StatementImpl.java:764) ~[mysql-connector-java-8.0.19.jar!/:8.0.19] at com.mysql.cj.jdbc.StatementImpl.execute(StatementImpl.java:648) ~[mysql-connector-java-8.0.19.jar!/:8.0.19] at org.flywaydb.core.internal.jdbc.JdbcTemplate.executeStatement(JdbcTemplate.java:244) ~[flyway-core-6.3.1.jar!/:na] at org.flywaydb.core.internal.sqlscript.ParsedSqlStatement.execute(ParsedSqlStatement.java:111) ~[flyway-core-6.3.1.jar!/:na] at org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor.executeStatement(DefaultSqlScriptExecutor.java:208) ~[flyway-core-6.3.1.jar!/:na] ... 48 common frames omitted 2020-03-31 14:14:29.230 INFO 12445 --- [ main] o.s.s.c.ThreadPoolTaskScheduler : Shutting down ExecutorService 'taskScheduler' 2020-03-31 14:14:29.245 INFO 12445 --- [ main] j.LocalContainerEntityManagerFactoryBean : Closing JPA EntityManagerFactory for persistence unit 'default' 2020-03-31 14:14:29.248 INFO 12445 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown initiated... 2020-03-31 14:14:29.261 INFO 12445 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown completed. 2020-03-31 14:14:29.271 INFO 12445 --- [ main] io.undertow : stopping server: Undertow - 2.0.29.Final
teavmac 已解决 `-- INNODB_LARGE_PREFIX 是否是 OFF SHOW variables like 'innodb_large_prefix' -- 如果是 off , 打开它 SET GLOBAL INNODB_LARGE_PREFIX = ON;`