Hi all,
I tried to upgrade my Bitbucket Server from 5.12 to 6.0.0. After startup I got the issue in the log that a Key length is too long. The only hint I've found points to use InnoDB but I already have configured InnoDB as default. Do you have any other Idea why this comes up? It seems to be a new table which was not present in 5.12.
Best Regads,
Patrick
Here is the Stacktrace:
2019-02-14 17:13:02,308 ERROR [spring-startup] c.a.j.s.w.s.JohnsonDispatcherServlet SpringMVC dispatcher [springMvc] could not be started
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'crowdAliasDao': Unsatisfied dependency expressed through method 'setSessionFactory' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'liquibase' defined in class path resource [stash-context.xml]: Invocation of init method failed; nested exception is liquibase.exception.MigrationFailedException: Migration failed for change set liquibase/r5_13/upgrade.xml::BSERVDEV-16285-2::mstudman:
Reason: liquibase.exception.DatabaseException: Specified key was too long; max key length is 767 bytes [Failed SQL: CREATE INDEX idx_bb_job_type ON patrick_db3.bb_job(type)]
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredMethodElement.inject(AutowiredAnnotationBeanPostProcessor.java:676)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:863)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:546)
at javax.servlet.GenericServlet.init(GenericServlet.java:158)
at java.lang.Thread.run(Thread.java:748)
... 18 frames trimmed
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'liquibase' defined in class path resource [stash-context.xml]: Invocation of init method failed; nested exception is liquibase.exception.MigrationFailedException: Migration failed for change set liquibase/r5_13/upgrade.xml::BSERVDEV-16285-2::mstudman:
Reason: liquibase.exception.DatabaseException: Specified key was too long; max key length is 767 bytes [Failed SQL: CREATE INDEX idx_bb_job_type ON patrick_db3.bb_job(type)]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1745)
... 5 common frames omitted
Caused by: liquibase.exception.MigrationFailedException: Migration failed for change set liquibase/r5_13/upgrade.xml::BSERVDEV-16285-2::mstudman:
Reason: liquibase.exception.DatabaseException: Specified key was too long; max key length is 767 bytes [Failed SQL: CREATE INDEX idx_bb_job_type ON patrick_db3.bb_job(type)]
at liquibase.changelog.ChangeSet.execute(ChangeSet.java:637)
at liquibase.changelog.visitor.UpdateVisitor.visit(UpdateVisitor.java:53)
at liquibase.changelog.ChangeLogIterator.run(ChangeLogIterator.java:78)
at liquibase.Liquibase.update(Liquibase.java:202)
at liquibase.Liquibase.update(Liquibase.java:179)
at liquibase.integration.spring.SpringLiquibase.performUpdate(SpringLiquibase.java:317)
at liquibase.database.ExtendedSpringLiquibase.afterPropertiesSet(ExtendedSpringLiquibase.java:32)
... 5 common frames omitted
Caused by: liquibase.exception.DatabaseException: Specified key was too long; max key length is 767 bytes [Failed SQL: CREATE INDEX idx_bb_job_type ON patrick_db3.bb_job(type)]
at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:356)
at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:57)
at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:125)
at liquibase.database.AbstractJdbcDatabase.execute(AbstractJdbcDatabase.java:1229)
at liquibase.database.AbstractJdbcDatabase.executeStatements(AbstractJdbcDatabase.java:1211)
at liquibase.changelog.ChangeSet.execute(ChangeSet.java:600)
... 11 common frames omitted
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Specified key was too long; max key length is 767 bytes
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:425)
at com.mysql.jdbc.Util.getInstance(Util.java:408)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:943)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3973)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3909)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2527)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2680)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2490)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2448)
at com.mysql.jdbc.StatementImpl.executeInternal(StatementImpl.java:845)
at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:745)
at com.zaxxer.hikari.pool.ProxyStatement.execute(ProxyStatement.java:95)
at com.zaxxer.hikari.pool.HikariProxyStatement.execute(HikariProxyStatement.java)
at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:352)
... 16 common frames omitted
I did some mysql research. And I followed the suggestions in this stackoverflow:
https://stackoverflow.com/questions/35847015/mysql-change-innodb-large-prefix
additionally I changed the row format of the tables with the large index sizes to DYNAMIC then bitbucket started fine (and seems to run correctly :) ).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.