com.mysql.jdbc.PacketTooBigException: Packet for query is too large (6340240 > 4194304). You can change this value on the server by setting the max_allowed_packet' variable.
; Packet for query is too large (6340240 > 4194304). You can change this value on the server by setting the max_allowed_packet' variable.; nested exception is com.mysql.jdbc.PacketTooBigException: Packet for query is too large (6340240 > 4194304). You can change this value on the server by setting the max_allowed_packet' variable.
解答:
mysql 服务器系统参数设置不够, 在mysql中查看: show VARIABLES like '%max_allowed_packet%';
分批次存储数据 或 修改mysql中这个参数。