You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The mapping between user and roles is faulty with mariaDB.
2016-09-19 12:02:26.150 ERROR 5481 --- [ost-startStop-1] org.hibernate.tool.hbm2ddl.SchemaUpdate : HHH000388: Unsuccessful: create table user_roles (user_id bigint not null, roles varchar(255) not null, primary key (user_id, roles)) 2016-09-19 12:02:26.150 ERROR 5481 --- [ost-startStop-1] org.hibernate.tool.hbm2ddl.SchemaUpdate : Specified key was too long; max key length is 767 bytes
The composite key created for this relation exceeds length limit. It's probably because the composite key consists of bigint and varchar(255). Bigint takes 8 bytes and utf-8 char 3 bytes so: 8 + 255 * 3 = 773 which is greater than the 767 bytes limit.
Temporar solution was to change the enum type from EnumType.STRING to EnumType.ORDINAL (which reduced its size).
The text was updated successfully, but these errors were encountered:
Luxter
changed the title
user-role
Faulty user-role mapping
Sep 19, 2016
The mapping between user and roles is faulty with mariaDB.
2016-09-19 12:02:26.150 ERROR 5481 --- [ost-startStop-1] org.hibernate.tool.hbm2ddl.SchemaUpdate : HHH000388: Unsuccessful: create table user_roles (user_id bigint not null, roles varchar(255) not null, primary key (user_id, roles)) 2016-09-19 12:02:26.150 ERROR 5481 --- [ost-startStop-1] org.hibernate.tool.hbm2ddl.SchemaUpdate : Specified key was too long; max key length is 767 bytes
The composite key created for this relation exceeds length limit. It's probably because the composite key consists of bigint and varchar(255). Bigint takes 8 bytes and utf-8 char 3 bytes so: 8 + 255 * 3 = 773 which is greater than the 767 bytes limit.
Temporar solution was to change the enum type from EnumType.STRING to EnumType.ORDINAL (which reduced its size).
The text was updated successfully, but these errors were encountered: