錯誤現象:(com.logicaldoc.core.security.dao.HibernateUserDAO: 102) -- Packet for query is too large (1086 > 1024). You can change this value on the server by setting the max_allowed_packet' variable.
org.hibernate.exception.GenericJDBCException: Packet for query is too large (1086 > 1024). You can change this value on the server by setting the max_allowed_packet' variable.mysql
解決辦法:MySQL的一個系統參數:max_allowed_packet,其默認值爲1048576(1M),
查詢:show VARIABLES like '%max_allowed_packet%';sql
修改此變量的值:ide
my.cnf文件中的[mysqld]段中的"max_allowed_packet = 1M",(可能有些文件會沒有這一行的)this
格式爲:spa
[mysqld]hibernate
max_allowed_packet = 1M ( 將1M更改成4M(若是沒有這行內容,增長一行)),orm
保存,server
重起MySQL服務。ci
如今能夠load大於1M的文件了it