Installing failed , return HTTP error 500

Hi .
I’m installing xwiki via debian apt source on Ubuntu 18.04LTS.After configuration ,It occurs to have error.
Critical error message:

org.xwiki.query.QueryException: Exception while executing query. Query statement = [ select doc.fullName from XWikiDocument as doc , BaseObject as _o1 where ( doc.object ( XWiki.XWikiServerClass ) . server = :wikiAlias and doc.name like 'XWikiServer%' ) and doc.fullName=_o1.name and _o1.className='XWiki.XWikiServerClass' ]
	com.xpn.xwiki.store.hibernate.query.HqlQueryExecutor.execute(HqlQueryExecutor.java:176)
	org.xwiki.query.internal.DefaultQueryExecutorManager.execute(DefaultQueryExecutorManager.java:72)

complete logs and configures:

  1. HTTP 500 Error page ,all error stack is here.
  2. hibernate config

Package installed is·xwiki-tomcat9-mariadb·,and the current mariadb version is:
Server version: 10.1.47-MariaDB-0ubuntu0.18.04.1 Ubuntu 18.04

The reason of the error is improper database comfig.Add profile pasted below into my.cnf and restart the mysql and container (for me is tomcat9), then the problem will disappear.See also:How to fix MySql: index column size too large.
Contents of /etc/mysql/mariadb.conf.d/60-fix-key-length.cnf

[mysqld]
innodb_file_format = Barracuda
innodb_file_per_table = on
innodb_default_row_format = dynamic
innodb_large_prefix = 1
innodb_file_format_max = Barracuda