AnsweredAssumed Answered

Insert into ACT_HI_VARINST causes ORA-01401: inserted value too large for column

Question asked by soaguy on Oct 27, 2015
Latest reply on Oct 30, 2015 by soaguy
Hello all,
             I am running into an issue when I set a xml string into a string variable and starting a process instance as below,

——> Error code

                        Map<String, Object> variableMap = new HashMap<String, Object>();
         variableMap.put("_JMSMessage", messageRequest);
         pid = runtimeService.startProcessInstanceByKey("responseHandler", variableMap).getId();


I get the error below,


### Error updating database.  Cause: java.sql.SQLDataException: ORA-01401: inserted value too large for column

### The error may involve org.activiti.engine.impl.persistence.entity.HistoricVariableInstanceEntity.insertHistoricVariableInstance-Inline
### The error occurred while setting parameters
### SQL: insert into ACT_HI_VARINST (ID_, PROC_INST_ID_, EXECUTION_ID_, TASK_ID_, NAME_, REV_, VAR_TYPE_, BYTEARRAY_ID_, DOUBLE_, LONG_ , TEXT_, TEXT2_, CREATE_TIME_, LAST_UPDATED_TIME_)     values (       ?,       ?,       ?,       ?,       ?,       ?,       ?,       ?,       ?,       ?,       ?,       ?,       ?,       ?     )
### Cause: java.sql.SQLDataException: ORA-01401: inserted value too large for column

   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.flushRegularInsert(DbSqlSession.java:825)
   at org.activiti.engine.impl.db.DbSqlSession.flushPersistentObjects(DbSqlSession.java:805)
   at org.activiti.engine.impl.db.DbSqlSession.flushInserts(DbSqlSession.java:789)
   at org.activiti.engine.impl.db.DbSqlSession.flush(DbSqlSession.java:610)
   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.RuntimeServiceImpl.startProcessInstanceByKey(RuntimeServiceImpl.java:77)



But when I use the same message (in a correlation type interaction) as below it works.

—-> Working code

            Map<String, Object> variableMap = new HashMap<String, Object>();
            variableMap.put("_MessageName", messageName);
            variableMap.put("_MessageContent", messageRequest);
            runtimeService.messageEventReceived(messageName, execution.getId(), variableMap);


Can you please help on how to overcome this issue and the reason why there is a conflicting behavior ? I am using Activiti v5.18.

Many thanks
Clement

Outcomes