wso2 / product-is

Welcome to the WSO2 Identity Server source code! For info on working with the WSO2 Identity Server repository and contributing code, click the link below.
http://wso2.github.io/
Apache License 2.0
748 stars 728 forks source link

Error occur during the migration from WSO2IS-5.3.0 to WSO2IS-5.5.0 - "Specified key was too long; max key length is 3072 bytes" #3325

Closed SachithUd closed 6 years ago

SachithUd commented 6 years ago

Description: The following error will occur while doing the migration from WSO2IS-5.3.0 to WSO2IS-5.5.0 when using MySQL databases with character set of UTF-8.

ERROR {org.wso2.carbon.is.migration.service.SchemaMigrator} - Error occurred while executing SQL script for migrating database java.lang.Exception: Error occurred while executing : ALTER TABLE IDN_OAUTH2_ACCESS_TOKEN modify ACCESS_TOKEN VARCHAR(2048) at org.wso2.carbon.is.migration.service.SchemaMigrator.executeSQL(SchemaMigrator.java:231) at org.wso2.carbon.is.migration.service.SchemaMigrator.executeSQLScript(SchemaMigrator.java:162) at org.wso2.carbon.is.migration.service.SchemaMigrator.migrate(SchemaMigrator.java:75) at org.wso2.carbon.is.migration.VersionMigration.migrate(VersionMigration.java:41) at org.wso2.carbon.is.migration.MigrationClientImpl.execute(MigrationClientImpl.java:80) at org.wso2.carbon.identity.core.internal.IdentityCoreServiceComponent.activate(IdentityCoreServiceComponent.java:147) .... Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Specified key was too long; max key length is 3072 bytes at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ... at java.lang.reflect.Method.invoke(Method.java:498) at org.apache.tomcat.jdbc.pool.StatementFacade$StatementProxy.invoke(StatementFacade.java:114) at com.sun.proxy.$Proxy21.execute(Unknown Source) at org.wso2.carbon.is.migration.service.SchemaMigrator.executeSQL(SchemaMigrator.java:201) ... 65 more

Suggested Labels: migration

Affected Product Version: WSO2IS-5.5.0

Steps to reproduce: Do the migration from WSO2IS-5.3.0 to WSO2IS-5.5.0 using MySQL databases with using character set of UTF-8.

DMHP commented 6 years ago

https://github.com/wso2/product-is/pull/3330