Starting a Camunda Workflow via Rest fails: ORA-12899: value too large for column (solved)

Dear Camunda Team,

in our project, we want to use Camunda as the workflow engine. Since we are implementing in C# (.net core), we will use it solely via the REST API, i.e. we have implemented one admin web application starting workflows via REST and within another web application, we set up ExternalTaskAdapters as workers for retrieving and completing tasks.

The whole construct is working fine (stable and fast) using the Dictionary<string,object> container for passing values to the worker and storing the result and an error message.

Now the problem: one of the external task adapters is supposed to process a quite large XML. I base64 encoded it and put it into the variables section. The base64 encoded variable contains > 9000 chars.

I added the input variables as json, leaving out most of the chars (replaced by […]):

{“variables”:
{
“dataDocument” : { “value” : “PGRhdGFEb2N1bWVud[…]bWVudD4=”, “type”: “String”}
},
“businessKey” : “testBusinessKey”
}

When trying to insert the document: http://:8080/engine-rest/process-definition/key/GenerateDoc/start

I get an Oracle ORA-12899. It seems that there is a hidden limit on the “object” size of 2000:
“type”: “RestException”,
“message”: "Cannot instantiate process definition GenerateDoc:1:6ccf7444-eb65-11e9-a264-005056b65e2d: ENGINE-03083 Exception while executing Batch Database Operations with message '\r\n### Error flushing statements. Cause: org.apache.ibatis.executor.BatchExecutorException: org.camunda.bpm.engine.impl.persistence.entity.HistoricVariableInstanceEntity.insertHistoricVariableInstance (batch index #1) failed. Cause: java.sql.BatchUpdateException: ORA-12899: value too large for column "USP"."ACT_HI_VARINST"."TEXT_" (actual: 9672, maximum: 2000)

The question is now: how can I get my oversized string into the dictionary so it can be processed ? Is there another datatype (BLOB) or similar I should choose ?

Thanks for helping out here…

Best regards,
Stefan P.

Update: solved it, you can use “Json” as datatype, then it is processed without issues… :slight_smile:

1 Like

Hi @SPreishuber,

Great to hear you found a workaround.

In case anyone else has this Problem, I would recommend you store the XML as a variable of type file, which does not have a size restriction.
To submit it with the REST-API, see the corresponding REST endpoint, e.g. Start Process.

Hi,

Could you please elaborate on how you resolved the issue, I am in similar situation.
I changed the data type to CLOB, and process instance created successfully But the Task list UI show error and log says:

SQL: select * from ( select a., ROWNUM rnum from ( select distinct RES. from ( select RES., ( case when RES.TASK_ID_ is not null and RES.EXECUTION_ID_ is not null then EXECUTION.ACT_INST_ID_ when RES.CASE_EXECUTION_ID_ is not null then RES.CASE_EXECUTION_ID_ when EXECUTION.PARENT_ID_ is null and RES.IS_CONCURRENT_LOCAL_ = 0 then EXECUTION.ID_ when EXECUTION.IS_SCOPE_ = 1 and EXECUTION.PARENT_ID_ is not null and RES.IS_CONCURRENT_LOCAL_ = 0 then PARENT_EXECUTION.ACT_INST_ID_ else EXECUTION.ACT_INST_ID_ end ) ACT_INST_ID_ from ACT_RU_VARIABLE RES left join ACT_RU_EXECUTION EXECUTION on RES.EXECUTION_ID_ = EXECUTION.ID_ left join ACT_RU_EXECUTION PARENT_EXECUTION on EXECUTION.PARENT_ID_ = PARENT_EXECUTION.ID_ left join ACT_RU_EXECUTION PROC_EXECUTION on PROC_EXECUTION.ID_ = RES.PROC_INST_ID_ left join ACT_RE_PROCDEF PROCDEF on PROCDEF.ID_ = PROC_EXECUTION.PROC_DEF_ID_ left JOIN ( SELECT A. FROM ACT_RU_AUTHORIZATION A WHERE A.TYPE_ < 2 AND ( A.USER_ID_ in ( ?, ‘’) OR A.GROUP_ID_ IN ( ? , ? , ? , ? ) ) AND ( ( A.RESOURCE_TYPE_ = ? AND BITAND(A.PERMS_,?) = ? OR A.RESOURCE_TYPE_ = ? AND BITAND(A.PERMS_,?) = ? OR A.RESOURCE_TYPE_ = ? AND BITAND(A.PERMS_,?) = ? ) ) ) AUTH ON ( AUTH.RESOURCE_ID_ in ( RES.PROC_INST_ID_, PROC_EXECUTION.ID_, PROCDEF.KEY_, RES.TASK_ID_, '’) ) WHERE RES.NAME_ in ( ? , ? , ? , ? ) and RES.VAR_SCOPE_ in ( ? , ? , ? , ? , ? , ? ) and ( (RES.CASE_EXECUTION_ID_ IS NOT NULL) OR (AUTH.RESOURCE_ID_ IS NOT NULL) ) ) RES order by RES.ID_ asc ) a where ROWNUM < ?) where rnum >= ?

Cause: java.sql.SQLSyntaxErrorException: ORA-00932: inconsistent datatypes: expected - got BLOB