cancel
Showing results for 
Search instead for 
Did you mean: 

ACT_GE_BYTEARRAY / com.mysql.jdbc.PacketTooBigException

pbreak75
Champ in-the-making
Champ in-the-making


Hello,

Is there a way to avoid this error message bellow  without increasing the value of max_allowed_packet ?


Error updating database.  Cause: com.mysql.jdbc.PacketTooBigException: Packet for query is too large (16005045 > 8388608). You can change this value on the server by setting the max_allowed_packet' variable.
### The error may involve org.activiti.engine.impl.persistence.entity.ByteArrayEntity.insertByteArray-Inline
### The error occurred while setting parameters
### SQL: insert into ACT_GE_BYTEARRAY(ID_, REV_, NAME_, BYTES_, DEPLOYMENT_ID_)     values (       ?,       1,        ?,        ?,        ?     )
### Cause: com.mysql.jdbc.PacketTooBigException: Packet for query is too large (16005045 > 8388608). You can change this value on the server by setting the max_allowed_packet' variable.
org.apache.ibatis.exceptions.PersistenceException:
### Error updating database.  Cause: com.mysql.jdbc.PacketTooBigException: Packet for query is too large (16005045 > 8388608). You can change this value on the server by setting the max_allowed_packet' variable.
### The error may involve org.activiti.engine.impl.persistence.entity.ByteArrayEntity.insertByteArray-Inline
### The error occurred while setting parameters
### SQL: insert into ACT_GE_BYTEARRAY(ID_, REV_, NAME_, BYTES_, DEPLOYMENT_ID_)     values (       ?,       1,        ?,        ?,        ?     )
### Cause: com.mysql.jdbc.PacketTooBigException: Packet for query is too large (16005045 > 8388608). You can change this value on the server by setting the max_allowed_packet' variable.
   at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:23)
   at org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:150)
   at org.apache.ibatis.session.defaults.DefaultSqlSession.insert(DefaultSqlSession.java:137)
   at org.activiti.engine.impl.db.DbSqlSession.flushInserts(DbSqlSession.java:761)
   at org.activiti.engine.impl.db.DbSqlSession.flush(DbSqlSession.java:593)
   at org.activiti.engine.impl.interceptor.CommandContext.flushSessions(CommandContext.java:211)
   at org.activiti.engine.impl.interceptor.CommandContext.close(CommandContext.java:137)
   at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:66)
   at org.activiti.spring.SpringTransactionInterceptor$1.doInTransaction(SpringTransactionInterceptor.java:47)
   at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:133)
   at org.activiti.spring.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:45)
   at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:31)
   at org.activiti.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:40)
   at org.activiti.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:35)
   at org.activiti.engine.impl.asyncexecutor.ExecuteAsyncRunnable.run(ExecuteAsyncRunnable.java:73)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
   at java.lang.Thread.run(Thread.java:745)

Regards,
2 REPLIES 2

trademak
Star Contributor
Star Contributor
Hi,

That's more of a MySQL question. Found this in their documentation:

http://dev.mysql.com/doc/refman/5.7/en/program-variables.html

Best regards,

pbreak75
Champ in-the-making
Champ in-the-making
Hello,
As i said above, i don't want to change the value of max_allowed_packet , is there a parameter in ACTIVITI to avoid this error?
I had the same problem in another application , I have made sure that queries are always reasonably short.
In activiti , it happens when there is a large amount of data, the request below fails
insert into ACT_GE_BYTEARRAY(ID_, REV_, NAME_, BYTES_, DEPLOYMENT_ID_) values ( ?, 1, ?, ?, ? ).

Best regards,